Skip to main content
Glama

ai_code_review

Read-only

AI code review — Review a code snippet for bugs, security problems, performance and maintainability: verdict (APPROVE / APPROVE WITH NITS / REQUEST CHANGES), issues with severity, line and suggested fix, plus strengths. Price: $0.01 USDC (Base, via x402).

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": "ai_code_review"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYesthe code to review
languageNooptional language hint

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=true, so the safety profile is covered. The description adds value the annotations cannot: it discloses a real cost ($0.01 USDC on Base via x402) and specifies the return shape — verdict enum values, per-issue severity/line/fix, plus strengths. It does not mention size limits or latency, which keeps it below a 5.

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?

A single dense sentence front-loads purpose, then output contents, then price — the ordering matches what an agent needs to decide. The colon-separated list is efficient, though the sentence is long enough that the price clause could be separated for scannability.

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?

There is no output schema, so the description must describe returns, and it does so concretely (verdict values, issues with severity/line/fix, strengths). For a two-parameter tool this is nearly complete; only input constraints like maximum snippet length are unstated.

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% (both 'code' and 'language' documented in the schema), so the schema carries parameter meaning. The description adds nothing about format, size limits, or what the optional language hint changes, so baseline 3 applies.

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 uses a specific verb ('Review') plus a concrete resource ('a code snippet') and enumerates the exact dimensions checked: bugs, security, performance, maintainability. It stops short of distinguishing itself from the adjacent sibling ai_explain_code, so an agent must infer that review-diagnosis differs from explanation.

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?

Usage is implied by the enumerated review dimensions and the verdict output, which signals 'use when you want a judgment on code.' There is no explicit when-to-use/when-not guidance and no named alternative such as ai_explain_code for plain explanation requests.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources