Skip to main content
Glama

search

Read-onlyIdempotent

Search code symbols by name, kind, or text. Returns matching functions, classes, methods, and variables with file, line, and signature to locate definitions.

Instructions

Search symbols by name, kind, or text. Use instead of Grep for functions, classes, methods, variables. For raw text/comment search use search_text; for references to a known symbol use find_usages. Read-only. Returns JSON: { items: [{ symbol_id, name, kind, fqn, signature, file, line, score }], total, search_mode } — mode-specific shape when mode!=single. Supports output_format: "toon".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindNoFilter by symbol kind (class, method, function, etc.)
modeNosingle (default): top-K. tiered: high/medium/low buckets. drill: scoped to drill_from. flat: raw FTS. get: exact lookup. Omit to auto-pick.
fuzzyNoTypo-tolerant search. Auto-enabled when exact search returns 0 results.
limitNoMax results (default 20)
queryYesSearch query
fusionNoEnable Signal Fusion — WRR ranking across lexical, structural, similarity, and identity channels. Weights come from `tune_weights`.
offsetNoOffset for pagination
extendsNoFilter to classes/interfaces extending this name
languageNoFilter by language
semanticNoauto (default): hybrid if AI available. on: force hybrid. off: lexical-only. only: pure vector. Non-"off" needs an AI provider.
decoratorNoFilter to symbols carrying this decorator/annotation/attribute
retrieverNoRun one named retrieval algorithm instead of the mode dispatcher. Ignores mode/filters/fuzzy/fusion.
drill_fromNo[mode="drill"] File path or symbol_id to restrict results to.
implementsNoFilter to classes implementing this interface
detail_levelNoOutput verbosity. "minimal" saves ~40-60% tokens (drops scores, fqn, signatures, summaries). Use to pick a candidate before get_symbol. Default: "default".
file_patternNoFilter by file path pattern
output_formatNo"json" (default) or "toon" (lossless, 30-60% fewer tokens). "markdown" behaves as json here.
fuzzy_thresholdNo[fuzzy] Min trigram similarity (default 0.3)
semantic_weightNo[semantic] 0 = lexical only, 0.5 = balanced (default), 1 = vector only.
max_edit_distanceNo[fuzzy] Max edit distance (default 3)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv3.31.3
    • changedInput schema / properties / fusion / description
      Previous value: -"Enable Signal Fusion — multi-channel WRR ranking across lexical (BM25), structural (PageRank), similarity (embeddings), and identity match. Weights come from `tune_weights`."New value: +"Enable Signal Fusion — WRR ranking across lexical, structural, similarity, and identity channels. Weights come from `tune_weights`."
    • changedInput schema / properties / mode / description
      Previous value: -"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."New value: +"single (default): top-K. tiered: high/medium/low buckets. drill: scoped to drill_from. flat: raw FTS. get: exact lookup. Omit to auto-pick."
    • changedInput schema / properties / retriever / description
      Previous value: -"Run one named retrieval algorithm instead of the mode dispatcher. Ignores mode/filters/fuzzy/fusion; returns { retriever, items, total }."New value: +"Run one named retrieval algorithm instead of the mode dispatcher. Ignores mode/filters/fuzzy/fusion."
    • changedInput schema / properties / semantic / description
      Previous value: -"auto (default): hybrid if AI available. on: force hybrid. off: lexical-only. only: pure vector. Non-\"off\" needs an AI provider + one embed_repo run."New value: +"auto (default): hybrid if AI available. on: force hybrid. off: lexical-only. only: pure vector. Non-\"off\" needs an AI provider."
  2. Changed1 schema field changedv3.31.0
    • changedInput schema / properties / detail_level / description
      Previous value: -"Output 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\"."New value: +"Output verbosity. \"minimal\" saves ~40-60% tokens (drops scores, fqn, signatures, summaries). Use to pick a candidate before get_symbol. Default: \"default\"."
  3. Changed1 schema field changedv3.22.0
    • changedInput schema / required
      Previous value: -[
      -  "query",
      -  "language",
      -  "file_pattern"
      -]New value: +[
      +  "query"
      +]
  4. Changed14 schema fields changedv3.3.0
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • changedInput schema / properties / decorator / description
      Previous value: -"Filter to symbols with this decorator/annotation/attribute (e.g. \"Injectable\", \"Route\", \"Transactional\")"New value: +"Filter to symbols carrying this decorator/annotation/attribute"
    • changedInput schema / properties / drill_from / description
      Previous value: -"Drill scope for mode=\"drill\" — a file path or symbol_id. Results are restricted to the subtree rooted here."New value: +"[mode=\"drill\"] File path or symbol_id to restrict results to."
    • changedInput schema / properties / fusion / description
      Previous value: -"Enable 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."New value: +"Enable Signal Fusion — multi-channel WRR ranking across lexical (BM25), structural (PageRank), similarity (embeddings), and identity match. Weights come from `tune_weights`."
    • removedInput schema / properties / fusion_debug
      Removed value: -{
      -  "description": "Include per-channel rank contributions in fusion results.",
      -  "type": "boolean"
      -}
    • removedInput schema / properties / fusion_weights
      Removed value: -{
      -  "description": "Per-channel weights for fusion (auto-normalized). Defaults: lexical=0.4, structural=0.25, similarity=0.2, identity=0.15.",
      -  "properties": {
      -    "identity": {
      -      "maximum": 1,
      -      "minimum": 0,
      -      "type": "number"
      -    },
      -    "lexical": {
      -      "maximum": 1,
      -      "minimum": 0,
      -      "type": "number"
      -    },
      -    "similarity": {
      -      "maximum": 1,
      -      "minimum": 0,
      -      "type": "number"
      -    },
      -    "structural": {
      -      "maximum": 1,
      -      "minimum": 0,
      -      "type": "number"
      -    }
      -  },
      -  "type": "object"
      -}
    • changedInput schema / properties / fuzzy / description
      Previous value: -"Enable fuzzy search (trigram + Levenshtein). Auto-enabled when exact search returns 0 results."New value: +"Typo-tolerant search. Auto-enabled when exact search returns 0 results."
    • changedInput schema / properties / fuzzy_threshold / description
      Previous value: -"Minimum Jaccard trigram similarity (default 0.3)"New value: +"[fuzzy] Min trigram similarity (default 0.3)"
    • changedInput schema / properties / max_edit_distance / description
      Previous value: -"Maximum Levenshtein edit distance (default 3)"New value: +"[fuzzy] Max edit distance (default 3)"
    • changedInput schema / properties / mode / description
      Previous value: -"Memoir-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)."New value: +"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."
    • changedInput schema / properties / output_format / description
      Previous value: -"Output format. \"json\" (default) returns JSON; \"toon\" returns Token-Oriented Object Notation — 30-60% fewer tokens, lossless. \"markdown\" is unsupported here and behaves as json."New value: +"\"json\" (default) or \"toon\" (lossless, 30-60% fewer tokens). \"markdown\" behaves as json here."
    • addedInput schema / properties / retriever
      Added value: +{
      +  "description": "Run one named retrieval algorithm instead of the mode dispatcher. Ignores mode/filters/fuzzy/fusion; returns { retriever, items, total }.",
      +  "enum": [
      +    "lexical",
      +    "semantic",
      +    "hybrid",
      +    "summary",
      +    "feeling_lucky",
      +    "graph_completion"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / semantic / description
      Previous value: -"Semantic 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."New value: +"auto (default): hybrid if AI available. on: force hybrid. off: lexical-only. only: pure vector. Non-\"off\" needs an AI provider + one embed_repo run."
    • changedInput schema / properties / semantic_weight / description
      Previous value: -"Hybrid fusion weight in [0,1]. 0 = lexical only, 0.5 = balanced (default), 1 = semantic only."New value: +"[semantic] 0 = lexical only, 0.5 = balanced (default), 1 = vector only."
  5. Added
  6. Removedv1.38.0
  7. Changed6 schema fields changedv1.35.1
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / detail_level
      Added value: +{
      +  "description": "Output 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\".",
      +  "enum": [
      +    "minimal",
      +    "default",
      +    "full"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / drill_from
      Added value: +{
      +  "description": "Drill scope for mode=\"drill\" — a file path or symbol_id. Results are restricted to the subtree rooted here.",
      +  "maxLength": 512,
      +  "type": "string"
      +}
    • removedInput schema / properties / fusion_weights / additionalProperties
      Removed value: -false
    • addedInput schema / properties / mode
      Added value: +{
      +  "description": "Memoir-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).",
      +  "enum": [
      +    "single",
      +    "tiered",
      +    "drill",
      +    "flat",
      +    "get"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "query"
      -]New value: +[
      +  "query",
      +  "language",
      +  "file_pattern"
      +]
  8. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already convey read-only/idempotent/non-destructive traits. The description adds value by disclosing the JSON return shape, mode-specific shape when mode!=single, and the toon output format. This goes beyond annotation coverage and helps the agent understand what to expect.

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 compact and front-loaded: purpose, exclusions, and return shape in three sentences. Minor redundancy exists, such as restating 'Read-only' despite annotations and noting output_format already in the schema, but the overall size is appropriate.

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

Completeness4/5

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

This is a complex 20-parameter tool with no output schema, but the schema itself is richly documented and annotations cover safety. The description supplies the missing output contract and key routing guidance, leaving only deeper mode-selection advice to the schema's own explanations.

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

Parameters3/5

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

Schema description coverage is 100%, so the baseline is 3. The description adds minimal per-parameter meaning beyond the schema—mainly highlighting output_format toon—but the schema already documents all parameters thoroughly.

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?

Description states a specific verb and resource: 'Search symbols by name, kind, or text.' It explicitly distinguishes the tool from Grep and names the sibling alternatives search_text and find_usages, so an agent can tell them apart immediately.

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?

Description gives explicit when-to-use guidance: use instead of Grep for functions, classes, methods, variables; use search_text for raw text/comment search; use find_usages for references to a known symbol. This clearly routes the agent to the correct alternative.

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