Skip to main content
Glama

ollama_fix_code

Fixes code bugs and errors using Ollama by passing broken code and error details to generate a corrected version.

Instructions

Fix bugs or errors in code using Ollama. Provide the broken code and error details.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "code": "<code>",
      "error": "<error>"
    },
    "name": "ollama_fix_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYesThe code with issues
errorYesError message or description of the problem
modelNoOllama model to use (default: mistral-small)gemma3:12b

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.1/5.0
Behavior2/5

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

With no annotations, the description carries the full disclosure burden, and it does not say whether the tool edits files or only returns suggested fixes, whether the model runs locally, or that output is non-deterministic LLM generation. Beyond the phrase "using Ollama" there is no behavioral context an agent could act on.

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?

Two short sentences, front-loaded with the action, with no filler. It is tight but underspecified rather than padded, so brevity here costs information rather than gaining clarity.

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?

No output schema and no annotations, yet the description never indicates the shape of the result (patched code, diff, explanation) or how failures are surfaced. For a 3-parameter LLM-backed tool this leaves the agent unable to predict or interpret the response.

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 the baseline is 3; the description restates the code and error inputs without adding format guidance such as whether a stack trace is acceptable. It also omits the model parameter entirely — and the schema's model default (gemma3:12b) conflicts with its own parenthetical (mistral-small), a discrepancy the description does nothing to resolve.

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 and resource ("Fix bugs or errors in code") plus the backend (Ollama), which separates it from siblings like ollama_explain_code or ollama_review_code. It stops short of explicitly differentiating itself from ollama_refactor_code or ollama_generate_code, so an agent must infer the boundary.

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?

"Provide the broken code and error details" implies the situation (you have failing code and an error message) but gives no explicit when-to-use vs. when-to-pick-a-sibling guidance. There are no exclusions and no named alternatives, leaving routing to the agent.

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