Skip to main content
Glama

代码逐行讲解(按次计费)

codeexplain

按读者水平(零基础→资深)拆解代码逻辑、关键点与坑。按次计费:业务成功才确认扣款,内容违规、模型超时或生成失败会自动全额退款。

Input Schema

NameRequiredDescriptionDefault
codeYes要讲解的代码,最多 20000 字符。
levelNo读者水平:beginner=零基础 / intermediate=中等 / expert=资深。intermediate
languageNo代码语言,不填自动判断。
requestIdNo幂等键。同一次业务重试时复用同一个值,可避免重复扣费。

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations provided, the description carries the full behavioral burden. It usefully discloses the billing model: pay-per-use, charge confirmed only on business success, and automatic full refund on content violation, model timeout, or generation failure. It does not mention authentication, rate limits, or what the output looks like, so it is strong but not complete.

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 two compact sentences with no wasted words. The core purpose is front-loaded, followed immediately by the critical billing and refund terms.

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?

For a code-explanation tool with a rich schema but no output schema, the description covers the core function, reader-level adaptation, and important billing/refund behavior. It omits some details, such as output structure and length limits already present in the schema, but is largely complete for correct invocation.

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 parameters are already documented in the schema. The description references reader level (zero-basis to expert), which maps to the level parameter, but adds no syntax, constraints, or meaning beyond what the schema provides. Baseline 3 is appropriate.

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 clearly states a specific verb and resource: break down (拆解) code logic, key points, and pitfalls according to reader level. It is clear what the tool does, but it does not explicitly distinguish itself from sibling tools such as review or errfix, which could also involve analyzing code.

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 only implied: the tool is for explaining code at a chosen reader level. There is no explicit guidance on when to choose this over review, errfix, or codetrans, and no stated exclusions or prerequisites.

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.