Skip to main content
Glama

Compare line items across filings

compare_line_items
Read-onlyIdempotent

Compare the same set of line-item names (revenue, net income, etc.) across multiple filings. filings: array of identity rows — each uses filing_id OR ticker + form_type + fiscal_year (+ optional quarter). form_type per row accepts 10-K / 10-Q / 20-F / 40-F, so peer comparisons can mix US and foreign issuers. line_items: required non-empty list; resolved through L0–L3 (10 / 20 / 30 / 50 credits per line item × number of filings, itemised in credits_by_line_item). Each fact in every row carries _resolution_level ("L0"-"L3") indicating which tier matched. Returns consolidated totals only — same as query_line_items, including one row per logical fact with fact_ids listing every position; for dimension slice values use the dimensional-breakdown tools or get_filing_statement per filing. light_weight_mode=true omits results[].facts[].dimensional_breakdowns across every row — saves context when you already know exactly what you need. Charged identically. Good for YoY or peer period alignment by named line items. If unsure what a filing calls a line item, list_filing_statements + get_filing_statement show its exact row labels. Multi-concept matches come pre-ordered (Akkru smart ranking); the order is a recommendation only — review all returned results and judge which one you need. Each results[i] lists in unresolved the line items with no consolidated-total fact in that filing. 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/line-items; FINANCIAL_API_DOCUMENTATION.md.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filingsYesFilings to compare (1–25). Each row identifies one filing: {"filing_id": …} or {"ticker": …, "fiscal_year": …, "form_type": …, "quarter"?: …}.
line_itemsYesLine-item names to compare across all filings, e.g. ["revenue", "net income"] (1–50).
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.8/5.0
Behavior5/5

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

The description goes well beyond the annotations (readOnlyHint, idempotentHint, destructiveHint). It discloses the credit/cost structure (L0–L3 tiers, 10/20/30/50 credits per line item × number of filings, itemised in credits_by_line_item), the `_resolution_level` field on each fact, the `unresolved` list per result, the `caveat` field and its aggregation into `_warnings`, the Pro+ `classification` block, and the behavior of light_weight_mode. It also explains that multi-concept matches are pre-ordered via Akkru smart ranking and that the order is a recommendation. This is rich behavioral context that annotations do not provide.

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 every sentence earns its place. It front-loads the core purpose and then covers cost, resolution levels, output shape, alternatives, and caveats. It is long, but the tool is complex (3 parameters, mixed filing identifiers, credit tiers, multiple output fields). The structure is logical, moving from what → how → output → when → caveats. Slightly over-long for a 3-param tool, but justified by the complexity.

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 is remarkably complete. It explains the return shape (consolidated totals, one row per logical fact, fact_ids listing every position), the `unresolved` field, `caveat`/`_warnings`, `classification` for Pro+, and the effect of light_weight_mode. It also covers cost, resolution levels, and routing to alternatives. An agent has everything needed to invoke this tool correctly and interpret its 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 filings rows can use filing_id OR ticker + form_type + fiscal_year (+ optional quarter), that form_type per row accepts 10-K/10-Q/20-F/40-F allowing mixed US/foreign issuers, that line_items must be non-empty and are resolved through L0–L3 tiers, and that light_weight_mode omits results[*].facts[*].dimensional_breakdowns. This adds real value over the schema's terse descriptions, though the schema already covers the basic structure.

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 clearly states the tool compares the same set of line-item names across multiple filings, with specific examples (revenue, net income). It distinguishes itself from query_line_items by noting it returns consolidated totals only, and from dimensional-breakdown tools. The verb 'compare' plus the resource 'line items across filings' is specific and unambiguous.

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?

The description explicitly says when to use this tool ('Good for YoY or peer period alignment by named line items') and when not to ('for dimension slice values use the dimensional-breakdown tools or get_filing_statement per filing'). It also provides guidance on how to identify correct line-item names using list_filing_statements + get_filing_statement, and warns that multi-concept matches are pre-ordered but the order is a recommendation only. This is comprehensive usage guidance.

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