Skip to main content
Glama
aimasteracc

tree-sitter-analyzer

search

Read-onlyIdempotent

Find code by symbol name, AST pattern, text regex, or graph selector. Supports batch and chain operations.

Instructions

Code-intelligence (codegraph-compatible) search facade. Covers codegraph_symbol_search (BM25), codegraph_query (tree-sitter AST), codegraph_query chain DSL, and ripgrep/fd text search in one tool. Pick a capability via action:

  • action=symbol — BM25 FTS lookup of a symbol by name (fast 'where is X defined', codegraph_symbol_search equivalent). Params: query, language, kind, limit.

  • action=query — tree-sitter .scm query DSL (semantic AST match, NOT the same as symbol). Params: query_key, query_string, filter, file_path.

  • action=content — ripgrep text/regex search across files. Params: query, roots, include_globs, ...

  • action=grep — two-stage fd (file discovery) + ripgrep search. Params: query, roots, ...

  • action=batch — run multiple search queries in one call. Params: queries.

  • action=chain — jQuery-style codegraph chain DSL: compose search → explore → callers → callees in one process. Params: chain/program, default_limit, include_source.

  • action=select — Hyphae DSL, a CSS-selector-style graph query (RFC-0003). ONE selector replaces chains of navigate/callers/search: #name, .kind (.function/.method/.class), *, :calls(#X), :callees(#X), :not(sel), :in(path), [file=p]/[language=l]/[class=C], combinators A > B / A B. Example: '.function:calls(#IndexShard):in(server/)'. Params: selector (required), max_results, output_format.

  • action=subscribe — RFC-0001 reactive push: subscribe to a Hyphae selector. Receive send_resource_updated when results change; re-read resource_uri. Returns { sub_id, resource_uri }. Params: selector (required), min_interval.

  • action=unsubscribe — cancel a Hyphae subscription. Params: sub_id or selector.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesWhich capability to invoke. One of: batch, chain, content, grep, query, select, subscribe, symbol, unsubscribe
scopeNoAction discriminator (e.g. point|graph).
modeNoAction sub-mode (e.g. summary|cycles).
file_pathNoTarget file path.
symbolNoSymbol/function name.
function_nameNoFunction name (alias of symbol).
queryNoSearch query/pattern.
languageNoLanguage hint (usually auto).
limitNoMax results.
output_formatNoOutput format (toon|json).
Behavior3/5

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

Annotations already indicate read-only, idempotent, and non-destructive behavior. The description adds context about each action's nature (e.g., 'fast' for symbol, 'semantic AST match' for query) but does not disclose additional behavioral traits like rate limits or auth requirements. The description does not contradict annotations.

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 well-structured with a clear introduction followed by a bulleted list of actions. It is appropriately sized for the complexity of the tool, but could be slightly more concise by avoiding repetition of 'Params:' for each action since the schema already lists parameters. Overall, it is efficient and front-loaded.

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 tool's complexity (10 parameters, many actions) and the absence of an output schema, the description adequately explains each action's purpose and relevant parameters. However, it lacks details on return values for most actions (only subscribe mentions a return structure). This gap moderately affects completeness.

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?

The input schema already describes all parameters with 100% coverage. The description adds meaning by mapping parameters to specific actions (e.g., for action=symbol: limits to query, language, kind, limit). This clarifies which parameters are relevant for each action, adding value beyond the schema's generic descriptions.

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 explicitly states the tool is a unified search facade covering multiple code-intelligence search capabilities. It lists each action with a specific verb and resource (e.g., 'BM25 FTS lookup of a symbol', 'tree-sitter .scm query DSL'), clearly distinguishing the tool from siblings like 'edit' or 'health' which are not search tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for each action, explaining what each action does and listing its parameters. However, it does not explicitly state when not to use this tool or compare it to alternative search tools that might exist outside the sibling list. The guidance is sufficient for choosing among the actions but lacks explicit exclusions.

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/aimasteracc/tree-sitter-analyzer'

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