Skip to main content
Glama

ollama_review_code

Review code for issues, bugs, security, performance, and best practices with Ollama, then get actionable improvement suggestions.

Instructions

Review code for issues, bugs, or improvements using Ollama. Use this for code quality checks and suggestions.

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>"
    },
    "name": "ollama_review_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYesThe code to review
focusNoWhat to focus on (e.g., 'performance', 'security', 'best practices', 'bugs')general code quality
modelNoOllama model to use (default: mistral-small)gemma3:12b

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.9/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 burden and leaves key behaviors unstated: whether a local Ollama server must be running, whether the code leaves the machine, expected latency for large inputs, and what form the review takes. The only hint of capability is the 'focus' parameter, which is already documented in the schema.

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 with the action front-loaded and no filler. The second sentence is largely redundant with the first and could be replaced with information that actually helps selection.

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?

For an LLM-backed tool with no annotations and no output schema, the definition should state the shape of the returned review and any operational prerequisites. Instead it says nothing about response format, model requirements, or cost, leaving the agent to guess at invocation viability.

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 all three parameters including focus examples and the model default are already documented, and the description adds no syntax or formatting guidance beyond that. Baseline 3 applies, though the schema itself contains an internal inconsistency ('default: gemma3:12b' vs 'default: mistral-small') that 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?

The description names a concrete verb and resource ('Review code') plus the engine ('using Ollama'), and enumerates the target concerns (issues, bugs, improvements). It does not distinguish itself from close siblings such as ollama_explain_code or ollama_review_file, 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 Guidelines2/5

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

'Use this for code quality checks and suggestions' merely restates the purpose sentence rather than giving conditions. There is no mention of when to prefer ollama_explain_code, ollama_fix_code, or ollama_review_file, and no prerequisites such as a running local Ollama instance.

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