Skip to main content
Glama

search

Read-onlyIdempotent

Find symbols in source code by name, kind, or text. Supports filters for language, file pattern, and fuzzy matching.

Instructions

Search symbols by name, kind, or text. Use instead of Grep when looking for functions, classes, methods, or variables in source code. For raw text/string/comment search use search_text instead. For finding who references a known symbol use find_usages instead. Supports kind/language/file_pattern filters. Set fuzzy=true for typo-tolerant search (trigram + Levenshtein). For natural-language / conceptual queries set semantic="on" (requires an AI provider configured + embed_repo run once). Set fusion=true for Signal Fusion — multi-channel ranking (BM25 + PageRank + embeddings + identity match) via Weighted Reciprocal Rank fusion. Use mode to switch retrieval strategy: single (default — top-K, current behavior), tiered (high/medium/low buckets), drill (scope to a parent_path/parent_symbol_id subtree via drill_from), flat (raw FTS hits, cheapest), get (exact path/symbol_id lookup, no search). Read-only. Returns JSON: { items: [{ symbol_id, name, kind, fqn, signature, file, line, score }], total, search_mode } — mode-specific shape when mode!=single. Set output_format: "toon" for lossless TOON encoding — cheaper LLM tokens on tabular payloads.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query
kindNoFilter by symbol kind (class, method, function, etc.)
languageYesFilter by language
file_patternYesFilter by file path pattern
implementsNoFilter to classes implementing this interface
extendsNoFilter to classes/interfaces extending this name
decoratorNoFilter to symbols with this decorator/annotation/attribute (e.g. "Injectable", "Route", "Transactional")
fuzzyNoEnable fuzzy search (trigram + Levenshtein). Auto-enabled when exact search returns 0 results.
fuzzy_thresholdNoMinimum Jaccard trigram similarity (default 0.3)
max_edit_distanceNoMaximum Levenshtein edit distance (default 3)
semanticNoSemantic mode: auto (default — hybrid if AI available), on (force hybrid), off (lexical-only), only (pure vector). Requires AI provider + embed_repo for non-"off" modes.
semantic_weightNoHybrid fusion weight in [0,1]. 0 = lexical only, 0.5 = balanced (default), 1 = semantic only.
fusionNoEnable Signal Fusion Pipeline — multi-channel WRR ranking across lexical (BM25), structural (PageRank), similarity (embeddings), and identity (exact/prefix/segment match). Produces better results than single-channel search.
fusion_weightsNoPer-channel weights for fusion (auto-normalized). Defaults: lexical=0.4, structural=0.25, similarity=0.2, identity=0.15.
fusion_debugNoInclude per-channel rank contributions in fusion results.
limitNoMax results (default 20)
offsetNoOffset for pagination
modeNoMemoir-style retrieval mode: single (default — top-K), tiered (high/medium/low buckets), drill (scoped to drill_from), flat (raw FTS, no PageRank), get (exact lookup). Omit to auto-pick (path-shaped query → get, otherwise → single).
drill_fromNoDrill scope for mode="drill" — a file path or symbol_id. Results are restricted to the subtree rooted here.
detail_levelNoOutput verbosity. "minimal" returns ~40-60% fewer tokens (drops scores, fqn, signatures, summaries — keeps name/file/line). Use when you only need to pick a candidate before drilling in with get_symbol. Default: "default".
output_formatNoOutput format. "json" (default) returns JSON; "toon" returns Token-Oriented Object Notation — 30-60% fewer tokens, lossless. "markdown" is unsupported here and behaves as json.
Behavior4/5

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

Annotations already provide readOnlyHint, destructiveHint, and idempotentHint. The description adds value by stating 'Read-only' and detailing behavioral aspects like fuzzy auto-enable, fusion pipeline, mode-specific return shapes, and output format options. No contradictions with 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 lengthy but well-structured. It front-loads the core purpose and usage guidelines, then systematically covers features. Each sentence adds value, though minor redundancy could be trimmed. Efficient given the complexity.

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

Completeness5/5

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

For a tool with 21 parameters and no output schema, the description thoroughly explains return format (JSON structure with fields and mode-specific shapes), lossless TOON encoding, and all key features. It covers pagination (limit/offset), filters, and retrieval strategies, leaving little ambiguity.

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

Parameters5/5

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

With 100% schema coverage, baseline is 3, but the description adds significant meaning: explains modes (single, tiered, drill, flat, get), fusion with defaults, semantic modes, detail_level and output_format token savings, and drill_from scope. This goes well beyond the schema.

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 it searches symbols by name, kind, or text, and distinguishes itself from siblings like search_text and find_usages. It specifies the target audience (functions, classes, methods, variables) and provides alternatives, making the purpose unambiguous.

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

Usage Guidelines5/5

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

Explicitly states when to use this tool vs alternatives: 'Use instead of Grep when looking for functions, classes, methods, or variables... For raw text/string/comment search use search_text instead. For finding who references a known symbol use find_usages instead.' This provides clear guidance on selection.

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/nikolai-vysotskyi/trace-mcp'

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