Skip to main content
Glama

explain_selection

Get transparency into selected context: shows why symbols were included or dropped, with scores and token costs, so you can inspect, filter, or adjust the selection.

Instructions

Explain why symbols were included or dropped from context.

Returns the included symbols (with scores and token costs) and the dropped symbols (scored but cut by the token budget), so an agent can inspect or filter the selection.

Args: repo_path: Absolute path to the repository. If omitted, uses the --repo from server startup. symbol: The changed symbol ID to build context for. max_tokens: Token budget (default 8000).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolNo
repo_pathNo
max_tokensNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

No annotations are provided, so the description carries full burden here. It is transparent about the behavior: included symbols are returned with scores and token costs, and dropped symbols are scored but cut by the token budget. It does not explicitly state side effects or authorization requirements, but its read-only nature is strongly implied.

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 front-loaded with the core purpose, then the return behavior, then a compact Args block. Every sentence adds value; there is no filler or unrelated detail.

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?

Despite having no annotations, the description covers the essential aspects needed to invoke the tool: what it does, what it returns, and what each parameter means. The only notable gap is the lack of comparative routing guidance against the sibling tools.

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

Parameters4/5

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

Schema property descriptions have 0% coverage, so the description must compensate. It does: repo_path is 'Absolute path to the repository' with a fallback to the --repo startup value, symbol is described as 'The changed symbol ID to build context for,' and max_tokens is defined as a 'Token budget' with a default. This adds meaningful semantics beyond the raw 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 clearly states the tool's purpose with a specific verb and resource: 'Explain why symbols were included or dropped from context.' It also details what is returned. It does not explicitly compare itself to siblings such as compile_context or verify_retrieval, but the purpose is specific enough to be distinguished from them.

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 description implies usage context: after context selection, an agent can 'inspect or filter the selection.' It also explains parameter defaults such as using the startup repo when repo_path is omitted. However, it does not explicitly state when to use this tool over its siblings or when not to use it.

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/trakshan-mishra/Diffcontext'

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