Skip to main content
Glama

ts_search

Read-onlyIdempotent

Find relevant Token Savior tools for a natural-language query via embedding similarity, returning top-K matches with schemas or TypeScript signatures. Use when you don't know which tool fits.

Instructions

Find the top-K Token Savior tools most relevant to a natural-language query via embedding cosine similarity. Use when the manifest is in 'tiny' or 'code_mode' profile or you don't know which tool fits. Returns each candidate with its full inputSchema (format='schema') or a one-line TypeScript signature (format='ts') suitable for ts_execute scripts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qNoAlias de `query`. Natural-language description of what you need (e.g. 'find dependents of update_user').
queryNoNatural-language description of what you need (e.g. 'find dependents of update_user').
top_kNoHow many tool candidates to return (default 5, max 12).
formatNo'schema' (default) returns JSONSchema; 'ts' returns a TypeScript signature for Code Mode scripts. Auto-set to 'ts' when profile=code_mode.
patternNoAlias de `query`. Natural-language description of what you need (e.g. 'find dependents of update_user').
include_schemaNoIf false, drop inputSchema from the response (smaller payload).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv4.20.0
    • addedInput schema / anyOf
      Added value: +[
      +  {
      +    "required": [
      +      "query"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "pattern"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "q"
      +    ]
      +  }
      +]
    • addedInput schema / properties / pattern
      Added value: +{
      +  "description": "Alias de `query`. Natural-language description of what you need (e.g. 'find dependents of update_user').",
      +  "type": "string"
      +}
    • addedInput schema / properties / q
      Added value: +{
      +  "description": "Alias de `query`. Natural-language description of what you need (e.g. 'find dependents of update_user').",
      +  "type": "string"
      +}
    • removedInput schema / required
      Removed value: -[
      -  "query"
      -]
  2. Addedv4.0.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already establish the safe read-only, idempotent, closed-world profile, so the bar is lower, and the description adds genuine context: it explains what is returned (full inputSchema vs a one-line TypeScript signature) and ties format to code_mode. It does not mention scoring thresholds or pagination, but for a read-only search that is minor.

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?

Three dense sentences, front-loaded with what it does and why, then return formats. Every sentence earns its place; sizing is appropriate for a search entry-point tool.

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?

With no output schema, the description carries the return-value burden and does so by explaining the two response shapes. It is complete enough to invoke correctly; the only mild gap is not flagging that one of query/pattern/q is required.

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 every parameter is already documented, including the query/pattern/q aliases, top_k default/max, and the format enum. The description restates top-K, format='schema'/'ts', and the code_mode auto-set, adding integration flavor but little meaning 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?

States a specific verb (Find), resource (Token Savior tools), retrieval mechanism (embedding cosine similarity), and scope (top-K for a natural-language query). This clearly distinguishes it from siblings like ts_discover, find_symbol, and search_codebase without needing the schema.

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?

Gives explicit conditions for use: 'when the manifest is in tiny or code_mode profile or you don't know which tool fits.' That is a real when-to-use trigger, though it never names the alternative tool to use when you do know which tool fits (e.g., direct lookup), so it falls short of a 5.

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