coder / coder/claudecode.nvim

[FEATURE] Define Custom Tools

オープン
#149 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る
主要言語
Lua
スター
3.1k
フォーク
216
PR マージ指標
30日以内にマージされた PR はありません

説明

## Feature Description

I'd like to be able to define custom MCP tools in the plugin's config.

## Use Case

Users would be able to define any function that can be run by Claude within neovim. The use cases are basically infinite. Anything you can imagine as a Lua function could be run by Claude.

## Proposed Solution

I Imagine the function definition to look somewhat like this:

```lua
{
"coder/claudecode.nvim",
dependencies = { "folke/snacks.nvim" },
-- ...
custom_tools = {
{
"tool_name",
title = "The tool's title",
desc = "Does something",
input_schema = {
-- ...
},
output_schema = {
-- ...
},
annotations = {
-- ...
},
callback = function(arg1, arg2)
-- ...
end
},
},
}
```

## Alternatives Considered

- Letting claude execute arbitrary vim commands. That's not very Neovimy and more risky though. And this feature could still be implemented using the proposed solution.
- Making my own plugin. Though the power of claudecode.nvim is its WebSocket based integration, which I'd have to replicate (or I'd have to use a local http transport).

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

まず、plugin がどのように設定を読み込み、WebSocket ベースの Claude 統合がどのようにツールを公開しているかを追跡します。スキーマとコールバックを含む、サポートされる custom_tools の構造を定義し、設定された Lua 関数を Neovim 内で Claude が呼び出せることを検証します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
lua, neovim
領域
tooling
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
28/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。