Skip to main content
Glama
fairquery-agent-trust-mcp

fairquery-agent-trust-mcp

Official

Batch export filings and facts via Apify Actor (paid)

edgar_batch_export
Read-onlyIdempotent

Export structured SEC EDGAR filings, XBRL facts, and optional text excerpts for up to 50 companies in one bulk call, enabling multi-company dataset analysis without repeated lookups.

Instructions

WHAT: 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: Only when you need filing and/or fact rows for 5 or more companies in one dataset, or text excerpts in bulk. mode "filings" is filing history and links, "facts" is financial numbers, "both" is both. WHEN NOT: Interactive lookups or 1-4 companies: use the free edgar_* tools (same SEC data). Not for real-time quotes, prices, options, non-US companies or investment advice. COST: Paid, billed to YOUR Apify account via your APIFY_TOKEN: $1.50 per 1,000 resolved companies + $1.00 per 1,000 filing rows + $0.20 per 1,000 fact rows + $2.00 per 1,000 text excerpts (+ $0.05 per 1,000 runs). Example: 1 company, 5 filings, 3 metrics x 4 values ~ $0.009. 2 companies, facts mode, 1 metric, 4 values ~ $0.005. RETURNS: Paged rows of type company, filing, fact, text_excerpt or error. Error rows carry code (INPUT_EMPTY, COMPANY_NOT_FOUND, RESOLVE_FAILED, SUBMISSIONS_FETCH_FAILED, FACTS_FETCH_FAILED, EXCERPT_FETCH_FAILED) and retryable, so one unresolvable company does not fail the call. Tool errors: APIFY_TOKEN_MISSING, APIFY_TOKEN_INVALID, APIFY_PAYMENT_REQUIRED, APIFY_ACTOR_RUN_FAILED, APIFY_TIMEOUT. BEHAVIOR: Runs the Fairquery Apify Actor fairquery/edgar-company-facts-filings with your APIFY_TOKEN. The Actor queries sec.gov (throttled to at most 5 requests/second). This tool does not call SEC itself. A typical run is 5-60 seconds; the call waits up to 300 seconds. Free edgar_* tools never read APIFY_TOKEN. PARAMETERS: companies: each entry is resolved by the Actor as a ticker, CIK or name fragment and billed once when resolved. Unresolvable entries yield a COMPANY_NOT_FOUND row and are not billed as a company. mode controls which other parameters apply. formTypes, since, maxFilingsPerCompany and includeTextExcerpt / excerptMaxChars affect "filings" and "both" only. metrics and maxFactsPerMetric affect "facts" and "both" only. Billed rows are resolved companies, plus filing rows, plus fact rows, plus one excerpt per filing row when includeTextExcerpt is true. Omitted optional fields use the Actor defaults: formTypes ["10-K","10-Q","8-K"] (pass [] for every form), maxFilingsPerCompany 5, metrics Assets, NetIncomeLoss, EarningsPerShareDiluted and Revenues (pass [] for a built-in 10-concept set), maxFactsPerMetric 4, excerptMaxChars 2000. since compares filing_date (inclusive). metrics are case-sensitive us-gaap or dei names. excerptMaxChars outside 200-20000 fails the Actor's input check. limit and offset only page rows after the run: every call runs and bills the Actor again, including a call that only changes offset, so pick a limit that covers the rows you need. EXAMPLE: {"companies":["AAPL","MSFT"],"mode":"facts","metrics":["Revenues"],"maxFactsPerMetric":4} -> company and fact rows (about $0.005).

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": {
      "companies": "<companies>"
    },
    "name": "edgar_batch_export"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNoOptional, one of "filings" | "facts" | "both", default "both". "filings" = filing rows only, "facts" = XBRL fact rows only; a company row is always included when resolved. Example: "facts"both
limitNoOptional page size: items to return, integer 1-1000 (default 100). Example: 50
sinceNoOptional, default no lower bound. Only filings with filing date >= this date, format YYYY-MM-DD (pattern ^\d{4}-\d{2}-\d{2}$), e.g. "2023-01-01". Ignored when mode="facts".
offsetNoOptional zero-based number of items to skip, integer 0-1000000 (default 0); pass nextOffset from the previous response, e.g. 100
metricsNoOptional; omitted = Actor default ["Assets","NetIncomeLoss","EarningsPerShareDiluted","Revenues"], [] = built-in 10-concept set. Case-sensitive us-gaap/dei concept names. Example: ["Assets","Revenues"]. Ignored when mode="filings".
companiesYesRequired. 1-50 tickers ("AAPL"), CIKs ("320193") or company name fragments ("Apple"); billed once per resolved company. Example: ["AAPL","MSFT"]
formTypesNoOptional; omitted = Actor default ["10-K","10-Q","8-K"], [] = all forms. Exact form types (case-insensitive), e.g. ["10-K","10-Q"] or ["8-K"]. Ignored when mode="facts".
excerptMaxCharsNoOptional integer, default 2000 characters per excerpt; the Actor accepts 200-20000 (values outside fail its input validation). Only used with includeTextExcerpt=true. Example: 5000
maxFactsPerMetricNoOptional integer 1-50, default 4 (Actor default). Most-recent values kept per concept and unit; each fact row is billed. Example: 4
includeTextExcerptNoOptional boolean, default false. true adds a billed plain-text excerpt row of each filing's primary document (slower). Ignored when mode="facts".
maxFilingsPerCompanyNoOptional integer 1-100, default 5 (Actor default). Max filing rows per company, newest first; each row is billed. Example: 3

Output Schema

NameRequiredDescriptionDefault
metaNoTool-specific context (summary counts, cost notes, ...)
countYesNumber of items in this page
itemsYesResult rows for this page
totalYesTotal items before paging
offsetYesOffset of the first item in this page
hasMoreYesTrue if more items exist after this page
nextOffsetYesOffset to pass for the next page, or null

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.1.2

TDQS

A4.9/5.0
Behavior5/5

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

Annotations only declare readOnly/openWorld/idempotent/non-destructive; the description adds materially more: the actual Apify Actor invoked, that the Actor (not this tool) calls sec.gov at <=5 req/s, a 5-60s typical runtime with a 300s wait cap, itemized pricing per company/filing/fact/excerpt row, per-row error codes with a retryable flag so one bad company does not fail the call, and distinct tool-level error codes (APIFY_TOKEN_MISSING/INVALID/PAYMENT_REQUIRED/etc.). It also flags the cost-relevant trap that offset-only paging re-runs and re-bills the Actor, which no structured field conveys.

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 labeled sections (WHAT/WHEN/WHEN NOT/COST/RETURNS/BEHAVIOR/PARAMETERS/EXAMPLE) make a long description scannable, and each block carries decision-relevant content. There is some redundancy: the billing composition is stated in COST and restated in PARAMETERS, and the worked dollar examples are both lengthy and low-value beyond one.

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 an 11-parameter, paid, externally-executed tool this covers everything an agent needs: prerequisites (APIFY_TOKEN on the caller's account), cost predictability with worked examples, latency and timeout behavior, pagination economics, and partial-failure semantics via error rows. An output schema exists, so the RETURNS block is a bonus rather than a gap-filler.

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 already 100%, yet the description adds semantics the schema lacks: which parameters mode gates (formTypes/since/maxFilingsPerCompany/includeTextExcerpt for filings/both; metrics/maxFactsPerMetric for facts/both), the Actor-side defaults being applied, the []-means-everything convention for formTypes and the built-in 10-concept set for metrics, metrics being case-sensitive us-gaap/dei names, resolution by ticker/CIK/name fragment with per-resolved-company billing, and the critical note that excerptMaxChars outside 200-20000 fails the Actor's own validation even though the JSON schema permits 100-50000.

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 WHAT block names a specific verb and resource (bulk export of SEC EDGAR entity metadata, filings, XBRL facts, text excerpts) and scopes it (up to 50 US companies, one call). It explicitly separates itself from the free edgar_* siblings, so an agent can choose between them without opening either schema.

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?

WHEN gives a concrete selection threshold (5+ companies in one dataset, or bulk text excerpts) and decomposes the mode parameter into filings/facts/both. WHEN NOT names the alternatives (free edgar_* tools for 1-4 companies or interactive lookups) and states out-of-scope domains like real-time quotes, options, non-US companies and investment advice.

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