Search Within a Filing
search_documentSearch 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:
Use get_filings to find the accession number for the filing you want
Call this tool with just accession_number and query — it will search all its documents
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
| Name | Required | Description | Default |
|---|---|---|---|
| cik | No | ||
| query | Yes | ||
| compact | No | ||
| filename | No | ||
| context_lines | No | ||
| accession_number | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||