Skip to main content
Glama

local-delegate

Delega tareas mecánicas texto→texto a un LLM local para conservar la cuota de tu suscripción de Claude. Un servidor MCP (stdio o daemon HTTP compartido) que es cliente genérico de cualquier endpoint OpenAI-compatible — llama-swap, Ollama, LM Studio, vLLM.

PyPI CI License: MIT

zahirinatzuke.github.io/local-delegate — qué hace y por qué, en una página (es/en). Su fuente está en site/.

Demo

Dashboard embebido (datos de ejemplo): estado del backend local (modelos montados, delegación en curso con su progreso por trozos, tools MCP), RAM/VRAM del sistema con consumo por proceso, tokens de contexto conservados, ahorro por herramienta y modelo, dónde corrió el cómputo —esta máquina o un backend remoto— y actividad reciente paginada en tu hora local. Se sirve en http://127.0.0.1:9393.

Related MCP server: local-llm-mcp

¿Por qué?

Cuando Claude tiene que resumir un log enorme, clasificar, extraer campos o generar boilerplate, gasta cuota de tu suscripción en trabajo mecánico. local-delegate expone esas tareas como tools MCP que corren en un LLM local: pasas path en vez de text y el archivo se lee del lado del servidor, así el contenido grande nunca entra al contexto de Claude. Solo vuelve el resultado corto: el documento no ocupa tu ventana de contexto ni lo procesa Claude.

Instalación rápida

Con uv no hay nada que instalar: uvx baja y ejecuta el paquete aislado.

Añádelo a tu config de MCP (Claude Desktop / Claude Code) en modo compatible stdio:

{
  "mcpServers": {
    "local-delegate": {
      "command": "uvx",
      "args": ["local-delegate-mcp"]
    }
  }
}

Ver plantillas completas en examples/.

O deja que el paquete lo configure todo por ti —entrada MCP, hooks, skill y la regla de delegación en tu CLAUDE.md/AGENTS.md global— con un solo comando:

uv tool install local-delegate-mcp          # deja `local-delegate` en el PATH
local-delegate install --dry-run            # muestra exactamente qué tocaría
local-delegate install                      # aplica

También sirve uvx local-delegate-mcp install para probarlo sin instalar nada, pero ten en cuenta que uvx no deja el comando disponible: monta un entorno efímero y lo borra al terminar, así que después local-delegate doctor responderá «command not found». El propio install te lo avisa si detecta ese caso.

Es idempotente, deja .bak de lo que edita (la primera vez que lo toca; después no lo pisa), no toca configuración ajena y se revierte con local-delegate uninstall. Desde la 0.44.0 escribe de forma atómica, reaplica su cambio si Claude Code guarda el fichero a la vez, y si un fichero no está en UTF-8 (cp1252, UTF-16) la acción falla sin tocarlo. Detalle y opciones en Instalación de la integración.

¿Autocompletado con Tab de subcomandos, opciones y valores? local-delegate install --shell-completion lo deja cargado en el perfil de PowerShell, zsh o bash (opt-in, reversible con uninstall --shell-completion), y local-delegate completion powershell|zsh|bash imprime el script por si prefieres cargarlo tú. Ver Autocompletado del shell.

Si usas varias sesiones o varios clientes en la misma máquina, se recomienda un solo daemon:

uvx local-delegate-mcp serve

El daemon sirve MCP en http://127.0.0.1:9393/mcp y el dashboard en http://127.0.0.1:9393/. Codex, Claude Code, opencode y cualquier cliente compatible con Streamable HTTP pueden compartir esa URL sin levantar procesos MCP duplicados. Con un llama-swap local, el extra [llamaswap] y LLAMASWAP_CONFIG apuntando a su config.yaml, el daemon además reparte el backend por turno: dos delegaciones cuyos modelos se desalojarían entre sí no se pisan, y la segunda espera (el panel lo enseña como espera local). Guía completa: Daemon compartido.

Una delegación puede sumar espera de turno e inferencia, y algunos clientes cortan antes: Codex corta toda llamada a una tool MCP a los 60 s (tool_timeout_sec en [mcp_servers.local-delegate] de config.toml lo sube, y hay que reponerlo tras cada install/update, que reescriben ese bloque) y Claude Code corta una llamada HTTP tras 5 min sin respuesta (la variable CLAUDE_CODE_MCP_TOOL_IDLE_TIMEOUT, en ms, lo sube y sobrevive a install). Detalle en Instalación de la integración.

Para usar la GPU de otra máquina manteniendo los paths locales del cliente, usa un MCP local que apunte al backend remoto: guía Mac → PC y recipe técnica completa. Las operaciones de las dos máquinas hacen una sola cola: la que no tiene el backend pide turno al daemon de la otra, con la misma clave del backend y solo hacia un host privado (la tailnet), y si ese daemon no está disponible sigue sin turno, como antes (turno común PC+Mac).

No fijes una versión vieja «por estabilidad». Un pin (==X.Y.Z) congela también los rangos de dependencias que declaraba aquel wheel, y eso envejece mal: las versiones anteriores a la 0.12.2 pedían mcp sin techo, así que hoy resuelven al SDK 2.x y mueren en el import. Si necesitas fijar, fija la actual, y súbela cuando salga una nueva.

En Windows, si lo registras como tarea al iniciar sesión, ejecuta el pythonw.exe del entorno donde instalaste el paquete con -m local_delegate serve --log-level warning. pythonw no crea consola ni botón en la barra de tareas. La tarea pertenece al usuario de Windows, no a Codex ni a Claude: cualquier cliente local comparte el mismo daemon. El dashboard identifica ese único proceso con la insignia DAEMON MCP; las sesiones conectadas son clientes HTTP, no procesos MCP adicionales.

Al actualizar en Windows, para el daemon antes de uv tool install --force. Con el daemon corriendo, la reinstalación puede fallar a mitad (tiene abiertos ficheros del entorno) y dejarlo roto; schtasks /End no basta porque el lanzador está desacoplado, así que para el proceso pythonw del daemon, instala y vuelve a lanzarlo. Después, local-delegate update repone hooks, skill y el bloque de CLAUDE.md/AGENTS.md si quedaron desfasados.

Si instalaste con una versión fija (uv tool install "local-delegate-mcp==X.Y.Z"), uv tool upgrade dice «Nothing to upgrade» y no sube nada: reinstala con uv tool install "local-delegate-mcp[llamaswap]@latest" (con tus extras). Desde la 0.45.1, local-delegate update y doctor lo detectan y dan ese comando.

La 0.36.0 habla en español o en inglés y sigue al idioma del sistema. Con el sistema en inglés pasarás a ver inglés: para quedarte en español, LOCAL_DELEGATE_LANG=es local-delegate install (o update). Las claves de _local_delegate y los marcadores de las tools pasan a inglés (cambio incompatible); la tabla está en el CHANGELOG y en Idioma.

La 0.35.0 renombra comandos, variables, la skill y ficheros de datos a inglés. Los nombres viejos funcionaron con aviso desde la 0.35.0 y en la 0.38.0 se retiraron: ya no tienen efecto. local-delegate doctor nombra los que sigan puestos (hasta la 0.40.x) y local-delegate update migra los que puede. Volver a una versión anterior no está soportado. La tabla completa está en el CHANGELOG.

Requisitos

Python 3.11+ — con uvx no tienes que instalarlo tú, lo resuelve él; solo importa si instalas con pip en un entorno propio.

Y un endpoint OpenAI-compatible ya corriendo, accesible en LOCAL_DELEGATE_BASE_URL (default http://127.0.0.1:9292/v1). Cualquiera sirve:

  • llama-swap — ver recipe con GPU Blackwell.

  • Ollama — http://127.0.0.1:11434/v1.

  • LM Studio, vLLM, o cualquier servidor que hable la API de OpenAI.

El paquete no arranca ningún backend por defecto (LOCAL_DELEGATE_AUTOSTART=0). El auto-arranque de llama-swap es opt-in (ver tabla de configuración).

¿Qué versiones de llama-server/llama-swap usar y cómo disponer el workspace? Ver Versiones del backend y workspace de referencia (sugerencia probada, no requisito). local-delegate doctor compara tu instalación contra esas versiones y, de paso, comprueba el resto del andamiaje —hooks, skill, memoria, entradas MCP y el daemon— sin escribir nada (qué mira cada check).

Tools

Pasar path (en vez de text) hace que el MCP lea el archivo server-side: el contenido no entra al contexto de Claude, y de ahí sale el ahorro.

Tool

Qué hace

Rol de modelo (default)

local_summarize

Resume texto o archivo; focus opcional para decir qué conservar (p. ej. «cifras de configuración»)

mecánico / largo (auto)

local_classify

Devuelve UNA etiqueta de una lista

mecánico

local_extract

Extrae campos → objeto validado, no una cadena que haya que parsear

mecánico / largo (auto)

local_boilerplate

Genera código desde una spec y lo escribe en target; devuelve solo un recibo

código

local_delegate

Escape genérico texto→texto

mecánico (o el que pases)

local_lint_summary

Resume logs de lint/tests/CI

mecánico / largo (auto)

local_commit_msg

Mensaje de commit desde un diff

código

local_translate

Traduce texto o archivo

mecánico / largo (auto)

local_explain_code

Explica código en prosa

código

local_describe_image

Describe una imagen o responde una pregunta sobre ella (imagen→texto)

visión

local_status

Diagnóstico de solo lectura: backend, catálogo, log, VRAM, RAM de sistema

— (no llama al backend de chat)

Los modelos locales no usan tool-calling: el server arma el prompt + guardrails, hace POST al endpoint y devuelve solo texto.

Documentos largos. local_translate (y local_delegate con entradas largas) parten el texto por límites naturales —headers Markdown, párrafos, líneas— y procesan un trozo por llamada respetando el techo de max_tokens, concatenando las salidas en orden y conservando el formato en las costuras. Un documento de 20 000+ caracteres vuelve completo en vez de cortado a mitad. El log registra chunks: N y el dashboard muestra el progreso (trozo 3/7) mientras corre. Desde la 0.43.0, «En curso» dice también la fase: «Combinando 3 trozos…» mientras se juntan los parciales y «Reintentando trozo n/total» cuando un trozo cortado se vuelve a partir; y la actividad separa trozos de llamadas al backend (3 +1: tres trozos y una combinación).

Llamadas largas y colas. Desde la 0.45.0 cada llamada viva manda progreso MCP cada 20 s con su fase («esperando turno, puesto N», «procesando el trozo k/N»), así que Claude Code ya no corta a los 300 s una delegación que espera en la cola. El daemon pone a cada llamada un plazo propio (LOCAL_DELEGATE_CALL_MAX_S, 1800 s) y, si la cola lleva 900 s sin avanzar, falla en el acto con «cola saturada» en vez de colgar al cliente. Las delegaciones abortadas quedan en el log como errores, «En curso» separa «Procesando (n)» de «En cola (m)», y cada entrada del log dice desde qué máquina vino (host) y cuánto esperó en cada fase (concurrency). Desde la 0.46.0 una delegación troceada larga cede el turno entre trozos a la que choca con ella (LOCAL_DELEGATE_TURN_YIELD_S, 120 s), «En curso» agrupa en «Esperando al backend» la llamada que espera a que llama-swap cambie de modelo, y un read_timeout nombra el modelo que lo bloqueaba. Desde la 0.47.0 esa espera se ve como tal aunque el trozo se esté reintentando (antes salía como «reintentando»).

Resúmenes de documentos enormes. local_summarize y local_lint_summary hacen map-reduce cuando la entrada no cabe en el modelo: resumen cada parte y luego resumen los resúmenes, por niveles si hace falta. Antes truncaban —de un log de CI enorme se resumía el principio y el resto se descartaba en silencio, que es justo donde suelen estar los errores— y ahora se lee entero. Si algún trozo se corta por max_tokens, el resultado lo avisa y el log registra finish_reason: length. Desde la 0.43.0 un parcial cortado ya no se da por bueno: se descarta, se parte el trozo (o el grupo del reagrupado) y se reintenta, hasta dos niveles; si aun así queda alguno cortado, el aviso dice qué trozo y sus líneas. Desde la 0.47.0 el reagrupado no repite rondas sin avanzar: si una ronda no reduce el material al menos un 20 % y las notas siguen sin caber en el paso final, se para y devuelve las notas agrupadas con un aviso, marcadas como truncadas (finish_reason: length, truncated_out). Y un diff unificado se resume en prosa, nunca «por secciones». Desde la 0.36.1, con un log que no cabe en una llamada, local_lint_summary da entrada solo a los diez ficheros más nombrados (y dice cuántos más hay), y las cifras del resumen final las pone el programa, no el modelo. Desde la 0.36.0 también local_commit_msg, local_explain_code (por def/class de primer nivel, con el inventario de nombres en el paso final) y local_extract (un objeto parcial por trozo y un paso final con schema que los combina) leen la entrada entera. Desde la 0.44.2, si tras trocear algún campo de local_extract queda null en todos los trozos, _local_delegate.chunked lo dice (pieces, null_fields, notice): ese null significa «no visto», no «no existe». Desde la 0.47.0 local_explain_code con question lleva la pregunta a cada trozo y, con path, comprueba al final las líneas que cita contra el fichero (avisa de las dudosas) y añade las apariciones exactas de cada identificador de la pregunta.

Configuración

Todo por variables de entorno; nada hardcodeado. Los ids de modelo default son solo eso — cámbialos por los de tu backend.

Variable

Default

Descripción

LOCAL_DELEGATE_BASE_URL

http://127.0.0.1:9292/v1

Endpoint OpenAI-compatible

LOCAL_DELEGATE_API_KEY

(vacío)

Bearer token, si tu endpoint lo exige

LOCAL_DELEGATE_BACKEND_ORIGIN

auto

local/remote fuerzan el origen del cómputo; auto lo deduce del host. Ponlo si llegas al backend por un túnel (ssh -L, port-forward): en loopback se vería como local

LOCAL_DELEGATE_TIMEOUT

180

Timeout HTTP (segundos)

LOCAL_DELEGATE_MAX_CONCURRENT_REQUESTS

2

Backpressure máximo por proceso; compartido por todos los clientes del daemon

LOCAL_DELEGATE_ASK

1

Preguntar al usuario (vía elicitation) en vez de fallar seco: backend caído, modelo fuera del catálogo, output_format vacío. 0 lo desactiva

LOCAL_DELEGATE_ASK_TIMEOUT

30

Segundos de espera por una respuesta; agotados, la tool sigue como si no hubiera preguntado

LOCAL_DELEGATE_LOG_DIR

(dir de datos de usuario)

Directorio de los usage-YYYYMM.jsonl rotados por mes y del clients.jsonl

LOCAL_DELEGATE_LOG

(vacío = rotación activa)

Si se fija, ruta de un usage.jsonl explícito sin rotar (compatibilidad)

LOCAL_DELEGATE_MACHINE_NAME

(nombre corto del equipo)

Nombre de esta máquina en el log de uso (host) y en la cabecera X-Local-Delegate-Host que va al backend; útil si dos equipos se llaman igual

LOCAL_DELEGATE_MODEL_MECHANICAL

gemma3-4b

Modelo para clasificar/extraer/resumen corto

LOCAL_DELEGATE_MODEL_LONG

gemma4-26b-a4b

Modelo para documentos largos

LOCAL_DELEGATE_MODEL_CODE

qwen36-35b-a3b

Modelo para código

LOCAL_DELEGATE_MODEL_VISION

gemma4-12b

Modelo de visión para local_describe_image

LOCAL_DELEGATE_MAX_IMAGE_MB

8

Tope de tamaño de imagen para local_describe_image

LOCAL_DELEGATE_DUMP_CHUNK_NOTES

(vacío: apagado)

Carpeta local donde cada operación troceada deja la salida de cada paso; solo para medir, nunca sale de la máquina

LOCAL_DELEGATE_LONG_INPUT_CHARS

6000

Umbral mecánico↔largo

LOCAL_DELEGATE_CHUNK_CHARS

3500

Tamaño de trozo al partir documentos largos (local_translate, local_delegate)

LOCAL_DELEGATE_CHUNK_MAX_TOKENS

2048

Techo de max_tokens por trozo

LOCAL_DELEGATE_CHUNK_MIN_CHARS

400

Trozo mínimo: por debajo ya no se vuelve a partir

LOCAL_DELEGATE_JSON_SCHEMA

auto

response_format con schema en local_extract: auto/on/off

LOCAL_DELEGATE_FEEDBACK

1

Línea de ahorro anexada al resultado cuando source=path (0 la apaga). En local_extract no se anexa al texto —rompería el JSON—: va dentro de _local_delegate

LOCAL_DELEGATE_ALLOWED_DIRS

(vacío = sin restricción)

Raíces permitidas para path, separadas por ;

LOCAL_DELEGATE_WEB

1

Web embebida del modo stdio (0 para desactivarla). Desde la 0.42.0 pide el token de LOCAL_DELEGATE_WEB_TOKEN si está puesto, igual que el daemon

LOCAL_DELEGATE_WEB_HOST / _PORT

127.0.0.1 / 9393

Host/puerto de la web o del daemon. Vacía cuenta como no puesta

LOCAL_DELEGATE_WEB_ALLOWED_HOSTS

(vacío)

Nombres extra que el puerto admite en la cabecera Host, separados por comas (p. ej. el de tailscale serve). Por defecto solo loopback y WEB_HOST, contra el DNS rebinding (desde la 0.42.0: sin ella, entrar por otro nombre da 421); * desactiva la comprobación

LOCAL_DELEGATE_WEB_FONTS

1

Tipografía de marca desde Google Fonts (0 = cero peticiones a terceros)

LOCAL_DELEGATE_AUTOSTART

0

Auto-arranque de llama-swap (opt-in)

LLAMASWAP_EXE / LLAMASWAP_CONFIG / LLAMASWAP_LISTEN

—

Solo si AUTOSTART=1; LLAMASWAP_CONFIG además activa el turno y la afinidad del daemon (con el extra [llamaswap]). LLAMASWAP_EXE tiene que ser una ruta absoluta a un fichero que exista (si no, avisa y no arranca); sin ella, llama-swap se busca solo en las carpetas absolutas del PATH, nunca en la carpeta actual (desde la 0.44.0)

LLAMASWAP_WATCH_CONFIG

0

1 añade -watch-config al backend autoarrancado

LOCAL_DELEGATE_FALLBACK

1

Respaldo entre modelos: si el modelo de un rol falla por su culpa, responde el siguiente de su cadena (_MAX_HOPS=2; cadenas con _<ROL>, ver la wiki). 0 lo apaga

LOCAL_DELEGATE_COOLDOWN

1

Enfriamiento por modelo: 3 fallos seguidos (_FAILURES) lo paran 120 s (_S), doblando hasta 900 s (_MAX_S). 0 lo apaga

LOCAL_DELEGATE_BACKEND_BREAKER

1

Corte por backend inalcanzable: 3 fallos de conexión seguidos (_FAILURES) hacen que las local_* respondan al momento «backend inalcanzable, hazlo tú» durante 60 s (_S), doblando hasta 600 s (_MAX_S), sin contar como delegación; al vencer, la siguiente llamada prueba. 0 lo apaga

LOCAL_DELEGATE_COST_FALLBACK

(vacío = claude-opus-5-5 en subagente)

Con qué modelo e hilo se valora una delegación sin modelo atribuido: modelo o modelo:main|subagent. Un valor inválido no rompe nada: el panel usa el declarado y lo dice

LOCAL_DELEGATE_COMMIT_LANGUAGE

(vacío = el idioma vigente)

Idioma del mensaje de local_commit_msg: es, en, fr, pt, de, it o un nombre libre. Vacío: el idioma vigente del producto; diff: el idioma predominante de los textos del diff

LOCAL_DELEGATE_OUTPUT_LANGUAGE

(vacío = el idioma vigente)

Idioma en que las tools de texto libre (local_summarize, local_lint_summary, local_explain_code, local_describe_image) piden responder al modelo: fr, pt, português… No cambia la interfaz ni local_commit_msg

LOCAL_DELEGATE_TURN_MAX_S

600

Turno del daemon entre modelos que chocan en llama-swap: si la primera de la cola lleva estos segundos esperando y el daemon lleva otros tantos sin que empiece ni termine ninguna llamada al backend, se le concede el turno igual (turn: "forced" en el log)

LOCAL_DELEGATE_TURN_YIELD_S

120

Cesión del turno entre trozos: si la primera de la cola lleva estos segundos esperando un modelo que choca con el de una operación que tiene el turno desde hace otro tanto, esa operación lo suelta antes de su siguiente trozo y vuelve al final de la cola (turn_yields en el log). Coste: como mucho una pareja de cargas de modelo cada este tiempo cuando dos operaciones largas chocan. 0 lo desactiva

LOCAL_DELEGATE_CALL_MAX_S

1800

Plazo propio del daemon para una llamada, cola incluida: al pasarlo se cancela y queda en el log como fallo (cancel_reason: "deadline"). 0 lo desactiva

LOCAL_DELEGATE_PROGRESS_INTERVAL_S

20

Cada cuántos segundos una llamada viva manda notifications/progress con su fase (puesto en la cola, plaza, trozo k/N), para que el cliente no la corte por inactividad (Claude Code: 300 s). 0 lo desactiva

LOCAL_DELEGATE_QUEUE_MAX_WAIT_S

900

Máximo de segundos que quien espera turno o plaza aguanta sin que la cola avance (una cola lenta que avanza no corta a nadie): al pasarlo la llamada falla en el acto con «cola saturada» (error: "queue_saturated"). 0 lo desactiva

LOCAL_DELEGATE_SLOW_THRESHOLD

0.5

Una llamada es «lenta» (slow en el log, «lento ×0,37» en el panel) si genera a menos de esta fracción de la velocidad normal de su modelo

LOCAL_DELEGATE_AFFINITY_MARGIN_S

5

Afinidad: un modelo ya cargado solo se aprovecha si le quedan al menos estos segundos de TTL

LOCAL_DELEGATE_BACKEND_PARAMS

(vacío)

Override puntual, clave a clave, de los parámetros por rol de backend-params.json (muestreo y razonamiento): rol.clave=valor;…, p. ej. code.top_k=20. Exige reiniciar el daemon; el fichero no

Los parámetros por rol que viajan en cada petición al backend (top_k, temperature, enable_thinking con su presupuesto…) se guardan en backend-params.json y se editan con local-delegate backend-params show|set|unset|reset; la lista cerrada de claves, la precedencia y el razonamiento están en la wiki.

La métrica de ahorro

El MCP registra cada llamada en un log rotado por mes y sirve un dashboard en http://127.0.0.1:9393, con selector de rango y visibilidad de delegaciones en curso. El contexto conservado = la entrada leída server-side (llamadas con source=path que salieron bien) menos lo que la tool te devolvió, contada una vez por delegación aunque el MCP la trocee. Se mide en caracteres y se pasa a tokens de Claude con una tabla de densidad medida por familia de tokenizador y tipo de contenido (prosa, código, log, datos estructurados, diff): un .md no cuenta lo mismo que un .json, y Haiku 4.5 no cuenta como Opus 5.5. Las imágenes salen de esa cifra —sin sus dimensiones no hay forma de saber cuántos tokens le costarían a Claude— y se enseñan aparte. Enfrente, el coste local = los tokens que consumió de verdad tu GPU sumando todas las llamadas: una delegación troceada repite el prompt de sistema en cada trozo, y esa diferencia es lo que costó trocear. Ahí se usa el token real que reporta el backend; chars ÷ 4 es solo el respaldo del modelo local cuando no lo da. Detalle en la wiki.

El panel enseña además un equivalente estimado a precio de API: lo que costaría ese mismo contexto leído por Claude a precio de lista, entre una cota baja y una estimación que cuenta las peticiones en las que ese contenido se habría vuelto a leer de la caché. No es dinero que hayas ahorrado: tu suscripción es de tarifa plana. Es una estimación con supuestos a la vista (con qué modelo se atribuye cada delegación, cuántas peticiones siguieron, qué densidad se usó) y no descuenta las relecturas del mismo fichero. Junto a ella, un bloque de cuota que sale «sin calibrar» hasta que hay al menos tres medidas del statusline de ventanas distintas, y nunca enseña un porcentaje sin esa calibración. Para atribuir el histórico y alimentar esos dos bloques, lanza de vez en cuando local-delegate recompute-cost (lee tus transcripts en local y escribe solo agregados); doctor avisa si hay delegaciones a punto de quedarse sin transcript.

Las pruebas no cuentan: las delegaciones del cliente mcp de los scripts, las de bancos y las que caen en una ventana de prueba se apartan del panel y de local_status. Antes de probar en vivo contra el MCP o el daemon, marca el intervalo y guarda el id que imprime:

local-delegate test-window start --label "prueba del lunes"   # imprime el id
local-delegate test-window stop <id>
local-delegate test-window list                               # ventanas y filas en cada una

El botón Pruebas de la barra del panel las vuelve a enseñar; su ⓘ dice cuántas quedaron fuera.

El panel sale en español o en inglés según el idioma de tu navegador, y el selector ES/EN de su cabecera lo cambia (se recuerda en ese navegador). Ver Savings & metrics.

Los rangos, los días del gráfico y las horas de la tabla usan tu zona horaria (el log se escribe en UTC, que es un instante sin ambigüedad; la conversión es de presentación). El dashboard también separa dónde corrió el cómputo: local si el backend escucha en loopback, remote si la inferencia se fue a otra máquina —por ejemplo esta Mac usando la GPU de la PC—. Los eventos anteriores a la v0.11.0 no traen el campo y aparecen como n/d.

Alcance / no-objetivos

local-delegate es deliberadamente texto/imagen→texto: arma el prompt (o el payload multimodal), hace POST a /chat/completions y devuelve solo texto. Cosas que no hace a propósito:

  • Tool-calling local. Los modelos locales no invocan herramientas ni ejecutan código; eso lo sigue haciendo Claude. Añadirlo convertiría este paquete en un orquestador paralelo, que no es el objetivo.

  • Generación o edición de imágenes. local_describe_image es solo imagen→texto (describir, leer texto visible, responder una pregunta puntual); nada de generar ni editar imágenes.

  • Audio. Para transcripción usa el companion whisper-transcribe-mcp en vez de intentar meter audio aquí.

  • Sustituir la suscripción. El objetivo es conservar cuota delegando pasos mecánicos acotados, no enrutar todo el trabajo a modelos locales.

Integración con el cliente: hooks, skill y memoria

local-delegate install deja lista la integración completa en tu HOME:

Componente

Dónde

Qué hace

Entrada MCP

config de Claude Code / ~/.codex/config.toml / ~/.config/opencode/opencode.json[c]

registra el servidor (stdio con uvx o HTTP contra el daemon)

Hooks

plugin de Claude Code local-delegate@local-delegate (o ~/.claude/hooks/local-delegate/ + settings.json)

sugieren delegar; los de lectura además pueden rechazar una lectura completa de documentación, si se enciende; uno anota qué agente pidió cada delegación

Skill

~/.claude/skills/local-delegation/ y ~/.config/opencode/skill/local-delegation/

regla de oro y catálogo de tools

Memoria

bloque gestionado en ~/.claude/CLAUDE.md, ~/.codex/AGENTS.md y ~/.config/opencode/AGENTS.md

la regla en una nota corta siempre cargada

Por defecto se configuran solo los clientes que tengas instalados; se elige a mano con --clients claude|codex|opencode. Los hooks son solo de Claude Code: opencode extiende con plugins en TypeScript, que es otra superficie, y Claude Desktop no tiene hooks en absoluto. Cada pieza se puede excluir (--no-hooks, --no-skill, --no-memory, --no-mcp).

Todo sale en español o en inglés. install y update guardan el idioma de la sesión en que corren (LOCAL_DELEGATE_LANG=es|en, o el del sistema) en language.json, para que el daemon y los hooks lo usen también, y escriben la skill, el bloque de memoria y el catálogo de los subagentes en ese idioma. Precedencia y cómo volver a seguir al sistema: Idioma.

Actúan solos tres hooks: UserPromptSubmit (intenciones mecánicas), SubagentStart (le recuerda a cada subagente cargar las tools local_* y leer por rangos) y record_call.py (PreToolUse sobre las tools de local-delegate), que no avisa ni bloquea: anota qué agente pidió cada delegación y con qué esfuerzo, para atribuir el coste equivalente a su modelo. Los dos de lectura —PreToolUse/Read y PreToolUse/Bash|PowerShell— quedan apagados salvo --enable-read-hook, que los enciende juntos (--disable-read-hook o uninstall los apagan). Van juntos porque son una regla sola sobre dos caminos: cerrar la tool Read y dejar cat informe.md abierto no cambia la conducta, la muda de sitio. Con una imagen grande que acepta local_describe_image (.png, .jpg, .gif, .webp) el aviso recomienda esa tool con path, no una lectura por rangos; .svg, .bmp, .ico, las imágenes pequeñas, los .pdf y los .ipynb pasan en silencio.

Esos dos avisan; rechazar una lectura es otra cosa y viene aparte y apagada (LD_HOOK_READ_BLOCK). Solo alcanza a la lectura completa de un .md o un .txt grande, con el backend local respondiendo, y el mensaje del rechazo nombra la tool que sirve y la salida de emergencia: leer por franjas nunca se bloquea. El motivo de que exista es que está medido —cuatro veces— que sugerir no cambia la conducta. Ver Instalación de la integración y docs/recipes/claude-code-hooks.md.

Plugin de Claude Code, comandos del mod y Claude Desktop

Desde la 0.40, con Claude Code 2.1.292 o posterior instalado con uv tool, install entrega los hooks como un plugin (local-delegate@local-delegate) en vez de escribirlos en settings.json, y migra sola una instalación anterior conservando el bloqueo de lectura. Si no se cumplen las condiciones, sigue con settings.json y dice por qué; --claude-delivery settings vuelve atrás a mano y update lo respeta. El MCP no va dentro del plugin.

El plugin trae además un mod, que corre dentro de Claude Code sin gastar turnos del modelo:

  • /local-summarize <ruta>, /local-commit (propone el mensaje desde git diff --cached; solo lo muestra) y /local-lint <fichero|comando> llaman a la tool local directamente.

  • Deja fijas local_summarize, local_extract, local_lint_summary y local_commit_msg, para que el modelo no tenga que buscarlas con ToolSearch.

  • Pone sobre el prompt una banda con el estado de local-delegate en la sesión: en la terminal, una barra de una fila con fondo y una etiqueta de estado (● LISTO, ◐ DELEGANDO, ○ CAÍDO), el modelo, la tool en curso con su trozo (7/9) y lo que lleva (3 min 16 s), las delegaciones y el ahorro de la sesión y el modo de lectura (opción status_style: bar o line, una raya sobre una línea); en Claude Desktop, una sola línea de texto en dos tonos, sin píldora ni enlace. Desde la 0.45.0, con varias delegaciones a la vez nombra primero la que procesa el backend y, si todas esperan, la más antigua con su espera (en cola · 4 min 0 s). Una delegación que espera a que llama-swap cambie de modelo dice ◐ ESPERANDO BACKEND con el modelo que pidió, no el cargado. Se refresca sola cada segundo mientras hay una delegación en curso. La cuota de Claude no va aquí: es de la status line.

  • Desde la 0.41, el mod de lectura (encendido por defecto, opción read_mod_enabled) resume con local_summarize la prosa grande que se lee entera y entrega el resumen como resultado de la propia tool; con diálogo pregunta antes. Tras un resumen, escribir en ese fichero se rechaza hasta leerlo de verdad. Mientras actúa, los hooks de lectura de la sesión se apartan. Para decidir qué lee cada llamada le pregunta al daemon, sin arrancar procesos (la sobrecarga medida por llamada Bash queda dentro del ruido). Sin valor guardado cuenta como encendido; si lo apagaste en la 0.40.0, se vuelve a encender en el menú de configuración del plugin. Desde la 0.44.2 una lectura por rango pasa siempre literal en un subagente (sin gastar el margen del 80 % del hilo principal), en un fichero corto (200 líneas o menos y menos de 32 KB) y cuando el rango empieza después de la última línea.

  • Tras actualizar, abre una sesión nueva de Claude Code: los mods se cargan al empezar la sesión.

En Windows, install --desktop añade el chat de Claude Desktop: escribe una entrada que lanza local-delegate desktop-bridge, un puente stdio hacia el daemon que lee el token él mismo, porque Desktop no pasa su entorno a los MCP. Para bajar a la 0.39, uninstall antes. Todo el detalle en Entrega por plugin de Claude Code.

Groups de llama-swap (opcional)

Con pip install "local-delegate-mcp[llamaswap]" quedan disponibles los CLIs para gestionar groups de llama-swap (un pool que se turna y, solo si lo pides, un modelo que se queda cargado) con guardrail de VRAM y RAM de sistema incorporado (--ram-gb es opcional: llama-server mapea el GGUF también en RAM aunque el cómputo sea 100% GPU, así que un catálogo que cabe en VRAM puede igual agotar la RAM en máquinas con menos de 32 GB):

local-delegate check-llamaswap --config config.yaml --vram-gb 16 --ram-gb 32
local-delegate init-llamaswap --config config.yaml --swap gemma3-4b,gemma4-26b-a4b,qwen36-35b-a3b --vram-gb 16 --ram-gb 32
local-delegate llamaswap residency            # qué se queda cargado y con qué TTL; no escribe
local-delegate llamaswap residency --none --ttl gemma3-4b=120   # volver a «ningún residente»

Lo recomendado es ningún residente: con el turno del daemon, los modelos que chocan se reparten el backend sin pelearse, y un modelo ya cargado se aprovecha cuando hay una celda aprobada para esa tool (ver Tools). La residencia es opt-in: init-llamaswap --resident ID o llamaswap residency --pin ID dejan ese modelo en un grupo persistent con ttl: 0, y retiene su VRAM de forma permanente (--pin pide la VRAM medida de cada modelo con --vram-model ID=GiB y se niega si no cabe junto al peor caso del resto). --ttl-resident vale 0 por defecto: con persistent y un TTL mayor que 0 el modelo se descarga igual y no hay residencia de verdad.

El paquete nunca toca tu config.yaml por su cuenta — estos comandos solo corren si vos los invocás. init-llamaswap corre el/los guardrail(es) antes de escribir (no escribe nada si no cabe en VRAM o, si pasaste --ram-gb, en RAM) y nunca sobreescribe sin --force (dejando una copia <config>.<AAAAMMDD-HHMMSS>.bak). llamaswap residency edita solo las líneas que cambian, deja la misma copia con fecha, no escribe con delegaciones en curso (salvo --now) y dice qué hizo llama-swap con la recarga. Detalle completo, semántica de groups verificada contra el código de llama-swap, y ritual de aplicación en docs/recipes/llama-swap-groups.md.

Enlaces

Available Tools

11 tools
local_boilerplateA

Generates boilerplate code from a specification, with a local code model.

**Writes the code to `target`** and returns only a two-line receipt (path, size). The generated
code never enters your context: that is where the saving is, and that is why `target` is not
optional. To see it, open the file; to use it, it is already in place.

Args:
    spec: Description of what the code must do.
    language: Programming language (e.g. 'python', 'typescript').
    target: ABSOLUTE path of the file to write. Missing directories are created.
    overwrite: Overwrite `target` if it already exists. By default it fails, and it fails
        BEFORE generating anything.
NameRequiredDescriptionDefault
specYes
targetYes
languageYes
overwriteNo

Output Schema

NameRequiredDescription
resultYes

TDQS

A4.5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes well beyond the annotations, which only say readOnly=false, destructive=false, idempotent=false. The description discloses that output is a two-line receipt rather than code, that generated content never enters context, that missing directories are created, and that failure on an existing target happens BEFORE generation. That ordering detail is genuinely useful behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the key constraint with bold emphasis, and the Args block is tight and scannable. The 'that is where the saving is' sentence is slightly rhetorical but does justify why target is required, so it roughly earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

A mutation tool with a schema, annotations, and an output schema. The description covers the write behavior, the receipt-only return, directory creation, and overwrite failure ordering, so an agent can call it correctly with no further inference.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description carries the full burden and does so: it defines spec, language, target (absolute path, missing dirs created), and overwrite (default failure semantics and pre-generation check). That is a complete contract for all four parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (generates), a specific resource (boilerplate code), and names the mechanism (a local code model), which cleanly separates it from siblings like local_translate or local_summarize. An agent knows exactly what this tool produces without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains the rationale for `target` being mandatory and tells the agent to open the file to see the code, which implies the intended workflow. However, it never states when to choose this over alternatives such as local_delegate, nor any explicit exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

local_classifyB
Read-only

Classifies a text into ONE of the given labels, with a local model.

Returns exactly one label from the list, with no additional text.

Args:
    text: Text to classify.
    labels: List of candidate labels.
NameRequiredDescriptionDefault
textYes
labelsYes

Output Schema

NameRequiredDescription
resultYes

TDQS

B3.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and openWorldHint=false, which the phrase 'with a local model' reinforces consistently. The description adds the useful output contract ('returns exactly one label... with no additional text'), though an output schema exists, so this is partially redundant.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the purpose, then the return contract, then the args — no wasted sentences. The return statement is slightly redundant given an output schema exists.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple two-parameter read-only classification tool with an output schema present, the description covers purpose, return shape, and both parameters. Only the missing when-to-use guidance against siblings keeps it from being fully complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must carry the parameter burden; it does list both args and glosses them ('text: Text to classify', 'labels: List of candidate labels'). However it adds no format guidance beyond the schema types, e.g. whether labels must be unique or non-empty.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (classifies) and resource (text) plus the constraint that output is ONE of the provided labels, using a local model. It does not explicitly differentiate itself from siblings like local_extract or local_summarize, though the label-constrained framing is distinctive enough to infer.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No statement of when to pick this tool over the ten sibling local_* tools, and no exclusions or prerequisites. The agent must infer usage entirely from the name and purpose sentence.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

local_commit_msgA
Read-only

PREFER this tool over reading the file with Read when the file is large (>200 lines / >10 KB) and you only need a commit message, not the literal content.

Drafts a commit message from a diff, with a local code model.

Pass 'path' to a diff file (e.g. the output of `git diff` dumped to a file) and it is read
server-side, so the full diff does NOT enter Claude's context. Alternatively pass 'diff' as
text. ALWAYS review the message before using it.

Args:
    diff: The diff as text (use this or 'path').
    path: Path to a file with the diff (read server-side).
    style: 'conventional' (Conventional Commits) or 'plain'.
NameRequiredDescriptionDefault
diffNo
pathNo
styleNoconventional

Output Schema

NameRequiredDescription
resultYes

TDQS

A4.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and openWorldHint=false, and the description adds genuinely new context: the file is read server-side so the diff never enters Claude's context, and the output must always be reviewed. It does not describe latency/quality limits of the local model, but with these annotations this is strong.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the PREFER routing rule, then the action, then the args list. Every sentence earns its place; slightly long but no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need no explanation. Combined with routing guidance, both input modes, the style options, and the review caution, an agent has everything needed to invoke it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% and the schema has no enum, so the description carries the whole burden — and it does: diff is text, path is a server-read file (mutually exclusive with diff), and style takes 'conventional' or 'plain', an enum the schema itself lacks.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Specific verb+resource: drafts a commit message from a diff using a local code model. It also names what it is not (a way to read contents), so an agent can separate it from local_summarize / local_explain_code without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says PREFER this over reading the file with Read when the file is large (>200 lines / >10 KB) and only a commit message is needed. Names the alternative tool and the exact condition that selects this one, plus a review-before-use rule.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

local_delegateA
Read-only

Generic escape tool: delegates a text->text task to a local model.

Use it when no specific tool fits. Builds the prompt with guardrails and returns text.

With long inputs it splits the input at natural boundaries (Markdown headers, paragraphs),
applies the SAME task to each chunk and concatenates the outputs in order. That is right for
transforming the whole text (translate, rewrite, reformat) but NOT for reduction tasks over the
whole (counting, picking the maximum, a single global summary): for those pass `chunk='off'` or
use `local_summarize`.

Args:
    task: Task instruction (one sentence with an explicit output format).
    input: Content to operate on.
    output_format: Exact expected output format.
    model: Model to use; one of the ids configured in the catalog. Defaults to the mechanical one.
    chunk: 'auto' (splits only if the input is long), 'on' (splits whenever possible),
        'off' (a single call; a long input may come back truncated).
NameRequiredDescriptionDefault
taskYes
chunkNoauto
inputYes
modelNo
output_formatYes

Output Schema

NameRequiredDescription
resultYes

TDQS

A4.9/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only cover readOnlyHint/openWorldHint; the description goes well beyond them by disclosing the chunking algorithm (splits at Markdown headers/paragraphs), the ordering guarantee (concatenates outputs in order), and the concrete failure mode (a long input may come back truncated with chunk='off'). That is the exact behavioral context an agent needs before invoking.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded one-line purpose, then a usage paragraph, then a compact Args block; every section does work. It is slightly longer than strictly necessary (the Args list restates parameter names), but given 0% schema coverage that repetition is functional rather than padding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Output schema exists, so return-value explanation is correctly omitted. For a 5-parameter tool with no schema descriptions and no enum metadata, the description supplies chunking behavior, truncation risk, model default, and sibling routing — nothing an agent needs to call it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description carries the full burden, and it does: task is defined as a one-sentence instruction with an explicit output format, input as the content, output_format as the exact expected format, model's default and provenance, and chunk's three enum values are each given semantics. This fully compensates for the empty schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first line states a specific verb and resource ('delegates a text->text task to a local model') and explicitly frames itself as the generic fallback ('escape tool'). It also names a sibling (local_summarize) and the condition that routes away from it, so an agent can place it against the ten other local_* tools without opening schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit when-to-use ('when no specific tool fits'), explicit when-not (reduction tasks over the whole text: counting, maximum, single global summary), and names both escapes: pass chunk='off' or use local_summarize. The chunk mode tradeoff (correct for transforms, wrong for reductions) is spelled out rather than implied.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

local_describe_imageA
Read-only

PREFER this tool over attaching or reading the image yourself when you only need a description, the visible text (simple OCR) or a specific answer about an image, not the image itself in your context.

Describes an image (or answers a question about it) with a local vision model. The image is
read server-side: it NEVER enters Claude's context, only the text answer comes back.

Scope guardrail: ONLY image->text (describe, read visible text, answer a specific question
about the image). This tool NEVER generates or edits images.

Args:
    path: Path to the image (png/jpg/jpeg/webp/gif), read server-side.
    question: Concrete question or focus about the image (optional; by default it describes
        it).
    max_words: Maximum length of the answer in words.
NameRequiredDescriptionDefault
pathYes
questionNo
max_wordsNo

Output Schema

NameRequiredDescription
resultYes

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and openWorldHint=false, but the description adds critical behavior the annotations cannot convey: the image is read server-side and NEVER enters Claude's context, only the text answer returns, and it never generates/edits images. This context-channel disclosure is exactly the kind of trait structured fields can't express.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the most decision-relevant guidance (the PREFER clause) and then explains mechanics and scope. Efficient overall, though the preamble plus separate scope-guardrail sentence is slightly redundant and could be tightened.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present, return values need not be described, and the description fully covers the input channel, scope, and when-to-use. Nothing an agent needs to select and invoke this tool correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, and it documents all three parameters with added meaning: accepted formats (png/jpg/jpeg/webp/gif) for path, the optional/default behavior of question, and the semantic of max_words. It does not restate the numeric default (200) or the null default, which remain in the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ('Describes an image or answers a question about it with a local vision model') and explicitly bounds scope with a guardrail ('ONLY image->text... NEVER generates or edits images'). Though the sibling tools (local_summarize, local_translate, etc.) are not image-oriented, the description still makes the image->text boundary unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says when to prefer this tool ('over attaching or reading the image yourself when you only need a description, the visible text... or a specific answer') and when not to (when you need the image itself in context). The scope guardrail further clarifies the class of tasks it handles.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

local_explain_codeA
Read-only

PREFER this tool over reading the file with Read when the file is large (>200 lines / >10 KB) and you only need an explanation, not the literal content.

Explains in prose what a code snippet/file does, with a local code model.

Pass 'path' to read the file server-side (the full code does NOT enter Claude's context; only
the explanation comes back) or 'code'. Optionally focus the explanation with 'question'.
With 'path' the model sees the file's line numbers, so it can answer where something is
("name: line") and you can then Read only that range with offset/limit. With 'path' and a
'question', the server then checks those numbers against the file: cited lines that do not
contain what they are cited for get a warning, and each code identifier of the question
(`name`, name(), camelCase, snake_case) gets its exact lines, found by whole-word search.
Review the explanation: a local model writes it; the occurrence lines are exact.

Args:
    code: Code to explain (use this or 'path').
    path: Path to a code file (read server-side).
    question: Concrete question or focus (optional).
NameRequiredDescriptionDefault
codeNo
pathNo
questionNo

Output Schema

NameRequiredDescription
resultYes

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes well beyond the readOnlyHint/openWorldHint annotations: it discloses that the file is read server-side so the full code does NOT enter context, that a local model (not Claude) writes the explanation, and that with 'path'+'question' the server verifies cited line numbers and emits warnings for mismatches. What is missing is failure behavior (e.g., path not found, model error) and whether warnings change the return shape.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The PREFER directive is correctly front-loaded, but the body repeats itself: the local-model caveat appears twice ('with a local code model' and 'a local model writes it'), and the server-side/no-context fact is restated in the Args block. The dense multi-clause sentences about line-number verification are informative but hard to parse on one pass.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 3-parameter, non-destructive tool with an output schema (so return values need no explanation), the description covers selection criteria, parameter behavior, context/privacy implications, and output trust caveats. An agent has everything needed to choose it and call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage the description must carry the burden and largely does: it explains what each of code/path/question means and, crucially, the behavioral consequences of 'path' (server-side read, line numbers visible) and of 'question' (citation verification, identifier occurrence lookup). The gap is that all 3 params are optional and the description never states what happens if neither 'code' nor 'path' is supplied, nor that they are mutually exclusive.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence gives a specific verb and resource ('Explains in prose what a code snippet/file does') plus the mechanism ('a local code model'). It also distinguishes itself from a non-sibling alternative (Read) and implicitly from the local_summarize/local_delegate family by framing itself as code explanation with line-citation output.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit when-to-use ('PREFER this tool ... when the file is large (>200 lines / >10 KB) and you only need an explanation, not the literal content') with concrete thresholds and a named alternative (Read) plus the condition that selects it. It also implies when-not: when the literal content is what you need.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

local_extractA
Read-only

PREFER this tool over reading the file with Read when the file is large (>200 lines / >10 KB) and you only need structured fields, not the literal content.

Extracts structured fields from a text/file as JSON, with a local model.

Pass 'path' to read the file server-side (spends no Claude context) or 'text'. Returns an
object with exactly the requested keys, already validated: the caller does not have to parse
a string. What is not data travels under the reserved key `_local_delegate` (`truncated` and
`warning`, `read_server_side`, `fallback`, or `error` and `raw`); with chunked input, `chunked`
says how many pieces there were and which fields stayed null in all of them. Routes
automatically to the mechanical model (short inputs) or to the long-context model (large
documents): the size probe uses file bytes for 'path' and characters for 'text' (~5-10%
difference in UTF-8, acceptable).
By default it asks the backend for schema-constrained JSON (`LOCAL_DELEGATE_JSON_SCHEMA=auto`);
if the backend does not support it, it retries in free mode.

Args:
    fields: Names of the fields to extract (JSON keys).
    text: Source text (use this or 'path').
    path: Path to a source file (read server-side).
NameRequiredDescriptionDefault
pathNo
textNo
fieldsYes

Output Schema

NameRequiredDescription

No output parameters

TDQS

A4.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes well beyond the readOnlyHint/openWorldHint annotations: discloses that server-side reads spend no Claude context, that output is validated to exactly the requested keys, that non-data travels under the reserved `_local_delegate` key (truncated, warning, read_server_side, fallback, error/raw), chunking behavior with per-field nulls, and the JSON-schema-then-free-mode retry. The only gap is that the LOCAL_DELEGATE_JSON_SCHEMA env-var detail and the ~5-10% UTF-8 size-probe caveat are more implementation trivia than agent-actionable behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the routing directive, then behavior, then an Args block — good structure and no wasted framing. A few clauses (the size-probe byte-vs-character note, the env-var name) are internal detail an agent cannot act on and could be trimmed.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Even though an output schema exists and return values needn't be explained, the description covers input modes, output shape, error/fallback signaling, chunking, and model routing. Nothing an agent needs in order to call it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage the description must carry the load, and it does: 'fields' is defined as the JSON keys to extract, 'text' as source text, 'path' as a server-side-read file path, with an explicit 'use this or path' exclusivity hint. It stops short of stating what happens if both are supplied or neither is, which is the one ambiguity left.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ("Extracts structured fields from a text/file as JSON") plus the mechanism ("with a local model"), and explicitly distinguishes itself from the general file-reading path. An agent can tell this apart from local_summarize or local_classify without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Front-loads an explicit routing rule: prefer this over Read when the file is large (>200 lines / >10 KB) and only structured fields are needed rather than literal content. Both the when and the when-not are named, along with the alternative tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

local_lint_summaryA
Read-only

PREFER this tool over reading the file with Read when the file is large (>200 lines / >10 KB) and you only need a grouped summary, not the literal content. If you ran a command with long output, dump it to a file and pass 'path'.

Summarizes linter/test/CI output with a local model, without spending Claude's context.

Meant for long, noisy logs (ESLint, clippy, pytest, tsc, CI). Pass 'path' and the file is read
server-side, so the full log does NOT enter Claude's context: only a summary grouped by file
comes back, with the count per error type/rule and the most important first. Alternatively
pass 'text'. Routes automatically to the mechanical model (short) or the long-context model
(long).

Args:
    path: Path to the lint/test output file (read server-side). Use this or 'text'.
    text: Lint/test output as text.
    max_words: Maximum length of the summary in words.
NameRequiredDescriptionDefault
pathNo
textNo
max_wordsNo

Output Schema

NameRequiredDescription
resultYes

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only cover readOnlyHint/openWorldHint, but the description discloses substantial extra behavior: the file is read server-side, the raw log never enters Claude's context, output is grouped by file with per-rule counts, most important first, and it auto-routes between a mechanical and long-context model.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the key selection rule ('PREFER this tool over reading the file with Read...') before elaborating. It is a bit long and the Args section partly repeats schema titles, but every major sentence adds usable context.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists so return values need not be described, and the description covers selection criteria, input modes, server-side reading, and routing. Nothing an agent needs in order to call it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must compensate, and it does for path (read server-side) and text (alternative input), including their mutual exclusivity. max_words is only restated in the args list with no added nuance, so it falls slightly short of full compensation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (Summarizes) and resource (linter/test/CI output) and immediately differentiates itself from reading files with Read. An agent can distinguish it from siblings like local_summarize or local_extract without opening schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states when to prefer this tool ('large file >200 lines / >10 KB and you only need a grouped summary, not the literal content') and names the alternative (Read). It also gives routing guidance (path vs text, automatic model selection), leaving nothing to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

local_statusA
Read-only

Read-only diagnostics of the local backend and the model catalog.

Use it to find out which local models are available and to check that the backend is alive
before delegating in bulk, or to diagnose why a local_* tool failed.
NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription
resultYes

TDQS

A4.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety and locality are covered. The description adds the useful behavioral framing that it is a diagnostic/precondition probe and a failure-triage entry point. It does not mention cost, latency, or caching, so it stops short of full disclosure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences and a bulleted intent list, front-loaded with the one-line purpose before the usage cases. Nothing is padded and every clause carries information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter, read-only probe with annotations covering safety and an output schema covering the return shape, the description supplies everything an agent needs: what it inspects, when to call it, and that it serves as a diagnostic for the sibling local_* tools.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool takes zero parameters, so per the rubric the baseline is 4; there is no parameter meaning for the description to add or omit.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource+scope: 'Read-only diagnostics of the local backend and the model catalog.' This clearly separates it from the sibling local_* action tools (classify, summarize, delegate, etc.), which perform work rather than report state.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives three concrete when-to-use conditions: discover which local models exist, verify the backend is alive before bulk delegation, and triage a failed local_* tool. It effectively routes the agent to this tool as the precondition check for the other local_* siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

local_summarizeA
Read-only

PREFER this tool over reading the file with Read when the file is large (>200 lines / >10 KB) and you only need a summary, not the literal content.

Summarizes text or the content of a file with a local model, without spending Claude's context.

Use it to summarize large files/documents: pass 'path' and the file is read server-side, so
the full content does NOT enter Claude's context (only the short summary comes back).
Alternatively pass 'text'. Routes automatically to the mechanical model (short inputs) or to
the long-context model (large documents).

Args:
    text: Text to summarize (use this or 'path').
    path: Path to a file whose content is summarized (read server-side).
    max_words: Maximum length of the summary in words.
    focus: Optional. What you care about in the document (e.g. "configuration figures",
        "risks"): the summary prioritizes it and keeps its concrete data verbatim.
NameRequiredDescriptionDefault
pathNo
textNo
focusNo
max_wordsNo

Output Schema

NameRequiredDescription
resultYes

TDQS

A4.9/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only declare readOnlyHint and openWorldHint; the description adds genuinely non-obvious behavior: the file is read server-side so content does NOT enter Claude's context, and routing is automatic between a mechanical model (short inputs) and a long-context model (large documents). These are substantive operational traits not derivable from structured fields.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the decision rule, then the mechanism, then the args block. The context-saving point is restated twice ('without spending Claude's context' / 'does NOT enter Claude's context'), which is mild redundancy, but the structure is clean and each section is useful.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present, the description need not describe the return value, and it covers everything else an agent needs: when to choose it, both input modes, the server-side read, routing, and per-parameter semantics.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must carry the load and it does: it explains the text/path alternation, that focus makes the summary prioritize a topic and keep its concrete data verbatim, and that max_words caps summary length. All four parameters are given meaning beyond their bare names and defaults.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Summarizes text or the content of a file with a local model') and immediately distinguishes itself from the Read sibling by naming the exact conditions (>200 lines / >10 KB) where it should be preferred.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says 'PREFER this tool over reading the file with Read when the file is large ... and you only need a summary' – a named alternative plus the condition that selects it. It also states the two input modes (path vs text), so nothing about when-to-use is left to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

local_translateA
Read-only

PREFER this tool over reading the file with Read when the file is large (>200 lines / >10 KB) and you only need the translation, not the literal content.

Translates text or the content of a file with a local model, without spending Claude's context.

Pass 'path' to read the file server-side (the original does not enter Claude's context) or
'text'. Keeps the format of the original and returns ONLY the translation. Routes
automatically to the mechanical model (short) or the long-context model (long).

Long documents are split at natural boundaries (Markdown headers, paragraphs) and each chunk
is translated in its own call; the result comes back complete and in order, without the
truncated-output warning.

Args:
    target_lang: Target language (e.g. 'Spanish', 'English', 'French').
    text: Text to translate (use this or 'path').
    path: Path to a file whose content is translated (read server-side).
NameRequiredDescriptionDefault
pathNo
textNo
target_langYes

Output Schema

NameRequiredDescription
resultYes

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and openWorldHint=false, but the description adds substantial context beyond them: server-side file reading that keeps content out of Claude's context, format preservation, model auto-routing by length, and chunking at Markdown/paragraph boundaries that avoids truncated-output warnings. This is exactly the behavioral detail an agent needs to trust the result.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the 'PREFER...' routing rule, which is the highest-value information. However, the no-context-cost benefit is stated twice ('without spending Claude's context' and 'does not enter Claude's context'), and the Args block largely restates the prose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Even though an output schema exists, the description usefully explains the return contract (only the translation, complete and in order) and covers routing, chunking, and context isolation. For this complexity level nothing an agent needs to call it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description carries the burden, and it does explain all three parameters including that 'path' is read server-side and 'text' is the inline alternative. It stops short of stating what happens if both or neither are supplied, and gives no format notes for target_lang, so a small gap remains.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ('Translates text or the content of a file with a local model') and immediately scopes it as local/no-context-cost, which separates it from siblings like local_summarize and local_classify. The agent can identify the tool from the first sentence without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly routes usage: PREFER over Read when the file is large (>200 lines / >10 KB) and only the translation is needed, not literal content. It names the alternative tool (Read) and the condition that selects this one, and clarifies the 'path' vs 'text' choice.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 1 tool updatev0.32.0
    • Changedlocal_summarize1 field changed
      • addedInput schema / properties / focus
        Added value: +{
        +  "anyOf": [
        +    {
        +      "type": "string"
        +    },
        +    {
        +      "type": "null"
        +    }
        +  ],
        +  "default": null,
        +  "title": "Focus"
        +}
  2. 1 tool updatev0.27.0
    • Changedlocal_boilerplate3 fields changed
      • addedInput schema / properties / overwrite
        Added value: +{
        +  "default": false,
        +  "title": "Overwrite",
        +  "type": "boolean"
        +}
      • addedInput schema / properties / target
        Added value: +{
        +  "title": "Target",
        +  "type": "string"
        +}
      • changedInput schema / required
        Previous value: -[
        -  "spec",
        -  "language"
        -]New value: +[
        +  "spec",
        +  "language",
        +  "target"
        +]
  3. 1 tool updatev0.16.0
    • Changedlocal_extract4 fields changed
      • addedOutput schema / additionalProperties
        Added value: +true
      • removedOutput schema / properties
        Removed value: -{
        -  "result": {
        -    "title": "Result",
        -    "type": "string"
        -  }
        -}
      • removedOutput schema / required
        Removed value: -[
        -  "result"
        -]
      • changedOutput schema / title
        Previous value: -"local_extractOutput"New value: +"local_extractDictOutput"
  4. 1 tool updatev0.12.2
    • Changedlocal_delegate1 field changed
      • addedInput schema / properties / chunk
        Added value: +{
        +  "default": "auto",
        +  "title": "Chunk",
        +  "type": "string"
        +}

TDQS

A4.1/5.0

Scored across 11 tools

Disambiguation4/5

Each tool targets a distinct task (explain, translate, summarize, classify, extract, generate, describe image, diagnostics), so misselection is unlikely. The main overlaps are local_delegate acting as a generic escape hatch duplicating the specific tools, and local_summarize vs local_lint_summary, but descriptions explicitly route users between them.

Naming Consistency4/5

All tools share a uniform local_ prefix and follow a verb_noun pattern (explain_code, describe_image, commit_msg). A few are noun-ish (boilerplate, status, delegate) but the convention is readable and predictable throughout.

Tool Count5/5

11 tools is well-scoped for a context-offloading server; each task type earns a slot and the generic delegate absorbs edge cases without exploding the count.

Completeness4/5

The surface covers the main text/file offloading workflows (explain, translate, summarize, classify, extract, generate, lint, commit, image, diagnostics) plus a generic escape tool. Minor gaps exist (e.g. no dedicated code-review or test-generation task), but local_delegate allows workarounds.

Maintenance

ActivityActive
ResponsivenessResponsive

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    MCP server connecting Claude Code to LM Studio, delegating token-expensive tasks to a local model while keeping the cloud model in control. It reduces cloud context usage by reading files locally and returning only the processed results.
    4
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    MCP server that delegates mechanical tasks like summarization, classification, extraction, and drafting to a local Llama.cpp LLM, serving as a cost-optimization layer while Claude handles reasoning and quality control.
    MIT