Skip to main content
Glama

Search inside indexed documents

mcptoon_kb_search
Read-onlyIdempotent

Return the PASSAGES in already-indexed documents that match a query, not the whole file. Use it instead of reading a large document whole when you need a few lines from it. Index a document first with mcptoon_kb_index.

Instructions

Return the PASSAGES in already-indexed documents that match a query, not the whole file. Use it instead of reading a large document whole when you need a few lines from it. Index a document first with mcptoon_kb_index.

Input Schema

NameRequiredDescriptionDefault
kNoHow many passages to return (default 5).
queryYesWords to find. Substrings and typos are handled.
sourceNoRestrict to sources whose name contains this text. Omit to search everything indexed.

Output Schema

NameRequiredDescriptionDefault
hitsYes
notesNo
queryYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.8.26

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, closed-world behavior, so the description's job is light. It still adds real context: results are passages rather than whole files, and the tool operates only on pre-indexed content, which explains the prerequisite ordering.

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?

Three short sentences, front-loaded with the scope distinction before the usage guidance and prerequisite. Every sentence carries information an agent needs.

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 an output schema, full parameter coverage, and clear annotations, the description supplies what remains missing: passage-level return shape and the indexing prerequisite. Only edge behavior (for example searching before anything is indexed) is left unstated.

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 schema already documents query, k, and source fully. The description mentions only that a query matches passages and adds no detail on count or source restriction, so the 3 baseline applies.

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 ('Return the PASSAGES in already-indexed documents that match a query') and explicitly contrasts the scope with whole-file reading. That scope line alone separates it from mcptoon_retrieve and mcptoon_kb_index.

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?

'Use it instead of reading a large document whole when you need a few lines from it' gives a clear selection condition against the reading alternative. The prerequisite ('Index a document first with mcptoon_kb_index') is stated by name, though there is no explicit statement of when not to use it.

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