Skip to main content
Glama

Compare facts across filings

compare_facts
Read-onlyIdempotent

Compare specific XBRL fact_ids across multiple filings. Each row supplies its own fact_ids list, so different filings can compare different ids (e.g. when concept tagging changed between years). filings: array of rows — each uses filing_id OR ticker + form_type + fiscal_year (+ optional quarter), plus a required non-empty fact_ids list. Pricing: ceil(total_deduped_fact_ids / 5) × 10 across the whole request. light_weight_mode=true drops dimensional_breakdowns from all results — saves context when you already know exactly what you need. Each results[i] may include a caveat field; per-row caveats are auto-aggregated and deduplicated into top-level _warnings — read either, and surface to the user when present. Pro+ responses add a per-result classification block (canonical sector(s) + source); omitted for sub-Pro. POST /api/v1/data/compare/facts; FINANCIAL_API_DOCUMENTATION.md.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filingsYesFilings to compare (1–25; ≤ 2500 fact_ids total). Each row: {"filing_id": …, "fact_ids": [...]} or {"ticker": …, "fiscal_year": …, "form_type": …, "fact_ids": [...]}.
light_weight_modeNoWhen true, return a leaner payload (drops the most verbose nested fields). Charged the same. Saves context when you already know exactly what you need.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnly, idempotent, and non-destructive behavior. The description goes well beyond this by disclosing caveat aggregation into _warnings, Pro+ classification blocks, pricing behavior, and the specific effect of light_weight_mode on dimensional_breakdowns. This is rich behavioral context with no contradictions.

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?

The description is dense but well-organized, front-loading the core purpose before diving into row semantics, pricing, and output caveats. Each sentence adds useful information, though the trailing endpoint and documentation reference are slightly redundant given the schema and context.

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 tool with no output schema, the description covers the essential behavioral and output details: per-row caveats, aggregated warnings, classification availability by tier, and light-weight mode effects. Combined with the schema's limits and required fields, an agent has enough context to invoke it correctly and interpret results.

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 adds meaningful semantics beyond the schema: it explains that each row can compare different fact_ids, clarifies the filing_id OR ticker+form_type+fiscal_year alternatives, and specifies that fact_ids must be non-empty. It also gives concrete meaning to light_weight_mode by naming the dropped field.

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 description opens with a specific verb and resource: 'Compare specific XBRL fact_ids across multiple filings.' This clearly distinguishes the tool from siblings like compare_line_items by focusing on XBRL fact_ids, and the per-row fact_ids detail further clarifies its unique purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives clear context for when to use the tool: comparing fact_ids across filings, including cases where concept tagging changed between years. It does not explicitly name alternatives or exclusions, but the usage context is strong enough that an agent can infer when this tool is appropriate.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources