Skip to main content
Glama
Unified MCP Server

Unified MCP Server

by qingyunyupan

code_debug

Identify bugs, logic errors, and potential issues in Python or JavaScript code, and get detailed analysis plus fix suggestions for runtime or logic errors.

Instructions

识别代码中的Bug、逻辑错误或潜在问题,提供详细的问题分析和修复建议。支持调试运行时错误和逻辑错误。

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_debug"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYes有问题的代码
languageYes代码语言
error_messageNo错误信息(如果有)
expected_behaviorNo期望的行为(可选)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full disclosure burden, and it does indicate the tool returns problem analysis and repair suggestions rather than modifying code. It does not state whether the code is only read, whether any files are touched, or what the response looks like, so significant behavioral gaps remain.

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?

Two tight sentences with the primary purpose front-loaded and the supported error categories following. No filler or repetition, though the second sentence could have been folded into the first.

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 four-parameter, read-only analysis tool with no output schema, the description covers what the tool does and roughly what it returns. It is still missing sibling differentiation and any note on limits or prerequisites, which leaves it only minimally adequate.

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% and all four parameters are documented in the schema, so the schema already does the heavy lifting. The description adds no per-parameter meaning, such as how error_message interacts with expected_behavior, which is the baseline case for full coverage.

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 states a specific verb and resource: identify bugs, logical errors, or potential issues in code and supply analysis plus fix suggestions. It also narrows the scope to runtime errors and logic errors. It does not, however, distinguish itself from closely named siblings such as code_analyze, code_review, 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 Guidelines3/5

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

The mention of supporting runtime-error and logic-error debugging implies when the tool applies, but there is no explicit when-to-use guidance and no statement of when to prefer a sibling such as code_review or code_analyze. The agent must infer the selection criteria.

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