Skip to main content
Glama

beatandraise.com SEC Filings

Search Within a Filing

search_document
Read-onlyIdempotent

Search within a filing's documents for specific terms. Returns matching lines with context.

If filename is omitted, searches every readable document in the filing (the main document and its exhibits, e.g. an 8-K's press release AND its CFO commentary), up to 12 files. A filing with only XML forms (Form 144, 3/4/5, 13F, N-PORT, D) is searched as raw XML lines, so element names (aggregateMarketValue, netAssets) match as well as values. If filename is provided, searches only that file. Each file in the result carries its own source (beatandraise_url) — cite the file the match came from.

Workflow:

  1. Use get_filings to find the accession number for the filing you want

  2. Call this tool with just accession_number and query — it will search all its documents

  3. Optionally use get_filing_detail to see all files, then search a specific one by filename

Supports multiple search terms separated by commas — lines matching any term are returned. A comma inside a number or a date is kept: "3,007" or "464,391" is searched as one figure, "May 30, 2025" as one date, and a date also matches its other spellings ("May 30 2025", "May30, 2025", "Dec. 31" for "December 31"). A term of 1-3 characters ("AI", "EPS", "Q3") matches only as a whole word; longer terms match inside words ("nominat" finds "nominated").

Args: accession_number: SEC accession number (e.g. "0001045810-25-000023") query: Search terms, comma-separated (e.g. "singapore,revenue" or "risk factors") cik: Optional. CIK of the filer (e.g. "0000320193"); found from the accession number when left out filename: Optional document filename. If omitted, searches all readable documents. context_lines: Lines of context around each match (0-50, default 10) compact: Optional. True returns the matches as plain text (each file's link, then its lines numbered, matching lines marked ">") instead of JSON: the same content in fewer tokens.

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": {
      "accession_number": "<accession_number>",
      "query": "<query>"
    },
    "name": "search_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
cikNo
queryYes
compactNo
filenameNo
context_linesNo
accession_numberYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / compact
      Added value: +{
      +  "default": false,
      +  "type": "boolean"
      +}
  2. First observed

TDQS

A4.4/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, openWorld, and non-destructive, so safety is covered. Beyond that the description adds real operational context: a 12-file cap on the unfiltered search, raw-XML searching for Form 144/3/4/5/13F/N-PORT/D filings, and per-file beatandraise_url attribution for citation. It does not discuss rate limits, errors, or truncation of large result sets, so it is good but not exhaustive.

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?

Front-loaded purpose sentence, then scoping, then a numbered workflow, then a matching-rules paragraph, then an Args block — a sensible order. The tokenization and date-variant rules are long and somewhat esoteric, but each answers a real failure mode; only mild trimming would improve it.

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 present, the description need not explain return shape, and it still covers the compact-vs-JSON distinction and citation guidance. Six parameters at 0% schema coverage are all addressed. The remaining gap is minor: no note on behavior when a filing has no readable documents or when a query term matches nothing.

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 coverage is 0%, so the description carries the full burden and mostly does: accession_number format with an example, query comma-separation with examples, cik as optional and auto-derived, filename optional, context_lines range 0-50 with default 10, and compact's plain-text tradeoff. This is a substantial gain over the bare 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?

Opens with a specific verb and resource ("Search within a filing's documents for specific terms") and scopes the result to matching lines with context. This clearly separates it from search_filings (which finds filings) and get_document (which retrieves a whole file).

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?

Provides an explicit three-step workflow naming get_filings and get_filing_detail as the alternatives, and states the decision rule: omit filename to search all documents, supply filename to narrow to one. No inference needed.

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.

Resources