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

fairquery-agent-trust-mcp

Official

Compare one XBRL concept across all companies

edgar_get_concept_across_companies
Read-onlyIdempotent

Compare one XBRL concept across SEC filers for a calendar period to screen peers or rank companies, returning sortable, paged results.

Instructions

WHAT: Cross-company query: one XBRL concept (Revenues, Assets, NetIncomeLoss) for one calendar period for every SEC filer that reported it, from the SEC frames API. Sortable and paged. WHEN: Free multi-company screening and peer comparison, such as the largest filers by total assets at the end of 2023, or net income of all filers in CY2023. WHEN NOT: 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 and no Apify billing. RETURNS: Ranked rows, one per filer. meta names the frame and its source_url. Errors: NOT_FOUND (no such concept, unit or period frame), 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 frame download per call, plus the cached ticker map when companies is set. rank is assigned after the company filter and the sort, then limit/offset page those rows. PARAMETERS: period must match the concept. Flow items (Revenues, NetIncomeLoss) use a duration such as "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 and must exist together: money uses "USD" (the default), EPS uses "USD-per-shares", share counts use "shares", ratios use "pure". dei concepts need taxonomy "dei". companies filters the frame after download (ticker, CIK or name; unresolvable entries are skipped). rank 1 is the first row after the chosen sort. value_desc puts the largest value first. EXAMPLE: {"concept":"Assets","period":"CY2023Q4I","limit":10} -> the top 10 filers by total assets at the end of 2023.

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": {
      "concept": "<concept>",
      "period": "<period>"
    },
    "name": "edgar_get_concept_across_companies"
  }
}

Input Schema

NameRequiredDescriptionDefault
sortNoOptional, one of "value_desc" | "value_asc" | "name", default "value_desc" (largest first); "name" = entity name A-Zvalue_desc
unitNoOptional, default "USD". Case-sensitive unit of measure: "USD", "USD-per-shares" (EPS), "shares", "pure" (ratios), or another currency code such as "EUR"USD
limitNoOptional page size: items to return, integer 1-500 (default 25). Example: 25
offsetNoOptional zero-based number of items to skip, integer 0-1000000 (default 0); pass nextOffset from the previous response, e.g. 100
periodYesRequired. Calendar frame, pattern ^CY\d{4}(Q[1-4]I?)?$: "CY2023" = annual duration, "CY2023Q2" = quarterly duration, "CY2023Q4I" = instant at quarter end (balance-sheet items)
conceptYesRequired. Exact XBRL concept name, case-sensitive, e.g. "Assets", "Revenues", "NetIncomeLoss"
taxonomyNoOptional, default "us-gaap". One of "us-gaap", "ifrs-full", "dei", "srt"us-gaap
companiesNoOptional, default omitted = all filers. 1-50 tickers, CIKs or name fragments to keep. Example: ["AAPL","MSFT","GOOGL"]

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.6/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/openWorld/non-destructive, yet the description still adds substantial non-obvious behavior: a 5 req/s shared rate limit, fixed User-Agent, redirect refusal, size caps, a 6-hour ticker-map cache, and the fact that rank is assigned after company filter and sort before limit/offset paging. It also enumerates error codes (NOT_FOUND, SEC_FETCH_FAILED retryable) and confirms no Apify billing, which annotations alone would never convey.

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 with WHAT/WHEN/WHEN NOT labels and tightly sectioned, so an agent can skim. It is long for a single tool, and the COST and BEHAVIOR blocks repeat transport detail that could be trimmed, but no sentence is pure filler.

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?

Given eight parameters, an output schema, and open-world network access, the definition covers error modes, paging semantics, period-type pitfalls, and cost constraints. Nothing an agent needs to invoke it correctly or interpret a failure is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; the description earns above that by explaining things the schema does not: flow concepts (Revenues, NetIncomeLoss) need a duration period while balance-sheet concepts need an instant, a mismatch returns NOT_FOUND, and concept/unit/taxonomy must exist together. It also clarifies that companies filters the frame after download and that unresolvable entries are silently skipped, which materially changes expected results.

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?

States a specific verb and resource with scope: 'one XBRL concept for one calendar period for every SEC filer that reported it, from the SEC frames API.' It explicitly names the sibling tools it is not (edgar_get_company_facts for time series, edgar_list_filings for filings), so an agent can route without opening a 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?

Provides an explicit WHEN section with two concrete screening scenarios and a WHEN NOT section naming the two alternatives with the condition that selects each. The EXAMPLE line reinforces the intended call shape for peer comparison.

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