Skip to main content
Glama

code_explain

Explains code elements like file paths, classes, or functions by analyzing dependencies and context. Set analysis depth to control detail.

Instructions

Explain code element with dependency context

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
elementYesFile path, class or function name
depthNoAnalysis depth
Behavior3/5

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

No annotations are provided, so the description carries the burden. It adds 'with dependency context' as behavioral context, indicating the tool considers dependencies. However, it does not disclose whether the tool is read-only, requires permissions, or produces side effects. For a basic explain tool, this is adequate but not comprehensive.

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?

Description is a single, front-loaded sentence with no wasted words. It could be improved by adding a brief example or clarifying the meaning of 'dependency context', but it is efficient.

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?

With a simple 2-parameter schema and no output schema, the description is minimal. It does not describe the return value or format of the explanation. While adequate for a straightforward tool, it leaves the agent to infer outputs.

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 no additional meaning beyond the schema's field descriptions. The schema describes 'element' and 'depth' clearly, though 'depth' as 'Analysis depth' remains vague.

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 verb (explain) and resource (code element) with qualifier (dependency context), distinguishing it from sibling tools like find_similar_code or impact_analyze. However, it doesn't specify the format or level of detail of the explanation.

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?

No explicit guidance on when to use this tool versus alternatives, such as when dependency context is not needed or when to use find_similar_code instead. Usage is only implied by the description.

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/lexCoder2/lxDIG-MCP'

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