ollama-code-mcp
This MCP server lets Claude Code delegate coding tasks to a local or LAN Ollama instance (running a Qwen3 model), offloading work to save cloud tokens and context window by leveraging idle GPU capacity.
Generate code: Produce new code from a natural-language instruction, optionally providing a context file for style/API guidance and specifying the target language.
Review code: Analyze code for correctness bugs, security issues, and simplification opportunities, with an optional focus area; accepts inline code or a server-side file path.
Refactor code: Rewrite code per a given instruction while preserving external behavior; returns the refactored code as text without writing to disk.
Fix bugs: Diagnose and fix a bug given the code and an optional error message, stack trace, or symptom description.
Write tests: Generate tests covering happy paths and edge cases, with optional framework specification (e.g., "pytest", "jest").
Explain code: Produce a plain-language explanation including control/data flow and non-obvious behavior.
Review git diffs: Perform a pull-request-style review of a git diff, accepting inline diff text or a saved diff file, with optional PR context.
Batch refactor: Apply a refactor instruction across all files matching a glob pattern; defaults to dry-run mode (returns unified diffs) and can write changes to disk when disabled.
Check Ollama status: Verify connectivity, confirm the configured model, and list all available models.
Think mode: Every tool supports a
thinkparameter to enable Qwen3's extended chain-of-thought reasoning, trading latency for quality on a per-call basis.
All file-aware tools confine operations to a configurable allowed directory, and large files can be referenced by path to avoid context window limits. The server is configurable via environment variables and supports Docker/Kubernetes deployments.
Allows delegation of coding tasks such as code generation, review, refactoring, test writing, explanation, and batch processing to a local or LAN Ollama instance running a Qwen3 model.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ollama-code-mcpgenerate a Python function to download a file from a URL"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ollama-code-mcp
An MCP server that lets Claude Code delegate
coding tasks to a local (or LAN) Ollama instance running
a Qwen3 model. Point it at a GPU box on your network -- a Tesla V100 running
qwen3-coder:30b, for example -- and Claude Code can hand off boilerplate
generation, test writing, diff review, and batch refactors to it instead of
spending cloud tokens and context window on them.
See CLAUDE.md for the routing guidance Claude Code reads to
decide what to delegate versus what to keep in the cloud.
Why
Saves Claude's context window. The file-aware tool variants take a
file_path(ordiff_file, or aglob_patternfor batches) and read the content server-side, so Claude never has to paste large files into a tool call just to hand them off.Uses idle GPU capacity. If you already run Ollama on a home GPU box or in a k3s cluster, this turns that capacity into a first-class Claude Code tool instead of a chat window you have to copy-paste into.
Fails safe. If Ollama is unreachable, times out, or the model isn't pulled, tools return a clear, non-fatal message telling Claude to just handle the task itself rather than getting stuck retrying.
Related MCP server: mcp-local-llm
Tools
Tool | Purpose | Inputs |
| Generate new code from an instruction |
|
| Review code for bugs, security issues, simplifications |
|
| Refactor code per an instruction, behavior-preserving |
|
| Diagnose and fix a bug |
|
| Write tests for given code |
|
| Explain what code does |
|
| Review a git diff, PR-review style |
|
| Apply an instruction across files matching a glob, sequentially |
|
| Health check: reachability, configured model, available models | -- |
Every tool (except ollama_status) accepts a think: bool parameter. This
toggles Qwen3's extended reasoning by appending /think or /no_think to
the prompt (see Think mode below). All coding tools default to
think=True; explain_code defaults to False since explanations are
usually fast enough without it.
code / file_path (and diff / diff_file) pairs are mutually exclusive
-- pass exactly one. File paths are resolved and confined to
OLLAMA_MCP_ALLOWED_DIR (see Configuration); attempts to
read or write outside it are rejected.
refactor_code returns the refactored code as text -- it does not touch
disk. batch_refactor is the one tool that can write files, and only when
called with dry_run=False; by default it returns a unified diff per file
so you can review before applying.
Installation
Requires Python 3.10+.
git clone git@github.com:darthzen/ollama-code-mcp.git
cd ollama-code-mcp
pip install -e .Or with uv:
uv pip install -e .Register with Claude Code
Add to your Claude Code MCP config (claude mcp add or the mcpServers
block in your settings), pointing OLLAMA_BASE_URL at wherever Ollama
actually listens -- commonly a LAN address, not localhost, since the model
runs on a dedicated GPU host:
{
"mcpServers": {
"ollama-code": {
"command": "ollama-code-mcp",
"env": {
"OLLAMA_BASE_URL": "http://ollama.ash4d.com:11434",
"OLLAMA_MODEL": "qwen3-coder:30b",
"OLLAMA_MCP_ALLOWED_DIR": "/Users/you/code"
}
}
}
}Or run it straight from the repo without installing:
{
"mcpServers": {
"ollama-code": {
"command": "/path/to/ollama-code-mcp/.venv/bin/python",
"args": ["-m", "ollama_code_mcp.server"],
"env": { "OLLAMA_BASE_URL": "http://ollama.ash4d.com:11434" }
}
}
}OLLAMA_MCP_ALLOWED_DIR should be set to the project root (or a parent of
every project) you want file-aware tools to be able to read/write. It
defaults to the server's current working directory.
Configuration
All configuration is via environment variables:
Variable | Default | Description |
|
| Where Ollama listens. LAN addresses and bare |
|
| Model tag to use, as shown by |
|
| Request timeout in seconds. Defaults to 15 minutes to allow large generations/refactors on modest hardware. |
|
| TCP connect timeout in seconds. |
|
| Context window passed to Ollama's |
| server CWD | Base directory that file-aware tools are confined to. |
|
| Per-file size cap for server-side reads. |
|
| Max files processed per |
|
| Default value for each tool's |
|
| How the think toggle reaches the model. |
|
|
|
|
| Bind host for |
|
| Bind port for |
Think mode
Qwen3 exposes a soft toggle for its extended chain-of-thought reasoning:
appending /think or /no_think to the end of a prompt turns it on or off
for that turn. This server does that automatically based on each tool's
think parameter, and separates the model's <think>...</think> block from
its final answer in the response, so you get:
[review_code] via qwen3-coder (4213 ms, 812 tokens)
<the actual review>
--- model reasoning ---
<the model's chain of thought, if think=True>Use think=True (the default for most tools) for review, refactor, fix, and
test-writing tasks where reasoning quality matters. Use think=False for
quick, low-stakes generations or explanations where latency matters more.
Running standalone
OLLAMA_BASE_URL=http://ollama.ash4d.com:11434 ollama-code-mcpBy default this speaks MCP over stdio, which is what Claude Code expects
when it spawns the process itself. To run it as a long-lived network
service instead (for the Docker/k8s deployment below), set
MCP_TRANSPORT=streamable-http.
Docker
docker build -t ollama-code-mcp .
docker run --rm -p 8765:8765 \
-e OLLAMA_BASE_URL=http://ollama.ash4d.com:11434 \
-e MCP_TRANSPORT=streamable-http \
-v /path/to/your/code:/workspace \
-e OLLAMA_MCP_ALLOWED_DIR=/workspace \
ollama-code-mcpClaude Code would then connect to it as a remote MCP server at
http://<host>:8765/mcp.
Kubernetes / k3s
Manifests are in k8s/. They assume Ollama is already running in
the same cluster (e.g. via the ollama-helm chart with a LoadBalancer
service on port 11434, as in ollama-current-values.yaml), and reach it over
the cluster-internal service DNS name rather than a LAN IP:
kubectl apply -f k8s/configmap.yaml
kubectl apply -f k8s/deployment.yaml
kubectl apply -f k8s/service.yamlk8s/configmap.yaml ships pointing OLLAMA_BASE_URL at
http://ollama.ash4d.com:11434; edit it if your Ollama lives elsewhere
(e.g. the cluster-internal http://ollama.ollama.svc.cluster.local:11434
when both run in the same cluster). Adjust the
image reference in k8s/deployment.yaml to wherever you push the built
image. The manifests expose the server via streamable-http on a ClusterIP
service fronted by an Ingress at https://mcp-ollama.ash4d.com/mcp
(k8s/ingress.yaml). TLS is required because Claude's custom-connector UI
only accepts https URLs; the host resolves to a private IP, so provision the
cert via cert-manager DNS-01 or an existing wildcard secret (see the comments
in ingress.yaml). Register the connector in Claude (desktop or Claude Code)
as https://mcp-ollama.ash4d.com/mcp.
Security notes
File-aware tools are confined to
OLLAMA_MCP_ALLOWED_DIRvia path resolution + containment checks -- paths that resolve outside it (e.g.../../etc/passwd) are rejected.batch_refactorwrites are opt-in (dry_run=False) and capped in count (OLLAMA_MCP_MAX_BATCH_FILES) and per-file size (OLLAMA_MCP_MAX_FILE_BYTES).This server has no authentication of its own. If you deploy it with a network transport (
sse/streamable-http), keep it on a trusted LAN or put it behind a network policy / VPN -- do not expose it to the public internet.
Development
pip install -e ".[dev]"
pytestTests mock all Ollama HTTP calls (via respx) and use tmp_path for file
operations, so they run offline and don't need a real Ollama instance.
License
MIT -- see LICENSE.
Available Tools
9 toolsbatch_refactorA
Apply a refactor instruction to every file matching a glob pattern, sequentially.
glob_pattern matches relative paths under root_dir (default: the
server's allowed base directory), e.g. "src/**/*.py". Files are
processed one at a time against the local model. With dry_run=True
(the default) nothing is written -- you get a unified diff per file to
review first; set dry_run=False to write accepted changes to disk.
Large match sets are capped (see OLLAMA_MCP_MAX_BATCH_FILES) to avoid
runaway sequential runs.
| Name | Required | Description | Default |
|---|---|---|---|
| think | No | ||
| dry_run | No | ||
| root_dir | No | ||
| instruction | Yes | ||
| glob_pattern | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description details key behaviors: sequential processing per file, default dry_run to prevent writes, capping of large match sets via OLLAMA_MCP_MAX_BATCH_FILES, and the need to set dry_run=False to apply changes. No annotations are provided, but the description fully compensates.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single paragraph that front-loads the main purpose and then explains parameters and behavior. It is reasonably concise, though a bullet list could improve scanability.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the output schema exists and the description covers purpose, parameters, safety (dry run), limitations (capping), and procedural details, the description is complete enough for an agent to select and invoke the tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage, the description is essential. It explains glob_pattern as matching relative paths under root_dir, root_dir's default behavior, dry_run's default value, and that instruction is the refactor directive. All parameters are effectively documented.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action ('Apply a refactor instruction') and the resource ('every file matching a glob pattern, sequentially'). It distinguishes from sibling tools like refactor_code, which likely targets single files.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explains that the tool is for sequential refactoring across multiple files matching a glob pattern, with dry_run defaulting to true for safety. It mentions the environment variable cap but does not explicitly list when not to use or alternative tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
code_review_diffA
Review a git diff (e.g. git diff main...HEAD) as if for a pull request.
Provide exactly one of diff (inline diff text) or diff_file (a
server-side path to a saved diff). context can carry the PR
description or any background the model should know.
| Name | Required | Description | Default |
|---|---|---|---|
| diff | No | ||
| think | No | ||
| context | No | ||
| diff_file | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It only states it 'reviews a diff as if for a pull request' but does not disclose whether it is read-only, if it requires authentication, or what happens if both diff and diff_file are provided (schema allows both as optional). Missing behavioral traits.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, straight to the point, with no extraneous information. Every sentence adds value: first defines the tool, second gives parameter guidance.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 4 parameters, 0% schema coverage, and no annotations, the description partially covers parameter semantics but omits one parameter ('think'). It does not need to explain return values because an output schema exists. Still, the omission and lack of constraints leave it somewhat incomplete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
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. It explains 'diff' as inline diff text, 'diff_file' as a server-side path, and 'context' as PR description. However, it fails to explain the 'think' parameter, leaving that undocumented.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Review a git diff... as if for a pull request.' This is a specific verb (review) and resource (git diff), and it distinguishes from sibling tools like 'explain_code' or 'review_code' by focusing specifically on diffs.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly says 'Provide exactly one of diff or diff_file' and explains the role of 'context'. It provides clear guidance on parameter usage, though it does not explicitly mention when not to use this tool or compare with alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
explain_codeA
Explain what code does, including control/data flow and non-obvious behavior.
Provide exactly one of code or file_path. Explanations are usually
fast enough that think=False (the default) is sufficient.
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | ||
| think | No | ||
| file_path | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden. It mentions that explanations are usually fast, implying low latency, but does not disclose other behavioral traits like access to file system, error handling, or rate limits. The output schema exists, so return format disclosure is not required.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise, with two clear sentences. The first front-loads the purpose, and the second provides critical usage guidance. No unnecessary words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has 3 parameters (0 required) and an output schema, the description covers purpose, parameter usage, and a hint about performance. It could mention what happens if neither code nor file_path is provided, but overall it's sufficiently complete for its complexity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
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. It meaningfully explains that code and file_path are mutually exclusive and that think=False is usually sufficient. This adds significant clarity beyond the schema's defaults, though it could detail accepted formats for code or file_path.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool explains code, including control/data flow and non-obvious behavior. It specifies the action (explain) and resource (code), and implicitly distinguishes from sibling tools like review_code or fix_code.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit guidance to provide exactly one of code or file_path, and suggests that think=False is usually sufficient. However, it does not explicitly state when not to use this tool versus alternatives, though the purpose alone provides some differentiation.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
fix_codeA
Diagnose and fix a bug in code, given an optional error message or symptom.
Provide exactly one of code or file_path. Include error_message
(a stack trace, test failure, or description of wrong behavior) whenever
you have one -- it substantially improves fix quality.
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | ||
| think | No | ||
| file_path | No | ||
| error_message | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, so the description must disclose behavior. It implies fixing a bug (mutation) but does not specify whether the tool modifies the original code, returns a diff, or requires permissions. The output schema exists but is unused in the description.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short, focused sentences with no redundant information. The first states purpose, the second gives constraints and tips.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with 4 parameters and no annotations, the description covers parameter usage but lacks information on return format, side effects, and behavioral details. An output schema exists but is not leveraged.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description explains the mutual exclusivity of 'code' and 'file_path' and the value of 'error_message', adding meaning to the 0% schema coverage for parameters. However, 'think' is not described.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Diagnose and fix a bug' and the resource 'code', distinguishing it from sibling tools like generate_code (creation) or explain_code (explanation).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It explicitly states to provide exactly one of 'code' or 'file_path' and to include 'error_message' when available, giving clear usage guidance. However, it does not directly compare with sibling tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
generate_codeA
Generate new code from a natural-language instruction using the local Ollama model.
Pass context_file (a server-side path) instead of pasting an existing
file's contents to give the model style/API context without spending
your own context window on it. Set think=False for faster, simpler
generations; leave think=True for anything non-trivial.
| Name | Required | Description | Default |
|---|---|---|---|
| think | No | ||
| language | No | ||
| instruction | Yes | ||
| context_file | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Mentions use of local Ollama model and server-side path for context_file, but does not disclose important behavioral traits such as file creation, network calls, or model limitations. No annotations present to supplement.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Every sentence is purposeful and provides actionable guidance. Information is front-loaded, with efficient use of words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Covers key parameter usage but omits output mechanism (e.g., where generated code is returned or saved). Output schema exists but description does not mention it, leaving the return format unclear.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Adds meaning to 'think' (speed vs completeness) and 'context_file' (server-side path for context), but does not explain 'language' parameter at all, leaving it ambiguous despite being optional.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description explicitly states it generates new code from natural-language instructions using a local Ollama model, differentiating it from sibling tools like 'review_code' or 'fix_code' which operate on existing code.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides clear advice on when to set 'think' to False vs True and how to use 'context_file' to preserve context window, but does not compare with sibling tools to guide selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ollama_statusA
Check connectivity to the configured Ollama host and report available models.
Call this first if other tools are failing, or proactively before a batch of delegated work, to confirm the local model is reachable and pulled before relying on it.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden. It discloses that the tool checks connectivity and reports available models, and mentions it confirms a model is 'reachable and pulled'. A slight gap: it doesn't specify whether it tests anything beyond basic reachability or what 'available' means, but it's largely transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences: first states purpose, second provides usage context. Every word earns its place with no redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's low complexity (no params, simple health check), the description is fully complete. The existence of an output schema covers return values, and the description covers connectivity and model availability.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
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% (trivially). The description adds no parameter info, but none is needed. Baseline score of 4 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('Check connectivity') and resource ('Ollama host') and clearly states the output ('report available models'). It distinguishes itself from sibling tools which are all code-related operations.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly advises to call this tool first if other tools fail or proactively before delegated work, providing clear when-to-use guidance. It implies the tool is for diagnostics and readiness checks.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
refactor_codeA
Refactor code according to an instruction, preserving external behavior.
Provide exactly one of code or file_path. Returns the full refactored
code plus a summary of changes; this tool does not write files itself --
use batch_refactor if you want changes applied to disk.
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | ||
| think | No | ||
| file_path | No | ||
| instruction | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries full burden. It discloses that the tool returns full refactored code plus a summary, does not write files, and preserves external behavior. However, it does not mention handling of invalid inputs or permissions for file_path.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences that front-load the purpose, then provide usage rules and an alternative tool. No wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no annotations and output schema present, the description covers purpose, usage, behavior, and return type adequately. However, the undocumented 'think' parameter is a gap for completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so description must compensate. It explains that 'code' and 'file_path' are mutually exclusive and describes 'instruction', but does not document the 'think' parameter. Partial coverage but misses one parameter.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool refactors code based on an instruction while preserving external behavior. It distinguishes itself from sibling tools like batch_refactor by noting that it does not write files.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly states to provide exactly one of 'code' or 'file_path', and provides an alternative tool (batch_refactor) for applying changes to disk. This gives clear context on when to use this tool vs alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
review_codeA
Review code for correctness bugs, security issues, and simplification opportunities.
Provide exactly one of code (inline text) or file_path (a server-side
path read directly by this tool, saving your context window). focus
can narrow the review, e.g. "concurrency" or "input validation".
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | ||
| focus | No | ||
| think | No | ||
| file_path | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It explains that `file_path` is a server-side path read directly by the tool, indicating no side effects. It also mentions 'saving your context window,' adding useful behavioral context. However, it does not explicitly state read-only or disclose any potential consequences.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise, front-loaded with the purpose, and each sentence adds value. No redundant or unnecessary text.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity (4 params, no required, no enums, has output schema), the description covers the essential input selection and purpose. With an output schema present, it does not need to detail return values. It is complete enough for an AI agent to use correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
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. It explains `code` (inline text), `file_path` (server-side path), and `focus` (e.g., 'concurrency' or 'input validation'). The guideline to provide exactly one of code/file_path adds value. However, the `think` parameter (boolean, default true) is not explained, but it is likely internal.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states 'Review code for correctness bugs, security issues, and simplification opportunities.' The verb 'review' and resource 'code' are specific, and listing the aspects distinguishes it from siblings like fix_code (fixing) and explain_code (explaining).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides clear guidance on input selection: 'Provide exactly one of `code` or `file_path`' and explains that `focus` can narrow the review. However, it does not explicitly state when not to use this tool or compare to siblings like code_review_diff or explain_code, though the context is implied.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
write_testsA
Write tests covering the golden path and realistic edge cases for given code.
Provide exactly one of code or file_path. Set framework (e.g.
"pytest", "jest") to match your project's conventions; otherwise the
model infers one from the code's language.
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | ||
| think | No | ||
| file_path | No | ||
| framework | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries full burden. It describes input handling but omits behavioral traits such as whether tests are appended or overwritten, permissions needed, or side effects. Transparency is limited.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three sentences, front-loaded with purpose, no superfluous words. Efficient and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 4 parameters, no annotations, and an output schema that is not described, the description covers usage but lacks detail on return values, error handling, and the 'think' parameter. Adequate but with gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so description must compensate. It explains the mutual exclusivity of code and file_path and hints at framework inference, but does not mention the 'think' parameter. Adds moderate value but not full coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states the tool writes tests covering golden path and realistic edge cases, with a specific verb and resource. It distinguishes from sibling tools that focus on refactoring, reviewing, or explaining code.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Description gives clear input constraints (exactly one of code or file_path) and hints at framework selection, but does not explicitly state when not to use or list alternatives. Context is clear but lacks exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Each tool has a clearly distinct purpose: code generation, explanation, review, debugging, refactoring (single and batch), test writing, diff review, and status check. No two tools overlap in functionality.
All tools follow a consistent verb_noun snake_case pattern (e.g., explain_code, fix_code, batch_refactor). No mixed conventions or vague names.
9 tools is a well-scoped set for a code assistance server. It covers the essential operations without being overwhelming or too sparse.
The set covers generation, explanation, review, debugging, refactoring, test writing, and status checking. Minor gaps like code documentation or execution are absent, but the core workflow is well-supported.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
An MCP server that gives your AI access to the source code and docs of all public github repos
Augments MCP Server - A comprehensive framework documentation provider for Claude Code
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceAn MCP server that provides agentic code review powered by OpenAI-compatible models, designed for use with Claude Code.1MIT
- AlicenseNot gradedqualityCmaintenanceMCP server that lets Claude Code delegate mechanical tasks to a local LLM for summarization, classification, extraction, and drafting.1210MIT
- FlicenseNot gradedqualityCmaintenanceMCP server that lets Claude Code offload simple tasks like code explanation, writing tests, and adding comments to a local Ollama model, saving Claude API tokens.
- FlicenseNot gradedqualityCmaintenanceMCP server that lets Claude Code dispatch tasks to the LiteLLM gateway, supporting both local Ollama models and Anthropic models via the gateway.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/darthzen/ollama-code-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server