Skip to main content
Glama

Rank all companies on one concept (XBRL frames)

edgar_rank_companies
Read-onlyIdempotent

Rank SEC filers by a chosen XBRL concept for a calendar period, such as revenues or cash balances, to identify top companies for financial comparison and peer analysis.

Instructions

Rank every SEC filer on one XBRL concept for a calendar period (XBRL "frames"), e.g. largest revenues in CY2025, most cash at end of 2025. Period formats: 'CY2025' (annual duration), 'CY2025Q4' (quarter duration), 'CY2025Q4I' (instant, for balance-sheet items). Values are aligned to calendar periods by the SEC, so fiscal years that don't match the calendar map to the closest calendar period.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
unitNoUnit, e.g. 'USD', 'USD/shares' (or 'USD-per-shares'), 'shares' (default USD).USD
limitNoHow many companies to return (default 25).
orderNoSort order (default largest first).desc
periodYesCalendar period.
conceptYesConcept, e.g. 'us-gaap:Revenues', 'us-gaap:NetIncomeLoss', 'us-gaap:CashAndCashEquivalentsAtCarryingValue'.
highlightNoAlso report this company's rank.
response_formatNoOutput format: 'markdown' (readable, default) or 'json' (structured).markdown

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly/openWorld/idempotent/non-destructive hints, so the description only adds value beyond safety. It contributes a useful behavioral detail about how fiscal periods are mapped to calendar periods, which is exactly the kind of context that would otherwise be surprising to an agent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact and front-loaded: the first sentence states the core operation and examples, followed by only the non-obvious period format and calendar-alignment behavior. Every sentence contributes information that isn't already in the schema, with no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 7 parameters, no output schema, and annotations carrying the safety profile, the description covers the two required parameters' subtleties and the calendar-period mapping that affects result interpretation. It could additionally mention what fields each ranked row returns, but that is not necessary for selecting or invoking the tool correctly.

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?

The schema already covers 100% of parameters, so the baseline is 3. The description adds real added value on top by explaining the period grammar (CY2025/CY2025Q4/CY2025Q4I) and giving concept examples, adding meaning beyond the regex patterns. It doesn't need to add every parameter because the schema already documents unit/limit/order/response_format.

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 names a specific verb ('Rank every SEC filer') with a specific object ('one XBRL concept') and a scope ('calendar period') plus concrete examples like largest revenues and most cash. This makes the tool's purpose unmistakable and distinct from company-specific siblings like edgar_get_financial_statement or edgar_compare_companies.

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 a clear context: universe-wide ranking across all SEC filers, with period semantics and calendar-alignment caveats explained. It does not explicitly say 'use X instead for named-company comparisons' or mention when not to use it, but the framing frames vs specific filer tools is clear enough for an agent to infer the right selection.

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