Skip to main content
Glama
Xayan

ast-outline-mcp

by Xayan

ast_grep

Search code structurally using AST patterns. Groups matches by enclosing class or function, filtering out comment and string noise.

Instructions

AST-aware structural search across files. Matches are grouped by enclosing class/function, with kind tags [def]/[import]. Comment/string noise is filtered by default. Regex is auto-detected.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
jsonNoReturn machine-readable JSON output
kindNoNarrow results by classification kind
countNoShow match counts per file (-c)
pathsYesFile or directory paths to search
patternYesSearch pattern (literal or regex, auto-detected)
maxCountNoMaximum number of matches per file (-m)
filesOnlyNoList matching files only (-l)
wordMatchNoMatch whole words only (-w)
caseInsensitiveNoCase-insensitive matching (-i)
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 grouping behavior, kind tags, comment/string noise filtering, and regex auto-detection, which is helpful. However, it does not mention side effects, performance characteristics, or output format, leaving gaps.

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?

Two concise sentences front-load the core purpose and follow with key details. Every sentence is informative with no waste.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 9 parameters, no output schema, and no annotations, the description lacks information on the return format or how to interpret results. It mentions grouping but does not describe the human-readable output structure, leaving the agent underinformed.

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 coverage is 100%, so baseline is 3. The description adds meaning beyond schema by explaining that matches are grouped by enclosing class/function and that kind tags like [def]/[import] are used, enriching understanding of the kind parameter and output structure.

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 it is an AST-aware structural search across files, with grouping by class/function, kind tags, and noise filtering. This distinguishes it from sibling tools like ast_digest and ast_outline, though it does not explicitly contrast them.

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 provides no guidance on when to use this tool versus alternatives, nor does it include any prerequisites or exclusions. It only describes features without contextual usage advice.

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/Xayan/ast-outline-mcp'

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