Skip to main content
Glama

search_documents

Read-onlyIdempotent

Search extracted filing text by keyword and filter by date, ticker, or document type to find matching HKEx filings with snippets.

Instructions

Use this for full-text search over extracted document text.

Use search_filings instead to filter by metadata without a text query. Matches text_query case-insensitively inside document_text and returns filing rows with a snippet when the sink supports it (see snippets_supported). document_type accepts pdf, html, xlsx, docx, or unknown; source is a free-text origin like HKEx. All filters combine with AND semantics (a filing must match every filter you set). Returns nothing until documents are processed. This tool is read-only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
offsetNoZero-based offset for paging.
sourceNoSource of the filing, e.g. HKEx.
tickerNoCompany ticker filter, e.g. 0700.HK; comma-separate to match several.
date_toNoLatest filing date, YYYY-MM-DD inclusive.
order_byNoSort order of the result.filing_date_desc
date_fromNoEarliest filing date, YYYY-MM-DD inclusive.
page_sizeNoMaximum filings to return (1..100).
text_queryYesCase-insensitive term matched against extracted document text.
filing_typeNoFiling type(s), e.g. 'Annual Report'; comma-separate to match several.
document_typeNoDocument type: pdf, html, xlsx, docx, or unknown.
document_statusNoDocument status(es): processed, skipped, failed, or unprocessed; comma-separate to match several.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.1.3
    • addedInput schema / properties / document_type
      Added value: +{
      +  "default": "",
      +  "description": "Document type: pdf, html, xlsx, docx, or unknown.",
      +  "title": "Document Type",
      +  "type": "string"
      +}
    • addedInput schema / properties / source
      Added value: +{
      +  "default": "",
      +  "description": "Source of the filing, e.g. HKEx.",
      +  "title": "Source",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.9/5.0
Behavior5/5

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

The description adds substantial behavioral context beyond the annotations: case-insensitive matching, snippet availability depending on sink support, AND-filter semantics, and the dependency on documents being processed before results appear. It also restates the read-only nature consistently with annotations.

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 well-organized and front-loaded with the core use case, followed by routing guidance and behavioral notes. Every sentence adds value without unnecessary repetition or 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 tool with 100% schema coverage, an output schema, and strong annotations, the description covers the remaining contextual gaps: when to use it, how filters behave, and what prerequisites affect results. Nothing essential for correct invocation is missing.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3. The description adds meaning beyond the schema for key parameters: text_query's matching behavior, document_type's allowed values, source's example, and the AND combination of filters. It doesn't discuss every parameter, but the schema already covers those individually.

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 description states a specific verb and resource: full-text search over extracted document text, matching text_query inside document_text. It clearly distinguishes itself from the sibling search_filings by contrasting full-text search with metadata-only filtering.

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?

Explicitly names the alternative: 'Use search_filings instead to filter by metadata without a text query.' It also clarifies when search_documents applies and notes that all filters combine with AND semantics, giving an agent a clear decision rule.

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