Skip to main content
Glama

review_code

Review code for correctness bugs, security issues, and simplification opportunities. Optionally narrow review to specific areas like concurrency or input validation.

Instructions

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".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeNo
focusNo
thinkNo
file_pathNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters4/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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.

Install Server

Other Tools

Latest Blog Posts

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