Skip to main content
Glama

ast_search

Search code by structural AST patterns to locate specific code structures. Read-only operation for safe repository analysis.

Instructions

Structural AST search. Read-only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNo
pathsYes
patternYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

C2.3/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden. It only asserts 'Read-only,' which is a minimal safety hint, but says nothing about the pattern language, mode semantics, path limits, or result shape.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two fragments are concise but severely under-specified for a three-parameter structural search tool. It is not verbose, but the extreme brevity omits information an agent needs, making the sizing inappropriate rather than efficient.

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

Completeness1/5

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

With no annotations, no output schema, and 0% parameter description coverage, the description is far too sparse. Critical details such as pattern syntax, mode behavior, path constraints, and result format are entirely absent.

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

Parameters1/5

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

Schema description coverage is 0% for three parameters, including a 'mode' enum ('text' vs 'query') whose meaning is critical for correct invocation. The description adds no meaning beyond the bare schema, so it fails to compensate for the coverage gap.

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 gives a specific verb+resource ('Structural AST search'), which is clearer than a generic 'search' sibling. However, it does not differentiate itself from siblings like 'search' or 'lsp_symbols', leaving the agent to infer the structural/AST distinction on its own.

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 when-to-use guidance, no alternatives, and no conditions are stated. 'Read-only' is a safety property, not usage guidance, so the agent has no direction on when this tool beats 'search' or 'lsp_symbols'.

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