Skip to main content
Glama

search_documents

Search a DocuSky database by keyword to find documents; returns metadata and short excerpts per hit, enabling discovery before full-text retrieval.

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.

For a public ("OPEN") database, the result also carries a webUrl to the same search on docusky.org.tw — MCP Apps-capable hosts render it inline.

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?

No annotations are provided, so the description carries the full behavioral burden. It discloses return shape, deliberate omission of full text, excerpt behavior, pagination parameters, and that OPEN databases return a webUrl rendered by MCP Apps hosts. It does not mention authentication or permission requirements, but the read-only search nature is implicit.

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 description is front-loaded with the core purpose and then structured with a clear Args section. Despite being longer due to eight undocumented parameters, every sentence earns its place by adding search semantics, output behavior, or parameter meaning. There is no wasted or repetitive text.

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?

Given eight parameters, 0% schema coverage, and an output schema, the description is complete enough for correct invocation. It explains all arguments, the excerpt/full-text distinction, and the public webUrl behavior. The output schema can carry return-value details, and the remaining auth context is not essential to call the search correctly.

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 for all eight parameters. It does so thoroughly: it defines db, query with `+term`/`-term`/`.all` syntax, corpus `[ALL]`, 1-based page, page_size 1-100, target OPEN/USER, excerpt_chars with 0 disabling excerpts, and owner_username for friend-shared databases. This adds substantial meaning beyond the bare schema titles and defaults.

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?

The first sentence states a specific verb, resource, and scope: full-text search of one DocuSky database returning metadata plus a short excerpt. It immediately distinguishes itself from get_document by explaining that full document text is deliberately omitted. An agent can tell exactly what this tool does without opening other schemas.

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?

The description explicitly routes full-document reading to get_document with a hit's `n` and matching db/corpus/query/page_size. It also explains query syntax and target modes, giving clear context for when to use this search tool versus the full-document alternative. Nothing important is left to inference.

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