Skip to main content
Glama

search_documents

Search a DocuSky database by keyword, corpus, and filters to get matching document metadata with short excerpts, then retrieve full text per hit via get_document.

Instructions

Full-text search one DocuSky database; returns metadata plus a short excerpt per hit.

Full document text is deliberately omitted — call get_document with a hit's n (and the same db/corpus/query/page_size) to read one in full.

Args: db: Database title. query: Search terms. +term requires, -term excludes, .all matches everything. corpus: Corpus title, or "[ALL]" for every corpus in the database. page: 1-based page number. page_size: Hits per page (1-100). target: "OPEN" or "USER". excerpt_chars: Characters of body text to preview per hit; 0 disables excerpts. owner_username: Owner of a friend-shared database, when applicable.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dbYes
pageNo
queryNo.all
corpusNo[ALL]
targetNoOPEN
page_sizeNo
excerpt_charsNo
owner_usernameNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does disclose key behavior: results are excerpt-only, excerpts are controlled by excerpt_chars (0 disables them), and pagination is 1-based with a 1-100 page_size bound. It does not state permission/auth requirements or read-only nature beyond the friend-shared `owner_username` hint, so it stops short of full transparency.

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 core behavior and the get_document hand-off are front-loaded in the first two sentences, followed by a compact structured Args block. Every line carries information an agent needs; nothing is restated from the name or schema.

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 an 8-parameter search tool with an output schema available, the description supplies everything else needed to call it correctly – query syntax, corpus/db scoping, pagination, excerpt control, and the pointer to get_document for full text. Nothing material is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate and it does: query syntax is documented ('+term' requires, '-term' excludes, '.all' matches everything), corpus accepts '[ALL]', target is 'OPEN' or 'USER', page is 1-based, page_size is 1-100, and owner_username is scoped to friend-shared databases. All 8 parameters gain meaning absent from 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 and resource ('Full-text search one DocuSky database') plus the return shape ('metadata plus a short excerpt per hit'), which immediately separates it from get_document and the listing siblings. An agent can identify the tool's role without opening 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 Guidelines5/5

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

It explicitly routes the agent: full text is omitted here, so 'call get_document with a hit's `n` (and the same db/corpus/query/page_size)' to read one in full. That is a concrete when-to-use-this vs when-to-use-the-alternative condition rather than implied guidance.

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