[FEATURE] Define Custom Tools
- Langage dominant
- Lua
- Étoiles
- 3.1k
- Forks
- 216
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
## 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).
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
Commencez par suivre la manière dont le plugin lit sa configuration et dont son intégration de Claude basée sur WebSocket expose des outils. Définissez la structure prise en charge de custom_tools, y compris les schémas et les callbacks, et vérifiez qu’une fonction Lua configurée peut être invoquée par Claude dans Neovim.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- lua, neovim
- Domaine
- tooling
- Type d'issue
- Fonctionnalité
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 28/100