Skip to main content
Glama

code_review

Check code for naming, comment coverage, long functions, duplicated blocks, and SEARCH/REPLACE diff issues using deterministic regex. Filters shallow problems before deep review.

Instructions

Shape-level code check (deterministic regex, zero LLM): naming, comment coverage, long functions, duplicated blocks, diff review (SEARCH/REPLACE). Clears shallow noise before deep review — not a correctness verdict.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
diffNoPatch to review block-by-block: SEARCH/REPLACE (<<<<<<< SEARCH ... ======= ... >>>>>>> REPLACE) or unified diff (--- a/x.js / +++ b/x.js / @@ hunks). Pass one of file/source/diff; diff wins over source/file
fileNoFile path relative to workspace_dir to review (reads from disk)
sourceNoSource code text to review (mutually exclusive with file; source wins if both passed)
max_issuesNoMax issues to return (default: 50)
workspace_dirYesREQUIRED: absolute path of the project root to review code in

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A3.7/5.0
Behavior3/5

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

No annotations are provided, so the description carries full burden. It discloses deterministic regex, zero LLM, and the shape-level scope, which are valuable behavioral traits. Yet it omits side effects (e.g., whether it reads or writes files), permission requirements, or return format, which are important for a tool with no output schema.

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?

Two concise sentences front-load the essential qualifier ('Shape-level code check, deterministic regex, zero LLM') and include avoidable filler. Every phrase adds value, such as 'clears shallow noise before deep review.'

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has 5 parameters and no output schema, so the description must carry more weight. It explains purpose and scope, and the 'max_issues' parameter implies a list of issues is returned, but the return structure and interpretation guidance are not described. This is adequate but not comprehensive.

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 adds context about the types of checks performed (naming, comments, etc.) that map to expected outputs, but it does not clarify parameter precedence or add meaning beyond the schema's own descriptions.

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?

Description clearly states it performs a 'shape-level code check' covering naming, comment coverage, long functions, duplicated blocks, and diff review. It distinguishes itself from correctness-focused tools by noting it is 'not a correctness verdict,' but does not explicitly contrast with siblings like 'code_quality' or 'style_sniffer.'

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 gives clear usage context: use it to 'clear shallow noise before deep review,' implying it is a preliminary check. It also excludes correctness judgments. However, no alternative tool names are mentioned, so guidance on when not to use specific siblings is absent.

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

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/wulun811/LiuHe'

If you have feedback or need assistance with the MCP directory API, please join our Discord server