coder / coder/claudecode.nvim

[FEATURE] Define Custom Tools

Abierto
#149 0 comentarios 1 reacción 0 asignados Ver en GitHub
Lenguaje dominante
Lua
Estrellas
3.1k
Forks
216
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

## 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).

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

Start by tracing how the plugin reads its config and how its WebSocket-based Claude integration exposes tools. Define the supported custom_tools shape, including schemas and callbacks, and verify that a configured Lua function can be invoked by Claude within Neovim.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
lua, neovim
Área
tooling
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
28/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.