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

fairquery-agent-trust-mcp

Official

Get XBRL financial facts for a company

edgar_get_company_facts
Read-onlyIdempotent

Get one company's SEC XBRL facts by listing reported concepts or fetching time series for specified concepts, filtered by form, fiscal period, or date.

Instructions

WHAT: Get reported XBRL financial data (us-gaap, ifrs-full, dei and others) for one company from the SEC companyfacts API, for example Assets, Revenues, NetIncomeLoss or EarningsPerShareDiluted. WHEN: Two modes. Omit concepts to list the concepts the company reports (name, label, units, number of values). Pass concepts to get their time series, newest first, optionally filtered by form, fiscal period or date. WHEN NOT: For filing documents or text use edgar_list_filings and edgar_get_filing_document. To compare one concept across many companies use edgar_get_concept_across_companies (free) or edgar_batch_export (paid). COST: Free. Direct sec.gov requests from this MCP server. No APIFY_TOKEN and no Apify billing. RETURNS: List mode: one row per concept (units and 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). BEHAVIOR: HTTPS only to www.sec.gov and data.sec.gov. User-Agent is "Fairquery info@getfairquery.com". At most 5 requests/second, shared by every free edgar_* tool. Redirects are refused. Responses are size-capped. The ticker map is cached for 6 hours. APIFY_TOKEN is not read. One GET of the companyfacts JSON. Values are as reported, so the same period can appear in several filings until dedupe keeps the latest. PARAMETERS: concepts switches the mode. Omit it, or pass an empty list, for list mode (only taxonomy and search apply; forms, fiscalPeriod, since and dedupe are ignored). A non-empty list is values mode (search is ignored). Concept names are case-sensitive and must match the list exactly ("NetIncomeLoss", not "netincome"). Names the company never reported come back in meta.missing_concepts and do not fail the call. 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 that reported the value ("10-K" is annual). fiscalPeriod matches fp ("FY" is the full year; "Q4" is rarely reported on its own). since compares the period end date. dedupe true (the default) keeps one value per concept, unit and period (the latest filed). Set it false to see every filing's figure. Rows are sorted by period end, newest first, then paged. EXAMPLE: {"company":"MSFT","concepts":["Revenues"],"fiscalPeriod":"FY","limit":5} -> the 5 newest annual Revenues values in USD.

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": {
      "company": "<company>"
    },
    "name": "edgar_get_company_facts"
  }
}

Input Schema

NameRequiredDescriptionDefault
formsNoOptional, values mode only, default all forms. Form types of the reporting filing (case-insensitive), e.g. ["10-K"] for annual or ["10-Q"] for quarterly figures
limitNoOptional page size: items to return, integer 1-500 (default 50). Example: 50
sinceNoOptional, values mode only. Keep values whose period end date >= this date, format YYYY-MM-DD, e.g. "2021-01-01"
dedupeNoOptional boolean, values mode only, default true = one value per concept/unit/period (latest filed); false = every reported value including repeats from later filings
offsetNoOptional zero-based number of items to skip, integer 0-1000000 (default 0); pass nextOffset from the previous response, e.g. 100
searchNoOptional, list mode only. Case-insensitive substring matched against concept name or label. Example: "revenue"
companyYesRequired, 1-200 chars. Ticker ("AAPL", case-insensitive), CIK of 1-10 digits ("320193" or "0000320193"; any SEC filer, even without a ticker) or registrant-name fragment ("Apple"; the first SEC ticker-map match is used). Call edgar_resolve_company first if a name is ambiguous.
conceptsNoOptional; omit = list mode. 1-25 exact, case-sensitive XBRL concept names = values mode. Example: ["Revenues","NetIncomeLoss","Assets"]
taxonomyNoOptional, default omitted = all taxonomies. Exact taxonomy key: "us-gaap", "ifrs-full", "dei" or "srt". Example: "us-gaap"
fiscalPeriodNoOptional, values mode only, one of "FY" | "Q1" | "Q2" | "Q3" | "Q4"; default all periods. Example: "FY"

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 already cover read-only/idempotent/open-world, but the description adds genuinely new operational context: a 5 req/s shared rate limit, the User-Agent string, redirect refusal, response size caps, a 6-hour ticker cache, and named error codes (COMPANY_NOT_FOUND, NOT_FOUND, SEC_FETCH_FAILED with retryability). It also explains the dedupe default and what happens when a company reports the same period in multiple filings.

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?

Labeled sections (WHAT/WHEN/WHEN NOT/COST/RETURNS/BEHAVIOR/PARAMETERS/EXAMPLE) make it skimmable and front-loaded. It is long and slightly redundant, repeating the APIFY_TOKEN point in both COST and BEHAVIOR, which costs a point.

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 a 10-parameter, dual-mode tool this covers mode selection, filtering logic, pagination, failure codes and cost. An output schema exists and return values are still sketched, so nothing an agent needs to invoke it correctly is missing.

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?

Well beyond the already-100% schema coverage, it explains that concepts switches modes and that forms, fiscalPeriod, since and dedupe are ignored in list mode while search is ignored in values mode — semantics not expressed in the schema. It also warns that concept names are case-sensitive and that unknown names return in meta.missing_concepts rather than failing.

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 (get reported XBRL financial data from the SEC companyfacts API) for one company, names the taxonomies covered, and gives concrete example concepts. It is clearly distinguishable from filing-document and cross-company siblings.

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?

Explicit WHEN section distinguishes two operational modes and WHEN NOT names the exact alternatives with the condition that selects each (edgar_list_filings / edgar_get_filing_document for documents, edgar_get_concept_across_companies or edgar_batch_export for cross-company comparison). It also advises running list mode with search 'revenue' before querying values.

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