Skip to main content
Glama
banderzhm
by banderzhm

ast

Retrieve detailed AST and synthetic module context for C++20/23 module declarations and imports.

Instructions

Return clangd's detailed AST plus synthetic module context for module declarations/imports.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYes
endLineNo
startLineNo
endCharacterNo
startCharacterNo
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses that the output includes the AST and synthetic module context, which is useful, but does not detail output format, size limits, performance implications, or error conditions. It adds some transparency but is 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?

The description is a single, concise sentence that is front-loaded with the core purpose. It has no filler and directly states what the tool returns, though it could be slightly more structured by adding a note about parameter usage.

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?

Given the complexity of returning a detailed AST, the description is somewhat minimal. It mentions synthetic module context, which is helpful, but lacks details on output structure or how range parameters affect the result. With no output schema and no annotations, it does not fully cover the context needed for an agent to use it correctly.

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 schema has 5 parameters with 0% description coverage, and the description does not explain any parameters. It mentions the file and module context but does not clarify the role of startLine, endLine, startCharacter, or endCharacter beyond their names. The description fails to compensate for the low schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool returns clangd's detailed AST and adds synthetic module context for module declarations/imports. It uses a specific verb ('Return') and distinguishes from sibling tools like document_symbols and module_graph, which serve different purposes.

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 for inspecting AST and module context, but does not explicitly state when to use this tool versus alternatives like document_symbols or module_search. There are no exclusions or explicit context provided, so guidance is mostly implied.

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/banderzhm/ModAST-MCP'

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