Skip to main content
Glama

Search documents

search-documents
Read-onlyIdempotent

Search across documents. Keyword (BM25) by default; set semantic=true to add KNN. Covers SEC filing narratives, user-uploaded documents (policies, procedures, notes), and any other indexed content.

WHEN TO USE:

  • To find accounting policies, close procedures, or reference documents

  • To search SEC filing narratives (MD&A, risk factors, disclosures)

  • To discover any document content by topic or keyword

  • For cross-company topic search on shared repositories (e.g., "which companies mention tariff risk?")

PARAMETERS:

  • query (required) — the search text

  • semantic — adds KNN to the BM25 pass; defaults to false, so a plain call is keyword-only

  • entity, form_type, section, element, fiscal_year, size — filters

  • snippet_chars — approximate snippet budget per hit (default 400, max 1500); raise it when the snippets are too short to choose between hits

RELATED TOOLS:

  • get-document-section / get-document — read what a hit points at

  • search-text — once you know the filing, search INSIDE its whole text (cover page, footnotes, anything between the indexed sections); pass a hit's accession_number as accession with its entity_ticker (a CIK for a filer with no ticker)

  • read-graph-cypher — structured data (numbers, relationships), not prose

  • list-documents — browses by metadata; does not search content

  • resolve-element — takes a qname from get-document-section's xbrl_elements on to its structured values

RETURNS:

  • Ranked hits, each with document_id, score, source_type, section_label, section_id, snippet, content_length and content_url (element_qname for an iXBRL disclosure)

  • Filing fields every hit shares (entity_ticker, entity_name, form_type, filing_date, fiscal_year, accession_number) appear once at the result root; when the hits span filings they stay on each hit

  • The same section from a filer's successive filings comes back once, as its best-ranked (then newest) filing; also_in_filings counts the other filings folded into it. With entity set nothing is folded, so pass a ticker or CIK to see one filer's filings of a section side by side

  • total counts matching documents before any folding (OpenSearch stops counting at 10,000), not the distinct results a page can show

  • A snippet is an excerpt around the match, not the passage — read the section with get-document-section before quoting a figure from it

  • A long section (an MD&A, a commitments note) is indexed in parts of about 25K characters; a hit carries part / part_count and the parts share a parent_document_id. get-document-section returns one part and its next_document_id

  • For user docs, use get-document to retrieve the complete document

NOTES:

  • Searches user-uploaded documents (created via create-document), SEC filing text blocks and narrative sections, and iXBRL disclosure sections

  • To tie narrative back to reported numbers: get-document-section returns an iXBRL disclosure's xbrl_elements (e.g. us-gaap:Goodwill); look one up with resolve-element, then read-graph-cypher for its structured values. Note resolve-element is only published on graphs with semantic enrichment

  • Natural language queries work well ("depreciation policy", "month end close procedures")

  • Use entity filter to focus on one company's filings. Only a CIK selects exactly one filer. A company name is a loose word match that takes in other filers sharing a word ("Acme Holdings" also matches every filer with "Holdings" in its name), and so is a ticker that is also a word ("ON" also matches filers with "On" in their names) — pass the CIK when it matters

  • Use section filter (item_1a, item_7) to target specific filing sections, or an element qname (us-gaap:CommitmentsAndContingenciesDisclosureTextBlock) to target one iXBRL disclosure across filings; the element filter finds the disclosures that contain a given fact

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": "<query>"
    },
    "name": "search-documents"
  }
}

Input Schema

NameRequiredDescriptionDefault
sizeNoMax results (default 10, max 50)
queryYesSearch query (e.g., 'tariff exposure supply chain risk')
entityNoOptional: filter by CIK (exactly one filer), ticker, or company name. A name, or a ticker that is also a word, is a loose word match that can include other filers
elementNoOptional: filter by XBRL element qname to find disclosures containing that fact (e.g., us-gaap:Goodwill, us-gaap:Revenues)
sectionNoOptional: filter by section ID — an Item (item_1, item_1a, item_1c, item_2, item_7, item_7a) or an iXBRL disclosure's element qname (us-gaap:GoodwillDisclosureTextBlock)
semanticNoEnable hybrid semantic search (BM25 + KNN vector similarity). Default is BM25-only which is faster. Use semantic=true for meaning-based search when keyword matching is insufficient.
form_typeNoOptional: filter by form type (10-K, 10-Q)
fiscal_yearNoOptional: filter by fiscal year
snippet_charsNoApproximate snippet budget per hit in characters (default 400, max 1500)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnly, idempotent, non-destructive, closed-world behavior, and the description adds substantial operational context beyond that: result folding of the same section across filings, the 10,000 counting cap on total, the distinction between snippets and passages, 25K-character part indexing with part/part_count and parent_document_id, and the CIK-vs-name matching caveat. These are non-obvious behaviors that materially affect correct use.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is long but well-structured with WHEN TO USE, PARAMETERS, RELATED TOOLS, RETURNS, and NOTES headers, and the core purpose is front-loaded. Some information is repeated across sections (the semantic default and entity/CIK caveat appear in both PARAMETERS/NOTES and the schema), but given the tool's complexity the length is largely justified.

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?

With no output schema, the RETURNS section carries the full burden and does so thoroughly: hit fields, root-level shared filing fields, folding behavior, total semantics, snippet caveats, and part-based indexing. Combined with the parameter and sibling guidance, an agent has everything needed to call and interpret this tool correctly.

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 description coverage is 100%, so the baseline is 3; the description nonetheless adds meaning beyond the schema by clarifying that semantic=false yields keyword-only search, that snippet_chars should be raised when snippets are too short to choose between hits, and that only a CIK selects exactly one filer while names and ambiguous tickers are loose word matches. The section and element filter explanations also add targeting nuance.

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 opening sentence states a specific verb and resource ('Search across documents'), defines the default retrieval mode (BM25 keyword) and the opt-in semantic mode, and names the content scope (SEC filing narratives, user-uploaded documents, indexed content). It is clearly distinguishable from siblings like search-text and list-documents, which are explicitly contrasted later.

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 definition provides an explicit WHEN TO USE list with concrete scenarios (accounting policies, MD&A, cross-company topic search) and a RELATED TOOLS section that routes the agent to alternatives with conditions: get-document-section to read a hit, search-text for full filing text, read-graph-cypher for structured data, list-documents for metadata browsing. This is exactly the when/when-not/alternatives guidance the dimension rewards.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.