fairquery-edgar
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| edgar_resolve_companyA | Resolve US company tickers, CIKs or name fragments to official SEC CIK numbers, tickers and registrant names using the SEC public ticker map (company_tickers.json). Use this first when you only need an identifier (e.g. "what is Nvidia's CIK?") or want to confirm which company a name refers to before fetching filings/facts. Next steps: edgar_list_filings for filings, edgar_get_company_facts for financial data. Behavior: HTTP GET to sec.gov (throttled to <=5 requests/s); the ticker map is cached for 6 hours. Covers SEC registrants with a listed ticker only (no delisted/private filers). RETURNS: "company_match" rows (cik zero-padded to 10 digits; match = the rule that hit: cik|ticker|name) or one COMPANY_NOT_FOUND error row per unmatched query. WHEN NOT TO USE: not for filings (edgar_list_filings) or financial values (edgar_get_company_facts); other tools already accept tickers/names directly. COST: free - direct sec.gov requests from this MCP server, no APIFY_TOKEN, no Apify billing. PARAMETERS: queries: each string is resolved independently and returns its own rows (or its own COMPANY_NOT_FOUND row), so mixed batches never fail as a whole. Precedence per query: all-digit strings are tried as a CIK first (leading zeros optional; must be in the ticker map), then an exact ticker (case-insensitive; class shares like "BRK-B" use a dash), then a case-insensitive substring of the registrant name; the first rule that matches wins and later rules are not applied. maxMatchesPerQuery caps the rows of every query, but only matters for broad name fragments (e.g. "bank") and for CIKs with several tickers (GOOG/GOOGL); raise it (max 25) to see more candidates, then pass the chosen ticker or cik to the other tools. EXAMPLE: {"queries":["NVDA","apple"]} -> {count:2, items:[{type:"company_match", cik:"0001045810", ticker:"NVDA", name:"NVIDIA CORP", match:"ticker"}, ...]} |
| edgar_list_filingsA | List a single company's SEC EDGAR filings (newest first) with form type, filing/report dates, accession number and direct document URLs, filtered by form type and date range, with limit/offset paging. Use to find which filings exist (e.g. "Apple's 10-Ks since 2020", "Tesla 8-Ks this year") and to get an accession_number / document_url for edgar_get_filing_document (or index_url for edgar_get_filing_index to see its exhibits). Not for financial values (use edgar_get_company_facts). Behavior: GET to the data.sec.gov submissions API (throttled to <=5 requests/s). RETURNS: one row per filing; accession_number and document_url feed edgar_get_filing_document (document_url is null when SEC lists no primary document; index_url lists every file). Errors: COMPANY_NOT_FOUND, NOT_FOUND, SEC_FETCH_FAILED (retryable). WHEN NOT TO USE: for document text use edgar_get_filing_document; for XBRL numbers use edgar_get_company_facts; many companies at once -> edgar_get_concept_across_companies (free, one concept) or edgar_batch_export (paid). COST: free - direct sec.gov requests from this MCP server, no APIFY_TOKEN, no Apify billing. PARAMETERS: company: a numeric value is always used as a CIK; text is matched as ticker, then name fragment (first match). formTypes: exact, case-insensitive equality on the form field, so "10-K" does not include amendments - add "10-K/A" explicitly; insider filings are "4", proxies "DEF 14A". since/until: both inclusive and compared with filing_date (not report_date); combine them for a window, e.g. since "2024-01-01" + until "2024-12-31". includeOlder: the default searches only the ~1000 newest filings, so for date windows older than a few years (or for very active filers) set it to true, which adds one SEC request per archive file. Filters are applied before paging: total counts matching filings, rows are newest first, and you continue with offset = nextOffset. EXAMPLE: {"company":"AAPL","formTypes":["10-K"],"since":"2020-01-01","limit":5} -> 5 newest Apple 10-K rows with accession_number and document_url. |
| edgar_get_filing_indexA | List every file of ONE SEC filing from its EDGAR filing index page: primary document, exhibits (EX-21 subsidiaries, EX-99.1 press release, ...) and XBRL data files, with SEC document type, description, size and a direct URL, plus filing header facts (form, filing date, acceptance time, period of report, 8-K items, filers). Use when you need an exhibit or attachment rather than the primary document ("Apple's list of subsidiaries", "the press release attached to this 8-K"), or the 8-K item numbers of a filing; then pass a row's url to edgar_get_filing_document. Behavior: one GET to the {accession}-index.htm page on www.sec.gov (throttled to <=5 requests/s, shared with the other edgar_* tools); company resolution may add one cached ticker-map request. RETURNS: one "filing_document" row per file, in SEC sequence order (documents first, then data files); meta holds the filing header. Errors: INVALID_INPUT, INVALID_URL, COMPANY_NOT_FOUND, NOT_FOUND (no such filing for that CIK), SEC_FETCH_FAILED (retryable). WHEN NOT TO USE: to find filings use edgar_list_filings first; to read a document's text use edgar_get_filing_document; for financial values use edgar_get_company_facts. COST: free - direct sec.gov requests from this MCP server, no APIFY_TOKEN, no Apify billing. PARAMETERS: give EITHER indexUrl (index_url from edgar_list_filings; wins if present) OR company + accessionNumber (both required together, else INVALID_INPUT). company only locates the filing folder: any CIK that filed or co-filed the accession works. docTypes filters rows by exact, case-insensitive SEC document type ("EX-21" does not match "EX-21.1"; use prefix matching yourself if needed) before paging; meta.document_count is SEC's own count and ignores the filter. doc_type of XBRL data files is e.g. "EX-101.SCH" or "XML". url points to the raw file (the inline-XBRL viewer prefix is removed), so it can be passed to edgar_get_filing_document as documentUrl. EXAMPLE: {"company":"AAPL","accessionNumber":"0000320193-24-000123","docTypes":["EX-21.1"]} -> 1 row {"doc_type":"EX-21.1","document":"a10-kexhibit21109282024.htm","url":"https://www.sec.gov/Archives/edgar/data/320193/000032019324000123/a10-kexhibit21109282024.htm"}, meta.form "10-K", meta.period_of_report "2024-09-28". |
| edgar_get_filing_documentA | Fetch the text of an SEC filing document from the sec.gov EDGAR archives, converted from HTML to plain text, returned in character-paged chunks. Use to read the actual content of a filing (risk factors, MD&A, 8-K press release, ...). Identify the document by documentUrl (from edgar_list_filings), or by company + accessionNumber (the primary document is used unless document names another file in the filing). Behavior: GET to www.sec.gov (throttled to <=5 requests/s). Large 10-Ks can exceed 500k characters, so read them in pages. RETURNS: one page of text; nextOffset is null on the last page. Errors: INVALID_INPUT, INVALID_URL, COMPANY_NOT_FOUND, FILING_NOT_FOUND, NOT_FOUND, SEC_FETCH_FAILED (retryable). WHEN NOT TO USE: to find which filings exist use edgar_list_filings first; for structured financial values use edgar_get_company_facts (no text parsing needed). COST: free - direct sec.gov requests from this MCP server, no APIFY_TOKEN, no Apify billing. PARAMETERS: give EITHER documentUrl (wins if present; company/accessionNumber/document are then ignored) OR company + accessionNumber (both required together, else INVALID_INPUT). accessionNumber accepts dashed "0000320193-24-000123" or 18 plain digits; without document the filing's primary document is fetched (looked up in recent, then archived filings), with document that file name inside the same filing folder is fetched directly (e.g. an exhibit "ex99-1.htm" listed on index_url). offset and maxChars are measured in characters of the converted text (or of the raw body when raw=true), not bytes: loop with offset = nextOffset until hasMore is false. raw=true returns the original HTML/XML unchanged, so total_chars and offsets differ from text mode; do not mix offsets from the two modes. Non-HTML files (.txt) are returned as is in either mode. EXAMPLE: {"company":"AAPL","accessionNumber":"0000320193-24-000123","maxChars":20000} -> first 20000 chars of the 10-K text with nextOffset for the next page. |
| edgar_get_company_factsA | Get reported XBRL financial data (us-gaap, ifrs-full, dei, ...) for one company from the SEC companyfacts API, e.g. Assets, Revenues, NetIncomeLoss, EarningsPerShareDiluted. Two modes: (1) omit concepts to LIST the concepts the company reports (name, label, units, number of values) so you can pick exact names; (2) pass concepts to get their time-series values, newest first, optionally filtered by form (10-K/10-Q), fiscal period or date. Use edgar_get_concept_across_companies to compare one concept across many companies. Behavior: GET to data.sec.gov (throttled to <=5 requests/s). Values are as reported, so the same period can appear in several filings (see dedupe). RETURNS: list mode = one row per concept (units, value count); values mode = one row per reported value (start is null for instant concepts). Errors: COMPANY_NOT_FOUND, NOT_FOUND (no XBRL data), SEC_FETCH_FAILED (retryable). WHEN NOT TO USE: for filing documents/text use edgar_list_filings + edgar_get_filing_document; many companies at once -> edgar_get_concept_across_companies (free, one concept) or edgar_batch_export (paid). COST: free - direct sec.gov requests from this MCP server, no APIFY_TOKEN, no Apify billing. PARAMETERS: concepts switches the mode: omitted/empty = list mode (only taxonomy and search apply; forms, fiscalPeriod, since and dedupe are ignored), non-empty = values mode (search is ignored). Concept names are case-sensitive and must match exactly as listed (e.g. "NetIncomeLoss", not "netincome"); names the company never reported come back in meta.missing_concepts instead of failing. Many companies report revenue as "RevenueFromContractWithCustomerExcludingAssessedTax" rather than "Revenues", so run list mode with search "revenue" first. taxonomy applies in both modes. In values mode the filters combine with AND: forms matches the form of the filing that reported the value (["10-K"] = annual reports), fiscalPeriod matches fp ("FY" = full year; "Q4" is rarely reported separately), since compares the period end date. dedupe=true keeps one value per concept/unit/start-end period (the latest filed, i.e. restated) - set false to see every filing's figure. Rows are sorted by period end, newest first, then paged with limit/offset. EXAMPLE: {"company":"MSFT","concepts":["Revenues"],"fiscalPeriod":"FY","limit":5} -> 5 newest annual Revenues values in USD. |
| edgar_get_concept_across_companiesA | Cross-company query: get one XBRL concept (e.g. Revenues, Assets, NetIncomeLoss) for one calendar period for every SEC filer that reported it, using the SEC frames API. Sortable and paged. Use for free multi-company screening and peer comparison ("largest companies by total assets at end of 2023", "net income of all filers in CY2023"). Behavior: GET to data.sec.gov (throttled to <=5 requests/s); one frame download per call, plus the 6-hour-cached ticker map when companies is set. RETURNS: ranked rows, one per filer; meta names the frame and its source_url. Errors: NOT_FOUND (no such concept/unit/period frame), SEC_FETCH_FAILED (retryable). WHEN NOT TO USE: for one company's time series use edgar_get_company_facts; for filings use edgar_list_filings. COST: free - direct sec.gov requests from this MCP server, no APIFY_TOKEN, no Apify billing. PARAMETERS: period must match the concept type: flow items (Revenues, NetIncomeLoss) use durations "CY2023" or "CY2023Q2"; balance-sheet items (Assets, Liabilities, StockholdersEquity) need an instant such as "CY2023Q4I" - the wrong kind returns NOT_FOUND. Calendar periods are SEC-aligned approximations of each filer's fiscal period. concept, unit and taxonomy are case-sensitive path parts of one SEC frame, so all three must exist together: money uses unit "USD" (default), EPS "USD-per-shares", share counts "shares", ratios "pure"; dei concepts (e.g. EntityCommonStockSharesOutstanding) need taxonomy "dei". companies filters the frame after download (any ticker/CIK/name; unresolvable entries are silently skipped); rank is computed after that filter and the chosen sort, so rank 1 = largest value among the kept companies with value_desc. limit/offset then page the ranked rows. EXAMPLE: {"concept":"Assets","period":"CY2023Q4I","limit":10} -> top 10 filers by total assets at end of 2023. |
| edgar_batch_exportA | Bulk export (paid, via Apify) of structured SEC EDGAR data for up to 50 US companies in one call: entity metadata, recent filings (10-K, 10-Q, 8-K, S-1, DEF 14A, ...) with document URLs, XBRL financial facts (Assets, Revenues, NetIncomeLoss, EarningsPerShareDiluted, ...) and optional plain-text excerpts of primary filing documents.
WHEN TO USE: only when you need filing and/or fact rows for 5+ companies in one dataset, or text excerpts in bulk; for 1-4 companies call edgar_list_filings / edgar_get_company_facts per company (free). mode="filings" for filing history/links, "facts" for financial numbers, "both" for both. Not for real-time quotes, prices, options, non-US companies or investment advice.
BEHAVIOR: runs the Fairquery Apify Actor fairquery/edgar-company-facts-filings via the Apify API, which queries sec.gov (throttled to <=5 req/s). Requires the APIFY_TOKEN environment variable. Typical run 5-60 s; the call waits up to |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 7 tools
Each tool has a clearly distinct resource+action: identifier resolution, filing listing, filing index, document text, single-company facts, cross-company concept frames, and bulk export. The only near-overlap (edgar_get_company_facts vs edgar_get_concept_across_companies) is explicitly scoped as single-company time series vs cross-company single concept, with detailed WHEN NOT TO USE notes, so misselection is unlikely.
All seven tools use the same edgar_ snake_case prefix followed by a verb_noun phrase (resolve_company, list_filings, get_filing_index, get_company_facts, get_concept_across_companies, get_filing_document, batch_export). The pattern is predictable and readable throughout, with only the minor verb variation of batch_export.
Seven tools is well-scoped for a read-only SEC EDGAR data server, with each tool covering a distinct retrieval mode. No redundant or filler tools are present, and the free/paid split is handled by a single dedicated export tool rather than duplicated endpoints.
Core workflows are covered end to end: resolve identifiers, list filings, inspect filing indexes, read document text, and pull XBRL facts for one or many companies with a bulk paid option. Notable gaps remain, such as EDGAR full-text search across filings and free multi-company filing retrieval, but agents can largely work around these.