Skip to main content
Glama

Search an index

search_query
Read-onlyIdempotent

Full-text search with filters, sorting, facets, pagination and highlights. Use when the user looks something up in the app's own data. Before: search_get_index for the fields. Returns hits (id, score, document, highlights), total, facets, took_ms and the receipt. Scope: search:query. Cost: paid, reserved on the prepaid balance before the call (released if it fails); prices: get_pricing. Short balance or limit: next_action top_up_balance or raise_app_spend_limit.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "q": "leather shoes",
      "name": "products",
      "limit": 10,
      "facets": [
        "brand"
      ],
      "filter": {
        "lt": 100,
        "field": "price"
      }
    },
    "name": "search_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
qNoText to find. Quotes make a phrase, a leading - excludes a word. Empty: all documents.
nameYesIndex name.
sortNoUp to 3 sort keys; ties break by relevance then id.
limitNoPage size, 1 to 100.
facetsNoFields to count values of (up to 100 values each).
filterNoClosed filter tree: {"field": f, "eq"|"ne"|"in"|"gt"|"gte"|"lt"|"lte"|"exists": v}, or {"and": [...]}, {"or": [...]}, {"not": {...}}.
offsetNoResults to skip, at most 1000.
highlightNoReturn escaped excerpts with <mark> tags. Default true.
typo_toleranceNoMatch small typos. Default: the index setting.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/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 goes further and discloses the billing model (paid, reserved on the prepaid balance before the call, released on failure) and the OAuth scope required. It also enumerates the return payload (hits, total, facets, took_ms, receipt), which the annotations do not cover.

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?

Front-loaded with purpose, then prerequisites, return shape, scope and cost, then failure handling, so an agent gets the essentials first. The telegraphic fragments ('Before: search_get_index for the fields', 'Short balance or limit: ...') are dense but not padded; nothing here is filler.

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 9-parameter search tool with nested sort/filter objects and no output schema, the description supplies the two things the schema cannot: a description of the response envelope (hits with id/score/document/highlights, total, facets, took_ms, receipt) and the cost/auth/rate context needed to call it without surprise. Nothing material is missing.

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% and the schema itself is unusually rich (query syntax for quotes and leading '-', sort key limits, closed filter tree grammar, hi/lo bounds on limit and offset), so the description correctly leaves parameter detail to the schema. It adds only the indirect hint that 'search_get_index' supplies valid field names for sort/filter/facets; the baseline of 3 applies when the schema carries the semantics.

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 (full-text search) plus the exact capabilities it covers: filters, sorting, facets, pagination and highlights. It is clearly distinguishable from siblings like search_get_document (single doc) and search_get_index (schema/metadata), and the scope string 'search:query' reinforces what it is.

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 when-to-use condition ('when the user looks something up in the app's own data'), a prerequisite pointing at the alternative that supplies field names ('Before: search_get_index for the fields'), and a remediation path when the call cannot be paid for ('next_action top_up_balance or raise_app_spend_limit'). Few definitions route the agent this precisely.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources