Skip to main content
Glama

deep_search

Read-onlyIdempotent

Retries a weak or empty search by running 2-4 different phrasings of the same query and returning the first result set that meets a quality threshold, or the strongest set with a warning.

Instructions

Escalation for when search came back weak or empty: runs 2-4 genuinely different phrasings of the same need and returns the first set that passes the quality threshold, or the strongest weak set with a warning. Slower than search; do not start here.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "queries": "<queries>"
    },
    "name": "deep_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNodense | sparse | hybrid (single source only).
top_kNoMax results; default from config.
sourceNoSource name, list of names, or omit for all sources, fused.
queriesYes2-4 genuinely different phrasings, tried in order.
file_globNoRestrict to paths matching this glob, e.g. `*.cs`.
min_scoreNoQuality threshold override.
extensionsNoRestrict to these extensions, e.g. ['.cs'].
min_resultsNoMinimum results for a variant to count as strong.
path_containsNoRestrict to paths containing this substring.
return_all_variantsNoInclude per-variant diagnostics (single source only).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed24 schema fields changedv1.12.0
    • removedInput schema / properties / extensions / anyOf
      Removed value: -[
      -  {
      -    "items": {
      -      "type": "string"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / extensions / default
      Removed value: -null
    • addedInput schema / properties / extensions / items
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / extensions / type
      Added value: +"array"
    • removedInput schema / properties / file_glob / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / file_glob / default
      Removed value: -null
    • addedInput schema / properties / file_glob / type
      Added value: +"string"
    • removedInput schema / properties / min_results / anyOf
      Removed value: -[
      -  {
      -    "type": "integer"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / min_results / default
      Removed value: -null
    • addedInput schema / properties / min_results / type
      Added value: +"integer"
    • removedInput schema / properties / min_score / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / min_score / default
      Removed value: -null
    • addedInput schema / properties / min_score / type
      Added value: +"number"
    • removedInput schema / properties / mode / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / mode / default
      Removed value: -null
    • addedInput schema / properties / mode / type
      Added value: +"string"
    • removedInput schema / properties / path_contains / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / path_contains / default
      Removed value: -null
    • addedInput schema / properties / path_contains / type
      Added value: +"string"
    • changedInput schema / properties / source / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "items": {
      -      "type": "string"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "items": {
      +      "type": "string"
      +    },
      +    "type": "array"
      +  }
      +]
    • removedInput schema / properties / source / default
      Removed value: -null
    • removedInput schema / properties / top_k / anyOf
      Removed value: -[
      -  {
      -    "type": "integer"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / top_k / default
      Removed value: -null
    • addedInput schema / properties / top_k / type
      Added value: +"integer"
  2. Changed23 schema fields changedv1.9.0
    • changedInput schema / properties / extensions / description
      Previous value: -"Restrict results to these file extensions, e.g. `['.cs', '.shader']`."New value: +"Restrict to these extensions, e.g. ['.cs']."
    • removedInput schema / properties / extensions / title
      Removed value: -"Extensions"
    • changedInput schema / properties / file_glob / description
      Previous value: -"fnmatch glob to restrict results by path/filename, e.g. `*.cs` or `**/Editor/*`."New value: +"Restrict to paths matching this glob, e.g. `*.cs`."
    • removedInput schema / properties / file_glob / title
      Removed value: -"File Glob"
    • changedInput schema / properties / min_results / description
      Previous value: -"Override the minimum number of results a variant must return to be considered strong."New value: +"Minimum results for a variant to count as strong."
    • removedInput schema / properties / min_results / title
      Removed value: -"Min Results"
    • changedInput schema / properties / min_score / description
      Previous value: -"Override the weakness threshold: a variant's results must beat this score to count as strong."New value: +"Quality threshold override."
    • removedInput schema / properties / min_score / title
      Removed value: -"Min Score"
    • changedInput schema / properties / mode / description
      Previous value: -"Retrieval mode override (single-source only): 'dense', 'sparse', or 'hybrid'. Defaults to the server's configured mode."New value: +"dense | sparse | hybrid (single source only)."
    • removedInput schema / properties / mode / title
      Removed value: -"Mode"
    • changedInput schema / properties / path_contains / description
      Previous value: -"Keep only results whose file path contains this substring."New value: +"Restrict to paths containing this substring."
    • removedInput schema / properties / path_contains / title
      Removed value: -"Path Contains"
    • changedInput schema / properties / queries / description
      Previous value: -"2-4 genuinely different phrasings of the same need (different angles, not paraphrases), tried in priority order."New value: +"2-4 genuinely different phrasings, tried in order."
    • removedInput schema / properties / queries / title
      Removed value: -"Queries"
    • changedInput schema / properties / return_all_variants / description
      Previous value: -"If true, include per-variant diagnostics in the response (single-source only)."New value: +"Include per-variant diagnostics (single source only)."
    • removedInput schema / properties / return_all_variants / title
      Removed value: -"Return All Variants"
    • changedInput schema / properties / source / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "items": {
      +      "type": "string"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / source / description
      Previous value: -"Source name from `list_sources`. Omit to use the default: all sources for `search`/`deep_search` (RRF-fused), or the single applicable source for the others."New value: +"Source name, list of names, or omit for all sources, fused."
    • removedInput schema / properties / source / title
      Removed value: -"Source"
    • changedInput schema / properties / top_k / description
      Previous value: -"Maximum number of results to return. Defaults to the configured value."New value: +"Max results; default from config."
    • removedInput schema / properties / top_k / title
      Removed value: -"Top K"
    • removedInput schema / title
      Removed value: -"_deep_searchArguments"
    • changedOutput schema / (root)
      Previous value: -{
      -  "properties": {
      -    "result": {
      -      "title": "Result",
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "result"
      -  ],
      -  "title": "_deep_searchOutput",
      -  "type": "object"
      -}New value: +null
  3. First observedv1.5.1

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, and closed-world, so the safety profile is covered. The description adds genuine behavior beyond them: the tool escalates in order, returns the first qualifying set, and otherwise returns the strongest weak set flagged with a warning. It does not describe result shape or how warnings are surfaced, but that is a minor residual gap given the annotations.

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?

Two sentences, zero filler, and the escalation trigger is front-loaded before the cost warning. Every clause carries decision-relevant information.

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?

For a ten-parameter, closed-world read tool with no output schema, the description covers the essential decision (when to escalate) and the fallback return behavior. It omits guidance on source fusion vs single-source restriction and on the diagnostics flag, but the schema descriptions carry those adequately.

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 coverage is 100%, so the schema already documents all ten parameters including the 2-4 phrasing ordering. The description reinforces the query-list contract and introduces the 'quality threshold' concept that maps to min_score/min_results, but adds no syntax or format detail beyond the schema — baseline 3 is appropriate.

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?

States a specific verb and resource — it runs multiple phrasings of a query and returns the first set passing a quality threshold — and explicitly contrasts itself with the `search` sibling. An agent can distinguish the two without opening either schema.

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?

Gives an explicit trigger ('when `search` came back weak or empty'), an explicit exclusion ('do not start here'), and a cost tradeoff ('Slower than `search`'). That is the full when/when-not/alternative triad in two clauses.

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