Skip to main content
Glama

search

Read-onlyIdempotent

Find functions, classes, methods, and variables by name, kind, or text. Returns ranked symbol matches with file and line info, replacing grep for code symbols.

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, no PageRank. 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 — multi-channel WRR ranking across lexical (BM25), structural (PageRank), similarity (embeddings), and identity match. 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 + one embed_repo run.
decoratorNoFilter to symbols carrying this decorator/annotation/attribute
retrieverNoRun one named retrieval algorithm instead of the mode dispatcher. Ignores mode/filters/fuzzy/fusion; returns { retriever, items, total }.
drill_fromNo[mode="drill"] File path or symbol_id to restrict results to.
implementsNoFilter to classes implementing this interface
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".
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. Changed1 schema field changedv3.22.0
    • changedInput schema / required
      Previous value: -[
      -  "query",
      -  "language",
      -  "file_pattern"
      -]New value: +[
      +  "query"
      +]
  2. 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."
  3. Added
  4. Removedv1.38.0
  5. 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"
      +]
  6. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and idempotentHint, and the description's 'Read-only' adds no new safety information. However, it does add non-obvious behavior: the JSON result shape, mode-specific shape variation, and support for the compact 'toon' output format.

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?

The description is compact and front-loaded: purpose first, then routing guidance, then output behavior. Every sentence carries useful information and there is no filler.

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?

It provides the essential return shape and mode caveat, plus sibling routing, which is good for a tool with 20 params and no output schema. The non-single mode-specific shapes are not enumerated, leaving some ambiguity for agents invoking those modes.

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 the baseline is 3, but the description adds meaning around the mode parameter by warning that non-single modes change the return shape. It also highlights output_format support, which supplements the schema enum.

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 opens with 'Search symbols by name, kind, or text', naming a specific verb, resource, and scope. It also explicitly distinguishes itself from search_text and find_usages, so an agent can tell it apart from the closest siblings without inspecting schemas.

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?

It explicitly says to use this tool instead of Grep for code symbols and directs raw text/comment search to search_text and references to a known symbol to find_usages. This gives clear when-to-use and when-not-to-use guidance.

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