Skip to main content
Glama

query_document

Search document content by semantic similarity to find relevant passages, with an optional limit on the number of results returned.

Instructions

Search for information in the document based on semantic similarity

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": {
      "query_text": "<query_text>"
    },
    "name": "query_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
query_textYesThe search query text
num_resultsNoNumber of results to return (default: 5)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden; "search" implies a non-mutating read, and "semantic similarity" discloses the matching approach. It does not explain result ordering or content, no-match behavior, or how the searched document is selected.

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 single compact sentence front-loads the action, resource, and retrieval method without unnecessary wording. Its brevity contributes to informational gaps, but those are assessed under the other dimensions rather than as a structural flaw.

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

Completeness3/5

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

The description and fully documented schema are sufficient for a basic invocation of this simple two-parameter tool. Because there is no output schema, the lack of any explanation of the document scope or returned results—such as passages, metadata, or similarity scores—leaves meaningful interpretation gaps.

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 score of 3 applies. Semantic similarity adds some useful meaning to query_text, but the description gives no query-formulation advice and adds nothing about num_results beyond the schema's documented default.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action (search), resource (the document), and distinguishing method (semantic similarity). It does not explicitly differentiate the tool from get_collection_info, and the phrase "the document" leaves the specific document context ambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The wording implies that the tool is for finding document content by meaning rather than through exact-term matching. It provides no explicit when-to-use or when-not-to-use guidance, prerequisites, or named alternatives.

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

Deploy Server

Other Tools