Skip to main content
Glama

ollama-mcp

Делегируйте задачи из сессии Claude Code на базе Anthropic сессиям Claude Code на базе Ollama — без того, чтобы они когда-либо обменивались переменными окружения.

ollama launch claude --model <model> работает, экспортируя переменные ANTHROPIC_* в вашу оболочку. Именно поэтому обычно требуется отдельный терминал: переменные действуют на уровне процесса, поэтому одна оболочка — это либо «Anthropic», либо «Ollama», но никогда обе одновременно.

Этот MCP-сервер запускает каждую делегированную сессию как дочерний процесс с явно сконструированным окружением. Ваша сессия Opus сохраняет свои собственные учетные данные и настройки модели; делегат получает настройки Ollama. Они работают бок о бок в одном терминале.

┌────────────────────────────┐
│  Claude Code (Opus)        │   your session, Anthropic credentials
│                            │
│   └─ mcp: ollama-mcp ──────┼──▶ spawn: claude -p   (fresh env)
└────────────────────────────┘         ANTHROPIC_BASE_URL=127.0.0.1:11434
                                       ANTHROPIC_AUTH_TOKEN=ollama
                                       → qwen3.5:397b-cloud

Содержание


Related MCP server: opencode-bridge

Как это работает

Сервер Ollama предоставляет совместимую с Anthropic конечную точку POST /v1/messages, поэтому Claude Code может взаимодействовать с ним без изменений, если указать правильный базовый URL. Каждая делегированная задача выполняется как claude -p в собственном процессе с:

ANTHROPIC_BASE_URL=http://127.0.0.1:11434
ANTHROPIC_AUTH_TOKEN=ollama
ANTHROPIC_DEFAULT_OPUS_MODEL=<model>
ANTHROPIC_DEFAULT_SONNET_MODEL=<model>
ANTHROPIC_DEFAULT_HAIKU_MODEL=<model>
CLAUDE_CODE_SUBAGENT_MODEL=<model>

Все три слота модели указывают на одну и ту же модель Ollama, чтобы псевдонимы (opus, sonnet, haiku) и любой под-агент, запущенный внутри делегата, разрешались в нее, а не молча возвращались к стандартному Anthropic.

Дочернее окружение строится из небольшого разрешенного списка, специфичного для каждой платформы. Все, что соответствует ANTHROPIC_*, CLAUDE_*, AWS_*, GOOGLE_*, AZURE_*, OPENAI_*, BEDROCK_*, VERTEX_*, отбрасывается до применения значений Ollama, поэтому случайный ANTHROPIC_API_KEY в вашей оболочке не может просочиться в делегированный запуск или привести к списанию средств.

Делегаты также запускаются с флагом --strict-mcp-config и без конфигурации MCP, что ускоряет их запуск и предотвращает рекурсивный вызов этого сервера.


Предварительные требования

Требование

Примечания

Node.js 20+

node --version. Собрано и протестировано на 24.

Ollama

ollama.com/download. Должен быть запущен: ollama serve (десктопное приложение делает это за вас).

CLI Claude Code

claude.com/code. claude --version.

Хотя бы одна модель

ollama pull qwen3.5:397b-cloud

Учетная запись Ollama

Только для моделей :cloud — ollama signin. Локальным моделям учетная запись не нужна.

Проверьте компоненты перед установкой:

node --version                              # v20 or newer
claude --version
curl -s http://127.0.0.1:11434/api/version  # {"version":"..."}
ollama list                                 # at least one model

Облачные и локальные модели. Модели с тегом :cloud работают на инфраструктуре Ollama и требуют ollama signin; они значительно мощнее того, что большинство ноутбуков может поместить в память, что делает их практичным выбором для делегирования. Локальные модели тоже работают и никогда не покидают вашу машину.


Установка

Из npm (рекомендуется)

Никакого клонирования или сборки — npx загружает по требованию:

claude mcp add ollama --scope user -- npx -y claude-ollama-delegate-mcp

Или установите глобально, что также помещает CLI настроек в ваш PATH:

npm install -g claude-ollama-delegate-mcp
claude mcp add ollama --scope user -- claude-ollama-delegate-mcp

Из исходного кода

git clone https://github.com/histonedev/claude-ollama-delegate-mcp.git
cd claude-ollama-delegate-mcp
npm install          # builds automatically via the prepare script
claude mcp add ollama --scope user -- node "$(pwd)/dist/index.js"

Запускайте CLI настроек как node dist/cli.js …, или используйте npm link, чтобы получить ollama-mcp-config в вашем PATH.

Области действия

--scope user делает его доступным в каждом проекте; --scope project записывает в .mcp.json в текущем репозитории и предоставляет доступ соавторам; --scope local оставляет его только на этой машине и в этом проекте.

Подтверждение

claude mcp list        # ollama: ... - ✔ Connected

Затем перезапустите сессию Claude Code — список инструментов считывается при запуске.

Конфигурация

Настройки разрешаются из четырех уровней, причем более поздние переопределяют более ранние:

  1. встроенные значения по умолчанию

  2. пользовательская конфигурация — ~/.ollama-mcp/config.json (переопределить путь можно с помощью $OLLAMA_MCP_CONFIG)

  3. конфигурация проекта — ./ollama-mcp.config.json в рабочем каталоге сервера

  4. переменные окружения

{
  "delegationMode": "ondemand",
  "allowedModels": ["qwen3.5:397b-cloud", "gemma4:31b-cloud"],
  "defaultModel": "qwen3.5:397b-cloud",
  "defaultPermissionMode": "auto",
  "baseUrl": "http://127.0.0.1:11434",
  "claudeBin": "claude",
  "stateDir": "~/.ollama-mcp/jobs",
  "jobTimeoutMs": 1800000,
  "maxInlineChars": 60000
}

Параметр

Переменная окружения

Значение по умолчанию

Назначение

delegationMode

OLLAMA_MCP_DELEGATION_MODE

ondemand

Насколько активно используется делегирование — см. ниже

allowedModels

OLLAMA_MCP_ALLOWED_MODELS (через запятую)

[] (все)

Модели, которые могут использоваться для делегирования

defaultModel

OLLAMA_MCP_DEFAULT_MODEL

первая разрешенная облачная модель

Модель, когда вызов опускает ее

defaultPermissionMode

OLLAMA_MCP_PERMISSION_MODE

auto

Режим разрешений для делегатов

baseUrl

OLLAMA_MCP_BASE_URL или OLLAMA_HOST

http://127.0.0.1:11434

Конечная точка Ollama

claudeBin

OLLAMA_MCP_CLAUDE_BIN

claude

Путь к CLI Claude Code

stateDir

OLLAMA_MCP_STATE_DIR

~/.ollama-mcp/jobs

Подсказки, транскрипты, результаты

jobTimeoutMs

OLLAMA_MCP_JOB_TIMEOUT_MS

1800000

Принудительное завершение одного цикла

maxInlineChars

OLLAMA_MCP_MAX_INLINE_CHARS

60000

Вывод выше этого порога усекается; полный текст на диске

Изменение настроек

Настройки изменяются из терминала, никогда не моделью:

ollama-mcp-config                              # show current settings + active layers
ollama-mcp-config --mode auto                  # off | ondemand | auto
ollama-mcp-config --allow qwen3.5:397b-cloud   # or: --allow all
ollama-mcp-config --default-model qwen3.5:397b-cloud
ollama-mcp-config --permission-mode acceptEdits
ollama-mcp-config --scope project              # write ./ollama-mcp.config.json

Затем перезапустите сессию Claude Code, чтобы сервер перечитал свою конфигурацию.

Намеренно нет инструмента MCP для этого. См. Модель безопасности.

Разрешенные модели

allowedModels: [] (по умолчанию) разрешает любую модель, которую предлагает сервер. При непустом списке:

  • delegate_start отклоняет модель вне этого списка, называя разрешенный набор, а не молча подставляя другую

  • ollama_models помечает исключенные модели как ЗАБЛОКИРОВАНО allowedModels

  • разрешенный список встраивается в описание инструмента delegate_start, поэтому оркестратор знает меню без дополнительного вызова

  • CLI отказывается от изменения, которое оставит defaultModel за пределами нового списка


Режимы делегирования

Это контролирует насколько активно оркестратор прибегает к делегированию, переписывая описания инструментов, которые модель фактически читает. Изменение требует перезапуска сессии по замыслу.

Режим

Эффект

off

Инструменты delegate_* полностью скрыты. ollama_models остается, чтобы модель могла все еще сообщать о настройке.

ondemand (по умолчанию)

Делегирование только когда вы явно попросите — «делегируй это», «используй ollama», «спроси qwen». В противном случае оркестратор выполняет работу сам и не упоминает инструменты.

auto

Оркестратор решает сам, используя критерии, встроенные в описание.

В режиме auto описание предписывает оркестратору делегировать работу, которая является самодостаточной, дешево проверяемой и требующей контекста — массовое обобщение файлов, первичный поиск, механические рефакторинги, шаблонный код и тестовые каркасы, сортировку журналов или различий — оставляя себе архитектурные решения, чувствительные к безопасности изменения, неоднозначные требования и финальную проверку. Ему также предписано проверять делегированные утверждения по причине, указанной в Эксплуатация.


Справочник инструментов

Инструмент

Назначение

ollama_models

Список обслуживаемых моделей и отчет о текущих настройках (только чтение)

delegate_start

Запуск задачи; возвращает job_id немедленно

delegate_followup

Отправка другого сообщения в ту же сессию

delegate_status

Проверка состояния и хвост вызовов инструментов делегата

delegate_result

Получение окончательного вывода

delegate_cancel

Завершение работающего делегата и всего, что он запустил

delegate_list

Список заданий, сгруппированных по разговору

delegate_start

Параметр

Тип

Примечания

prompt

строка

Задача. Взаимоисключающий с prompt_file.

prompt_file

строка

Путь к файлу, содержащему подсказку. Предпочтительно для длинных.

model

строка

Должен быть в списке разрешенных. По умолчанию defaultModel.

cwd

строка

Рабочий каталог для делегата. По умолчанию cwd сервера.

permission_mode

перечисление

auto, acceptEdits, bypassPermissions, manual, dontAsk, plan

allowed_tools

string[

]

например ["Read","Grep","Bash(git *)"]

disallowed_tools

string[

]

например ["Write","Edit"]

append_system_prompt

строка

Дополнительные инструкции для делегата

max_turns

число

Ограничение агентских циклов делегата

add_dirs

string[

]

Дополнительные доступные каталоги

wait_seconds

число

Блокировка до N секунд (0–600). По умолчанию 0 = немедленный возврат.

delegate_followup принимает job_id или session_id, плюс ту же пару prompt/prompt_file и необязательные permission_mode, max_turns, wait_seconds.


Эксплуатация

Асинхронно по умолчанию

delegate_start возвращает job_id за миллисекунды; делегат продолжает работу в фоне. Это предотвращает блокировку вашей сессии длительной задачей или превышение тайм-аута MCP-клиента.

delegate_start({ prompt: "Audit src/ for unused exports" })
  → job_id A, session_id S, turn 1, state: running

delegate_status({ job_id: "A" })
  → recent activity:
      [tool] Grep: export
      [tool] Read: /repo/src/index.ts

delegate_result({ job_id: "A" })
  → the final text

Передайте wait_seconds любому из них, чтобы заблокировать вместо этого — полезно для коротких задач, где опрос в оба конца не стоит того.

Двусторонние разговоры

Каждое задание имеет session_id. Передача его job_id в delegate_followup возобновляет сессию с полной историей; session_id остается стабильным на протяжении всех циклов, в то время как каждый цикл получает новый job_id.

delegate_start({ prompt: "Summarise the auth flow in this repo" })
  → job A, session S, turn 1
delegate_followup({ job_id: "A", prompt: "Now list every place it can fail" })
  → job B, session S, turn 2   (delegate still remembers turn 1)

Продолжение разговора значительно дешевле, чем начинать заново, когда у делегата уже загружен соответствующий контекст.

Длинные подсказки

У каждого параметра промпта есть аналог prompt_file. Внутренне промпт всегда записывается на диск и передаётся CLI через stdin — никогда как аргумент argv и никогда через оболочку. Обратные кавычки, $(...), кавычки, символы новой строки и символы glob передаются дословно, и нет ограничения на длину argv.

delegate_start({ prompt_file: "/tmp/refactor-brief.md" })

Разрешения

Делегаты по умолчанию используют defaultPermissionMode (auto). Сузьте для конкретного вызова:

// read-only review
delegate_start({ prompt: "...", disallowed_tools: ["Write", "Edit", "NotebookEdit"] })

// tightly scoped
delegate_start({ prompt: "...", allowed_tools: ["Read", "Grep", "Glob"] })

Доверие к выводу делегата

Каждый завершённый результат сообщает количество вызовов инструментов. Более слабые модели иногда уверенно отвечают, ничего не запуская — во время разработки одна модель утверждала, что переменная окружения не установлена, ни разу не вызвав Bash; при настойчивом предложении она выполнила команду и сообщила правильное значение.

Результат, содержащий tool calls: 0, поэтому помечается как непроверенный:

tool calls: 0   <- answered without using any tools; treat factual claims as unverified

delegate_status показывает фактический трейс. Чисто разговорный последующий вопрос законно имеет ноль — флаг означает «за этим ничего не стоит», а не «что-то сломалось».

Отмена

delegate_cancel({ job_id: "A" })

Убивает делегата и всё, что он запустил, так что делегат, находящийся на полпути длинной сборки, не оставляет сборку работающей.


Артефакты задач

Каждая задача записывает данные в ~/.ollama-mcp/jobs/<job_id>/:

Файл

Содержимое

prompt.txt

В точности то, что было отправлено

stream.jsonl

Полная расшифровка stream-json, включая все вызовы инструментов

result.json

Метаданные: состояние, модель, токены, время, код выхода

result.txt

Итоговый текст вывода

Результаты длиннее maxInlineChars усекаются в ответе инструмента, а полный текст читается из result.txt. Ничего не удаляется автоматически — удаляйте каталог, когда захотите.


Устранение неполадок

Cannot reach Ollama at http://127.0.0.1:11434 Ollama не запущен. Запустите ollama serve или откройте десктопное приложение. Если он слушает на другом порту, установите OLLAMA_MCP_BASE_URL.

No models available from Ollama ollama pull qwen3.5:397b-cloud, и ollama signin для моделей :cloud.

<model> was retired at … (HTTP 410) Ollama удалила эту облачную модель. ollama list всё ещё показывает локально кэшированные манифесты для удалённых моделей — проверьте, что на самом деле работает, и обновите defaultModel.

Model "x" is not in the allowed list Работает как задумано. ollama-mcp-config --allow <models>, затем перезапустите.

Инструменты не отображаются в Claude Code Список инструментов читается при запуске сессии. Перезапустите или проверьте claude mcp list.

Делегат мгновенно завершается с ошибкой запуска CLI не найден. Установите OLLAMA_MCP_CLAUDE_BIN в абсолютный путь к claude.

Всё медленно Облачные модели платят за круговую связь на каждый шаг, а Claude Code отправляет большой системный промпт (~25k токенов) при каждом запросе. Используйте max_turns для ограничения агентных циклов и allowed_tools, чтобы делегат не исследовал больше, чем нужно.


Поддержка платформ

Платформа

Статус

macOS

Протестировано от начала до конца

Linux

Поддерживается; тот же код POSIX, что и на macOS

Windows

Поддерживается по замыслу, пока не протестировано на реальном оборудовании

Различия платформ изолированы в src/platform.ts:

Определение бинарного файла. На POSIX spawn ищет в PATH. На Windows нативная установка даёт claude.exe, а установка через npm даёт claude.cmd, который CreateProcess не может выполнить напрямую — поэтому сервер проходит по PATH × PATHEXT, предпочитая .exe, и в крайнем случае направляет обёртку .cmd через cmd.exe.

Экранирование аргументов. Этот запасной вариант применяет два слоя: квотирование argv MSVCRT, затем экранирование собственных метасимволов cmd с помощью caret (& | < > ^ " ( ) % !). Пропуск второго слоя — классическая дыра для внедрения команд в .cmd. Промпты никогда не проходят по этому пути — они передаются через stdin. Одно ограничение: многострочный append_system_prompt не может пересекать командную строку cmd.exe, поэтому сервер выдаёт чёткую ошибку, указывающую на OLLAMA_MCP_CLAUDE_BIN, вместо того чтобы молча исказить её.

Белый список окружения. Windows сохраняет гораздо больший набор, чем POSIX. SystemRoot и windir не являются опциональными — удалите их, и Winsock не сможет инициализироваться, поэтому дочерний процесс не сможет открыть сокет даже к localhost. Имена сопоставляются без учёта регистра, но копируются с оригинальным написанием родительского процесса.

Отмена. Дочерние процессы POSIX порождаются detached как лидеры групп процессов и отменяются с помощью process.kill(-pid); Windows использует taskkill /T /F. В любом случае собственные подпроцессы делегата умирают вместе с ним. Сервер также убивает работающих делегатов при завершении работы.


Модель безопасности

Изоляция учётных данных — это суть. Окружение дочернего процесса строится с нуля, а не наследуется, и переменные провайдера удаляются перед применением значений Ollama. Это проверяется в test/env-unit.mjs, а test/e2e.mjs засоряет родительский процесс поддельным ANTHROPIC_API_KEY и утверждает, что он никогда не достигает делегата.

Политика делегирования не доступна для записи модели. Нет инструмента MCP для изменения delegationMode или allowedModels. В более ранней версии такой инструмент был, что было ошибкой: модель, которой неудобен ondemand, могла одним вызовом переключить себя на auto и затем свободно делегировать. Настройки теперь загружаются один раз при запуске, никогда не изменяются во время выполнения, и в описаниях инструментов указано, что политика не подлежит изменению моделью.

Это ограждение, а не граница безопасности. Агент с доступом к оболочке всё равно может редактировать файл конфигурации. Удаление инструмента даёт вам то, что такое изменение будет видимым редактированием файла, которое вступает в силу только при следующем перезапуске, а не одним тихим вызовом инструмента посреди задачи. Чтобы сделать это герметичным, зафиксируйте значения через --env при регистрации MCP, что переопределяет файлы конфигурации:

claude mcp add ollama --scope user \
  --env OLLAMA_MCP_DELEGATION_MODE=ondemand \
  --env OLLAMA_MCP_ALLOWED_MODELS=qwen3.5:397b-cloud \
  -- node /path/to/claude-ollama-delegate-mcp/dist/index.js

Делегаты наследуют вашу файловую систему. Они работают от вашего имени в cwd, который вы им задаёте, с defaultPermissionMode. Относитесь к делегированной сессии как к любой сессии Claude Code — используйте disallowed_tools или режим только для чтения, когда передаёте работу модели, которой доверяете меньше.


Разработка

npm install        # installs and builds
npm run build      # tsc
npm run dev        # tsc --watch

Тесты

node test/env-unit.mjs       # env isolation: no secret leaks, platform vars present
node test/quoting.mjs        # Windows argv/cmd escaping, incl. an injection probe
node test/killtree-unit.mjs  # process-tree termination
node test/e2e.mjs            # full MCP round trip           (needs Ollama running)
node test/async.mjs          # async polling, prompt_file, cancel  (needs Ollama)
CFG_PATH=/tmp/c.json CFG_CWD=/tmp node test/readonly.mjs   # config is read-only to the model

npm test запускает три теста, которые не требуют сети.

Публикация релиза

npm login                       # interactive, once per machine
npm version patch               # or minor / major -- tags and bumps
npm publish                     # prepare script builds first
git push --follow-tags

Пакет называется claude-ollama-delegate-mcp и поставляется только с dist/, README.md и LICENSE. publishConfig.access — public, а prepare запускает tsc перед упаковкой, так что устаревший dist/ никогда не может быть опубликован. Просмотрите tarball с помощью npm pack --dry-run перед отправкой.

Структура

Файл

Ответственность

src/index.ts

MCP сервер, регистрация инструментов и обработчики

src/settings.ts

Многослойная загрузка конфигурации и валидация

src/config.ts

Одноэлементный объект настроек, разрешаемых при запуске

src/descriptions.ts

Описания инструментов, зависящие от режима

src/env.ts

Построение окружения дочернего процесса и чёрный список переменных провайдера

src/platform.ts

Порождение процессов Windows/POSIX, экранирование аргументов, убийство дерева процессов

src/jobs.ts

Жизненный цикл задач, разбор stream-json, отмена

src/models.ts

Обнаружение моделей и применение белого списка

src/cli.ts

CLI настроек ollama-mcp-config


Лицензия

MIT — см. LICENSE.

Available Tools

7 tools
delegate_cancelCancel a delegated taskA

Terminate a running delegated Ollama session and everything it started.

ParametersJSON Schema
NameRequiredDescriptionDefault
job_idYesThe job_id to cancel.

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It does add one key behavioral trait: that cancellation terminates 'everything it started,' indicating cascading termination. However, it omits details like whether the operation is destructive (assumed but not stated), whether it requires any permissions, or what the return behavior is (e.g., blocking, asynchronous).

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?

The description is a single sentence of 9 words, with the core verb 'Terminate' front-loaded. Every word adds value, and there is no fluff or redundancy. It is as concise as possible while still conveying the key behavioral nuance of cascade cancellation.

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

Completeness3/5

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

Given the tool's simplicity (one parameter, no output schema, no annotations), the description is minimally adequate. It specifies what it terminates and the scope, but does not cover important usage context such as error cases (e.g., cancelling a non-existent session), whether it is safe for any session, or what the result looks like. Some additional detail would improve completeness.

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?

The input schema has 100% description coverage for the single parameter 'job_id' with a clear description. The tool description adds no further semantic detail beyond what the schema already provides, so the baseline of 3 is appropriate.

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 description clearly states 'terminate a running delegated Ollama session and everything it started,' which specifies the action (terminate), the resource (delegated Ollama session), and an important scope ('everything it started'). This distinguishes it from sibling tools like delegate_start and delegate_status.

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 implicitly indicates use for canceling a running session but provides no explicit guidance on when to use versus alternatives (e.g., delegate_status to check status first) or when not to use (e.g., if the session is already completed). It lacks any before/after context or exclusion conditions.

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

delegate_followupContinue a delegated conversationA

Send another message to an existing delegated session, resuming its full conversation history. Identify it by job_id (any turn) or session_id. Returns a new job_id for this turn while keeping the same session_id, so you can go back and forth with the Ollama model.

Only continue conversations the user asked you to start.

ParametersJSON Schema
NameRequiredDescriptionDefault
job_idNoA job_id from any earlier turn of the conversation.
promptNoThe next message. Use prompt_file for long prompts.
max_turnsNoCap the delegate's agentic turns for this turn.
session_idNoThe Claude Code session id, as an alternative to job_id.
prompt_fileNoPath to a file holding the next message.
wait_secondsNoBlock up to this many seconds before returning.
permission_modeNoOverride the permission mode for this turn.

TDQS

A4.4/5.0
Behavior4/5

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

The description explains that a new job_id is returned for this turn while the session_id remains the same, enabling back-and-forth interaction. Without annotations, the description carries the burden; it could mention any blocking behavior or side effects, but the transparency 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.

Conciseness5/5

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

The description is concise (three sentences), front-loaded with the core action, and every sentence adds value. No wasted words.

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?

Given the 7 parameters, full schema coverage, no output schema, and no annotations, the description explains the essential behavior and identification methods. It could be more complete by noting the default behavior for optional parameters like max_turns or wait_seconds, but is largely sufficient.

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 100%, so baseline is 3. The description mentions job_id and session_id as alternatives for identification but does not add new semantic meaning beyond the schema for other parameters. It doesn't go beyond what the schema already provides.

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 description clearly states the tool sends another message to an existing delegated session, resuming conversation history. It distinguishes itself from siblings like delegate_start by focusing on continuation, and the title reinforces the purpose.

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?

The description explicitly states when to use this tool (continue a delegated conversation) and includes exclusion guidance: 'Only continue conversations the user asked you to start.' This clearly differentiates from delegate_start and sets a boundary.

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

delegate_listList delegated tasksC

Show delegated jobs from this server's lifetime, newest first, grouped by conversation.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum jobs to list. Default 20.
stateNoFilter by state.

TDQS

C2.9/5.0
Behavior3/5

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

No annotations are provided, so the description carries full burden. It discloses ordering and grouping, but does not state whether the tool is read-only, has performance implications, or returns partial results. The lack of mutation or safety context is a gap.

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?

The description is a single concise sentence that includes key details (ordering, grouping). No wasted words, though it could be slightly more informative without becoming verbose.

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

Completeness2/5

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

The tool lists delegated jobs from a server's lifetime with no output schema. The description is sparse: it does not explain what fields are returned, pagination behavior, or how grouping works. More context is needed for an agent to use this tool effectively.

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

Parameters2/5

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

Schema coverage is 100% and the schema descriptions are clear for both parameters, so the baseline is 3. However, the description adds no extra meaning beyond what the schema already provides (e.g., does not explain what 'state' values mean in context, how limit interacts with grouping, or defaults).

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?

The description clearly states the tool lists delegated jobs, specifying order (newest first) and grouping (by conversation). It distinguishes from siblings like delegate_status or delegate_result, but could be more explicit about what 'delegated jobs' refers to in context.

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 guidance on when to use this tool versus siblings such as delegate_status or delegate_cancel. The description does not mention prerequisites, typical use cases, or when not to use it, leaving the agent to infer based on name alone.

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

delegate_resultGet a delegated task's outputA

Return the final text produced by a delegated Ollama session, plus its session_id for follow-ups. Blocks until the job finishes if you pass wait_seconds.

ParametersJSON Schema
NameRequiredDescriptionDefault
job_idYesThe job_id to collect.
wait_secondsNoBlock up to this many seconds for the job to finish.

TDQS

A4.4/5.0
Behavior4/5

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

Since no annotations are provided, the description carries the full burden of behavioral disclosure. It clearly states that the tool blocks if wait_seconds is provided, and returns both the text and session_id. It does not discuss potential side effects, rate limits, or what happens if the job fails, but the blocking behavior is the key transparent element.

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?

The description is two sentences long, front-loaded with the primary purpose, and every sentence adds value. There is no wasted text.

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?

The tool has only two parameters, no output schema, and no nested objects, so its simplicity reduces the required completeness. The description adequately covers the inputs and the blocking behavior. It could mention what happens if the job hasn't started yet or if it fails, but given the low complexity, this is sufficient.

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 100%, so baseline is 3. The description adds meaning by explaining that 'job_id' is the collected delegation identifier and that 'wait_seconds' controls blocking up to a maximum. This clarifies the semantics beyond the schema's minimal 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 description uses a specific verb ('Return') and resource ('final text...plus session_id'), clarifying the precise output. It distinguishes itself from sibling tools like 'delegate_status' (which likely returns status only) and 'delegate_start' (which starts work).

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

Usage Guidelines4/5

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

The description implies when to use this tool (after a delegation is created, to get final output) and mentions the optional wait_seconds for blocking behavior. However, it does not explicitly contrast with 'delegate_followup' or 'delegate_status'—though the context signals suggest those exist.

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

delegate_startDelegate a task to an Ollama modelA

Start a headless Claude Code session backed by an Ollama model and return immediately with a job_id. It runs in its own process with its own environment, so your Anthropic credentials and model settings are untouched. Poll with delegate_status, collect with delegate_result, and continue the conversation with delegate_followup. Pass prompt_file for long prompts.

WHEN TO USE — ON EXPLICIT REQUEST ONLY. Delegation mode is "ondemand". Call this only when the user actually asks for it: "delegate this", "use ollama", "ask qwen", "run this on a local model", or when they name an Ollama model. If the user has not asked for delegation, do the work yourself and do not offer this tool unprompted.

This policy is set by the user and is not yours to change. If it is getting in the way, say so and let the user run ollama-mcp-config; do not edit config files to widen it.

ParametersJSON Schema
NameRequiredDescriptionDefault
cwdNoWorking directory for the delegated session. Defaults to the server's cwd.
modelNoOllama model id. Must be in the allowed list. Defaults to the configured default.
promptNoThe task for the Ollama-backed session. Use prompt_file for long prompts.
add_dirsNoAdditional directories the delegate may access.
max_turnsNoCap the delegate's agentic turns.
prompt_fileNoPath to a file holding the prompt. Preferred for long or special-character-heavy prompts.
wait_secondsNoBlock up to this many seconds for completion. Default 0.
allowed_toolsNoTool allowlist, e.g. ['Read','Grep','Bash(git *)'].
permission_modeNoPermission mode for the delegate. Defaults to the configured default.
disallowed_toolsNoTool denylist, e.g. ['Write','Edit'].
append_system_promptNoExtra instructions appended to the delegate's system prompt.

TDQS

A4.3/5.0
Behavior4/5

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

Since no annotations are provided, the description carries the full burden. It discloses key behaviors: the tool runs in its own process with its own environment, so the user's Anthropic credentials and model settings are untouched. It also mentions that delegation mode is 'ondemand.' However, it does not detail what happens upon failure (e.g., if the Ollama model is unavailable) or the format of the returned job_id, leaving minor gaps.

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?

The description is structured with a clear first paragraph about the tool's function and a separate 'WHEN TO USE' section. It is front-loaded with the core purpose. However, the second paragraph could be slightly more concise—it repeats the 'ON EXPLICIT REQUEST ONLY' instruction—and the policy enforcement sentence adds redundancy. Still, it is efficient overall.

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 an 11-parameter tool with no output schema, the description provides sufficient context: it explains the async nature, mentions sibling tools for follow-up, and includes usage boundaries. Some details about parameter interplay (e.g., wait_seconds vs. polling with delegate_status) or return value format are missing, but the description is functionally complete for selecting and invoking the tool.

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?

The input schema covers 100% of parameters with descriptions, so the baseline is 3. The description adds minimal extra meaning beyond the schema: it mentions using `prompt_file` for long prompts and lists a few sibling tools for polling/collection. It does not elaborate on parameter constraints or relationships (e.g., mutual exclusivity of prompt and prompt_file).

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 description clearly states the purpose: 'Start a headless Claude Code session backed by an Ollama model and return immediately with a job_id.' It identifies the resource (delegate session) and the action (start). It also distinguishes itself from siblings by mentioning polling with delegate_status, collecting with delegate_result, and continuing with delegate_followup, making differentiation clear.

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?

The description provides explicit when-to-use instructions: 'ON EXPLICIT REQUEST ONLY' and lists triggering phrases like 'delegate this', 'use ollama', 'ask qwen', etc. It also states when not to use: 'If the user has not asked for delegation, do the work yourself and do not offer this tool unprompted.' This is exemplary usage guidance.

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

delegate_statusCheck a delegated taskA

Report whether a delegated job is still running, plus a tail of what the Ollama session has been doing — its actual tool calls and partial text. Optionally block until it finishes. Use the tool-call trace to check that a delegate really did the work it claims.

ParametersJSON Schema
NameRequiredDescriptionDefault
job_idYesThe job_id returned by delegate_start or delegate_followup.
wait_secondsNoBlock up to this many seconds waiting for completion.
progress_limitNoHow many recent activity lines to show. Default 15.

TDQS

A4.1/5.0
Behavior4/5

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

Without annotations, the description carries the full burden. It transparently discloses the tool's behavior: it reports running status, provides a tail of activity (including tool calls and partial text), and can optionally block for a specified duration. It does not mention potential side effects, but since it's a read-only monitoring operation, the disclosure is adequate.

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?

The description is two sentences, front-loaded with the core purpose. The second sentence adds a usage tip, which is relevant but slightly redundant. Every sentence earns its place, and there is no fluff.

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?

Given there are 3 parameters, no output schema, and no annotations, the description is reasonably complete. It explains the tool's purpose, the key output (status and trace), and the optional blocking feature. It lacks explicit mention of the return format or error cases, but for a monitoring tool this is acceptable.

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 coverage is 100%, so each parameter has a description in the schema. The description adds no additional parameter semantics beyond the schema, so baseline 3 is appropriate.

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 description clearly specifies the tool reports the status of a delegated job ('Report whether a delegated job is still running'), a tail of activity ('actual tool calls and partial text'), and the option to block until completion. This distinguishes it from siblings like delegate_start (which initiates a job) and delegate_result (which presumably gets the final result).

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

Usage Guidelines4/5

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

The description gives explicit context for when to use this tool: to check if a delegate is still running and to use the tool-call trace to verify a delegate's actions. It does not explicitly state when not to use it or name alternatives, but the context ('Use the tool-call trace to check that a delegate really did the work it claims') implies it is for post-delegation monitoring versus delegate_cancel for aborting.

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

ollama_modelsList Ollama modelsA

List the Ollama models available for delegation, the current delegation mode and allowed-model policy, and the environment variables a delegated session receives. Use this to pick a model, or to report the current configuration when the user asks about it.

These settings are user-controlled. There is no tool to change them: if the user wants a different delegation mode or model policy, tell them to run ollama-mcp-config in a terminal and restart the session. Do not edit the config files yourself.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.6/5.0
Behavior4/5

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

No annotations are provided, so the description carries full burden. It clearly states that the tool lists models, delegation mode, policy, and env vars, and that settings are user-controlled. It also warns that there is no tool to change them and instructs the agent not to edit config files. This covers the read-only nature and constraints. However, it does not mention any potential side effects, error conditions, or details about the output format, which would have made it a 5.

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?

The description is four sentences, tightly packed with information. The first sentence gives the purpose, the second gives usage guidance, and the last two provide behavioral context and alternative actions. No redundant sentences or filler. It is well-structured and front-loaded, making it easy for an AI agent to parse quickly.

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?

Given the tool has no parameters, no output schema, and no annotations, the description provides a solid overview of what the tool returns and how to use it. However, it lacks a brief description of the output format (e.g., whether it returns a list of model names or a structured JSON). This is a minor gap, but overall the description is sufficient for the agent to understand the tool's purpose and constraints.

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 has zero parameters, and schema description coverage is 100% (no parameters to describe). According to the guidelines, this gives a baseline of 4. The description does not add parameter semantics because there are none, and it correctly avoids adding unnecessary info. The score is appropriate.

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 description starts with a specific verb 'List' and clearly identifies the resources: Ollama models, delegation mode, allowed-model policy, and environment variables. It distinguishes from sibling tools which are about delegation actions (start, cancel, followup, etc.) by focusing on listing models and configuration. This leaves no ambiguity about what the tool does.

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?

The description explicitly states when to use the tool: 'Use this to pick a model, or to report the current configuration when the user asks about it.' It also provides crucial guidance on what not to do: there is no tool to change settings, and the agent should tell the user to run 'ollama-mcp-config' in a terminal and restart the session, and not to edit config files. This is exceptional for an AI agent.

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. 7 tool updatesv1.0.0
    • First observeddelegate_cancel
    • First observeddelegate_followup
    • First observeddelegate_list
    • First observeddelegate_result
    • First observeddelegate_start
    • First observeddelegate_status
    • First observedollama_models

TDQS

A4/5.0

Scored across 7 tools

Disambiguation4/5

Each tool targets a distinct lifecycle stage of a delegated Ollama session (start, status, result, followup, cancel, list). However, `delegate_cancel` and `delegate_result` have similar purposes (termination vs. final output), which could cause minor confusion but descriptions clarify the difference.

Naming Consistency5/5

All tool names follow a consistent `delegate_<verb>` pattern (cancel, list, start, followup, status, result). The naming is clear, predictable, and uses only snake_case.

Tool Count5/5

With 7 tools, the set is well-scoped for managing delegated sessions. Each tool has a clear role with no unnecessary extras, covering creation, polling, output retrieval, continuation, cancellation, and listing.

Completeness5/5

The tool surface covers the full lifecycle of a delegated session: start, poll status, get final result, follow up, cancel, list active/historical jobs, and even inspect the model configuration (`ollama_models`). No obvious gaps for the intended purpose.

Maintenance

ActivitySlowing
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers