Skip to main content
Glama

coding_explain_code

Read-only

Understand any code's purpose, structure, and I/O by requesting an explanation tuned for engineers, juniors, product, or executive audiences.

Instructions

Explain how a piece of code works, why it's structured this way, and what its inputs/outputs are. Tunes depth to the requested audience. Args: message: Free-text objective for the action. path (required): File path or symbol to explain. audience: One of: engineer, junior, product, executive.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNo
messageNo
audienceNoengineer

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.1/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is covered by structured data. The description adds that the tool tunes output depth by audience and returns explanations of code behavior, but it does not disclose additional behavioral traits such as whether external resources are accessed or whether explanation can be large. It does not contradict the annotations.

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 compact, front-loaded with the core purpose, and every sentence contributes meaning. The argument list is structured and directly useful, with no filler or redundant restatement of the tool name.

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?

The output schema covers return-value details, and annotations cover the read-only safety profile, so the description does not need to explain those. However, the path-required contradiction and absence of any when-to-use guidance leave an agent uncertain about invocation requirements and tool selection among coding siblings. It is adequate but not complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description provides useful semantics for all three parameters, especially the audience values and what path refers to. However, it explicitly labels path as 'required' while the input schema marks it optional with a null default, which is misleading for an agent deciding whether it can call the tool without a path. With 0% schema description coverage, this mismatch is a significant flaw.

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 uses a specific verb ('Explain') with a clear resource ('a piece of code') and states what the explanation covers: how it works, why it is structured that way, and its inputs/outputs. It also mentions audience tuning, which further clarifies intent. However, it does not explicitly differentiate from sibling tools like coding_read_code or coding_chat, so it falls short of full sibling distinction.

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?

The description gives no explicit guidance on when to choose this tool over alternatives like coding_read_code, coding_search, or coding_chat. It implies usage through its explanatory framing and audience parameter, but it never states exclusions, prerequisites, or scenarios where another tool would be more appropriate.

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

Deploy Server

Other Tools