Skip to main content
Glama

code_review_local

Run a local first-pass code review to catch obvious bugs, style issues, and risky patterns before deep cloud analysis, reducing cloud costs.

Instructions

Run a quick first-pass code review using the local coder model.

Use as a cheap pre-filter before asking the cloud model for a deeper review: it catches obvious bugs, style issues, and risky patterns. Runs locally at no cloud cost. Returns review notes as text.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNoOllama model name to run, e.g. 'llama3.1' or 'qwen2.5-coder'. Omit to use the server's configured default model.
diff_or_codeYesA unified diff or a code block to review.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.1.3
    • addedInput schema / properties / diff_or_code / description
      Added value: +"A unified diff or a code block to review."
    • addedInput schema / properties / model / description
      Added value: +"Ollama model name to run, e.g. 'llama3.1' or 'qwen2.5-coder'. Omit to use the server's configured default model."
  2. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It discloses local execution ('Runs locally at no cloud cost'), the output format ('Returns review notes as text'), and the shallow/first-pass scope. It does not mention latency, determinism, or resource constraints, but the most important behavioral traits are present.

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 compact and front-loaded: the first sentence states the operation, the second covers use context, and the third covers behavior and output. A slight redundancy exists between 'quick first-pass' and 'cheap pre-filter,' but it earns its place by adding the cost angle. No wasted or filler 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?

For a two-parameter tool with a fully documented schema and an output schema present, the description provides the needed context: purpose, usage scenario, execution environment, and return type. It would benefit from an explicit 'when not to use' note, but nothing essential is missing for a correct call.

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 the schema already documents both `diff_or_code` and the optional `model`. The description adds no new parameter-level meaning beyond reinforcing that the input is a diff or code block. This matches the baseline for fully covered schemas.

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 identifies a specific action ('Run a quick first-pass code review') and a specific resource ('local coder model'), and distinguishes this tool from sibling local tools by naming what it catches: 'obvious bugs, style issues, and risky patterns.' No other sibling tool description suggests this exact code-review role.

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 explicitly frames the tool as a 'cheap pre-filter before asking the cloud model for a deeper review,' giving an unambiguous when-to-use context and an implied alternative. It does not name sibling tools directly or state explicit exclusions, but the pre-filter/deeper-review distinction is concrete enough to route an agent correctly.

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