Skip to main content
Glama
lfylow
by lfylow

review_code_snippet

Submit a code snippet and specify its programming language to receive an automated code review.

Instructions

Review a code snippet (not from a file) in the specified language.

Use this when you have a small piece of code to review that isn't in a file yet, or when you want to review an isolated snippet.

Args: code: The source code to review. language: Programming language (python, javascript, rust, go, etc.)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes
languageNopython

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

No annotations are provided, so the description bears full responsibility for behavioral disclosure. The description only says 'review' but does not explain what the review entails, what output is returned, or any side effects. Since an output schema exists but isn't described, the agent lacks critical behavioral insights beyond the basic operation.

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 with no wasted sentences. It opens with a clear purpose statement, follows with a usage paragraph, and then lists parameters. The structure is front-loaded and easy to parse. Every sentence adds value.

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?

Given the tool's simplicity (2 parameters, one required, no annotations), the description covers the main aspects: what it does, when to use it, and what parameters are needed. However, it omits the output format (despite an output schema existing) and lacks behavioral details. It is minimally adequate but not fully comprehensive.

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%, but the description compensates by listing both parameters in an Args block with brief explanations: 'code: The source code to review' and 'language: Programming language (python, javascript, rust, go, etc.)'. This adds meaning beyond the schema, which only provides titles and types. However, it does not clarify defaults or constraints beyond examples.

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 states the verb 'review' and the resource 'code snippet' and explicitly distinguishes it from file-based review by saying 'not from a file'. It also mentions the language parameter, making the purpose unambiguous and differentiating it from sibling tools like review_code_file and review_git_diff.

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 states when to use the tool: 'when you have a small piece of code to review that isn't in a file yet, or when you want to review an isolated snippet.' It does not explicitly state when not to use or name alternatives, but the sibling tools provide context for exclusion. This is clear but not exhaustive.

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/lfylow/codereview-mcp'

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