Skip to main content
Glama
Unified MCP Server

Unified MCP Server

by qingyunyupan

code_review

Reviews code for best-practice gaps, security vulnerabilities, performance issues, and code smells, then returns prioritized improvement suggestions.

Instructions

全面审查代码质量,包括最佳实践遵循度、安全漏洞、性能问题、代码异味等。提供优先级排序的改进建议。

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>",
      "language": "<language>"
    },
    "name": "code_review"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYes要审查的代码
focusNo审查重点(可选)
languageYes代码语言

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full burden, and it does disclose the review dimensions and the output shape (priority-ranked suggestions). However, it says nothing about whether code leaves the local environment, permission or auth requirements, size or rate limits, or whether the review is read-only — meaningful gaps for an unannotated tool.

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 sentences, zero filler, with the scope (what is reviewed) front-loaded ahead of the outcome (prioritized suggestions). Nothing restates the name or title redundantly.

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?

For a three-parameter tool with no output schema, the description is adequate: it explains what is examined and that results are prioritized suggestions, partly compensating for the missing output schema. It remains incomplete on routing against the many sibling code tools and on any operational constraints, which matters given the absence of annotations.

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 all three parameters (code, language, focus) are already documented in the schema, which sets the baseline at 3. The description's list of review dimensions loosely hints at what the optional 'focus' parameter controls, but it adds no syntax, format, or enum meaning beyond the schema.

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 names a specific verb-and-resource combination ('全面审查代码质量') and enumerates concrete review dimensions: best-practice adherence, security vulnerabilities, performance issues, and code smells. It clearly tells an agent what the tool returns (prioritized improvement suggestions), though it never distinguishes itself from near-name siblings like code_analyze or code_improve.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no when-to-use or when-not-to-use guidance, and no alternative tool is named. An agent facing code_analyze, code_debug, code_improve, and code_review together gets no signal about which one this is for; the only guidance is the implicit 'use this to review code'.

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