Skip to main content
Glama

SEC EDGAR: filings, insider trades, 13F

US Stock Screener API: SEC financial data, revenue, net margin

search_sec_companies_by_financials
Read-onlyIdempotent

Screen every US company that files with the SEC by revenue, profit, margins, cash flow and balance sheet for one calendar year or quarter: "revenue over $10B and net margin above 20% in 2025", "top 20 by operating cash flow". Every value cites the XBRL tag and the SEC filing it came from.

Needs period, e.g. CY2025 or CY2025Q3. For one known company's history use get_sec_financials.

Inputs: money filters are in US dollars (10000000000 = $10B) and ratios such as net_margin are decimals (0.2 = 20%). Every condition in filters ({metric, min, max}) must hold; sortBy with maxResults gives a top N; metrics adds columns.

Read-only, no side effects. Charged per row returned, at the price below; a call that fails or runs out of time (55 s) is free. If one source does not answer, the rest still comes back and warnings names the gap. Limit: 60 calls a minute per key (10 on a new free key); past it the call is refused (rate_limited, free): retry after about 10 seconds.

Price: $0.002 per screen-row.

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

Input Schema

NameRequiredDescriptionDefault
periodYesCalendar period in SEC frames format: "CY2025" = annual figures, "CY2025Q3" = 3-month quarter figures
sortByNoMetric to rank by, e.g. "operating_cash_flow"
filtersNoConditions every company must meet, as a list of {metric, min, max} (either bound optional, both inclusive)
metricsNoMore fields to show per company besides the sortBy and filter metrics, e.g. ["operating_cash_flow", "total_assets"]
sortOrderNo"desc" = largest first (top N), "asc" = smallest first (e.g. the lowest net margin)desc
maxResultsNoMost companies to return (and charge for), e.g. 20 for a top 20
tickersOnlyNotrue = skip companies without a ticker in the SEC's company_tickers.json (delisted companies, private issuers of public debt, subsidiaries)
includeSourcesNotrue = each row has `sources`: per value the XBRL tag, the SEC accession number and the filing URL (or the formula for derived values)

Output Schema

NameRequiredDescriptionDefault
rowsYes
toolNo
countYes
messageNo
warningsNo
balance_usdNo
charged_usdNo
duration_secondsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / filters / examples
      Added value: +[
      +  [
      +    {
      +      "metric": "revenue",
      +      "min": 10000000000
      +    },
      +    {
      +      "metric": "net_margin",
      +      "min": 0.2
      +    }
      +  ]
      +]
    • addedInput schema / properties / maxResults / examples
      Added value: +[
      +  20
      +]
    • addedInput schema / properties / period / examples
      Added value: +[
      +  "CY2025"
      +]
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "properties": {
      +    "balance_usd": {
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "charged_usd": {
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "count": {
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "duration_seconds": {
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "message": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "rows": {
      +      "items": {
      +        "additionalProperties": true,
      +        "properties": {
      +          "capex": {
      +            "description": "Capital expenditure: payments for property, plant and equipment, as a positive number. Null for most banks. In USD. Only present when asked (sortBy, filters, metrics) or needed for a derived field.",
      +            "type": [
      +              "null",
      +              "number"
      +            ]
      +          },
      +          "cash_and_equivalents": {
      +            "description": "Cash and cash equivalents at period end (banks: cash and due from banks). In USD. Only present when asked (sortBy, filters, metrics) or needed for a derived field.",
      +            "type": [
      +              "null",
      +              "number"
      +            ]
      +          },
      +          "cik": {
      +            "description": "SEC CIK, 10 digits.",
      +            "type": [
      +              "null",
      +              "string"
      +            ]
      +          },
      +          "company_name": {
      +            "description": "Company name as in the SEC frame.",
      +            "type": [
      +              "null",
      +              "string"
      +            ]
      +          },
      +          "cost_of_revenue": {
      +            "description": "Cost of revenue / cost of goods and services sold. In USD. Only present when asked (sortBy, filters, metrics) or needed for a derived field.",
      +            "type": [
      +              "null",
      +              "number"
      +            ]
      +          },
      +          "currency": {
      +            "description": "Always USD: frames are screened in USD (companies reporting in other currencies are not included). Values are in full dollars, not thousands.",
      +            "type": [
      +              "null",
      +              "string"
      +            ]
      +          },
      +          "current_assets": {
      +            "description": "Total current assets at period end. Null for banks and insurers (unclassified balance sheet). In USD. Only present when asked (sortBy, filters, metrics) or needed for a derived field.",
      +            "type": [
      +              "null",
      +              "number"
      +            ]
      +          },
      +          "current_liabilities": {
      +            "description": "Total current liabilities. Null for banks and insurers. In USD. Only present when asked (sortBy, filters, metrics) or needed for a derived field.",
      +            "type": [
      +              "null",
      +              "number"
      +            ]
      +          },
      +          "depreciation_amortisation": {
      +            "description": "Depreciation, depletion and amortization (cash flow statement). In USD. Only present when asked (sortBy, filters, metrics) or needed for a derived field.",
      +            "type": [
      +              "null",
      +              "number"
      +            ]
      +          },
      +          "dividends_paid": {
      +            "description": "Dividends paid in cash, as a positive number. In USD. Only present when asked (sortBy, filters, metrics) or needed for a derived field.",
      +            "type": [
      +              "null",
      +              "number"
      +            ]
      +          },
      +          "ebitda": {
      +            "description": "Derived: operating_profit + depreciation_amortisation. Only present when asked (sortBy, filters, metrics) or needed for a derived field.",
      +            "type": [
      +              "null",
      +              "number"
      +            ]
      +          },
      +          "eps_basic": {
      +            "description": "Basic earnings per share, in USD per share. Never derived (null for Q4 unless reported). Only present when asked (sortBy, filters, metrics) or needed for a derived field.",
      +            "type": [
      +              "null",
      +              "number"
      +            ]
      +          },
      +          "eps_diluted": {
      +            "description": "Diluted earnings per share, in USD per share. Never derived. Only present when asked (sortBy, filters, metrics) or needed for a derived field.",
      +            "type": [
      +              "null",
      +              "number"
      +            ]
      +          },
      +          "equity_attributable_to_parent": {
      +            "description": "Stockholders' equity attributable to the parent. In USD. Only present when asked (sortBy, filters, metrics) or needed for a derived field.",
      +            "type": [
      +              "null",
      +              "number"
      +            ]
      +          },
      +          "equity_ratio": {
      +            "description": "Derived: total_equity / total_assets (0.25 = 25%). Only present when asked (sortBy, filters, metrics) or needed for a derived field.",
      +            "type": [
      +              "null",
      +              "number"
      +            ]
      +          },
      +          "financing_cash_flow": {
      +            "description": "Net cash from financing activities. In USD. Only present when asked (sortBy, filters, metrics) or needed for a derived field.",
      +            "type": [
      +              "null",
      +              "number"
      +            ]
      +          },
      +          "free_cash_flow": {
      +            "description": "Derived: operating_cash_flow - capex. Only present when asked (sortBy, filters, metrics) or needed for a derived field.",
      +            "type": [
      +              "null",
      +              "number"
      +            ]
      +          },
      +          "gross_margin": {
      +            "description": "Derived: gross_profit / revenue (0.25 = 25%). Only present when asked (sortBy, filters, metrics) or needed for a derived field.",
      +            "type": [
      +              "null",
      +              "number"
      +            ]
      +          },
      +          "gross_profit": {
      +            "description": "Gross profit; when not tagged, revenue - cost_of_revenue (sources says derived). In USD. Only present when asked (sortBy, filters, metrics) or needed for a derived field.",
      +            "type": [
      +              "null",
      +              "number"
      +            ]
      +          },
      +          "investing_cash_flow": {
      +            "description": "Net cash from investing activities. In USD. Only present when asked (sortBy, filters, metrics) or needed for a derived field.",
      +            "type": [
      +              "null",
      +              "number"
      +            ]
      +          },
      +          "long_term_debt": {
      +            "description": "Long-term debt, non-current portion where tagged, else total long-term debt; sources shows the tag. In USD. Only present when asked (sortBy, filters, metrics) or needed for a derived field.",
      +            "type": [
      +              "null",
      +              "number"
      +            ]
      +          },
      +          "net_income": {
      +            "description": "Net income including noncontrolling interests (ProfitLoss), else net income attributable to the parent; as in the esef-annual-reports Actor. In USD. Only present when asked (sortBy, filters, metrics) or needed for a derived field.",
      +            "type": [
      +              "null",
      +              "number"
      +            ]
      +          },
      +          "net_income_attributable_to_parent": {
      +            "description": "Net income attributable to the parent's shareholders (the US 'net income' headline). In USD. Only present when asked (sortBy, filters, metrics) or needed for a derived field.",
      +            "type": [
      +              "null",
      +              "number"
      +            ]
      +          },
      +          "net_margin": {
      +            "description": "Derived: net_income / revenue (0.25 = 25%). Only present when asked (sortBy, filters, metrics) or needed for a derived field.",
      +            "type": [
      +              "null",
      +              "number"
      +            ]
      +          },
      +          "noncurrent_liabilities": {
      +            "description": "Total non-current liabilities, when tagged. In USD. Only present when asked (sortBy, filters, metrics) or needed for a derived field.",
      +            "type": [
      +              "null",
      +              "number"
      +            ]
      +          },
      +          "operating_cash_flow": {
      +            "description": "Net cash from operating activities. In USD. Only present when asked (sortBy, filters, metrics) or needed for a derived field.",
      +            "type": [
      +              "null",
      +              "number"
      +            ]
      +          },
      +          "operating_margin": {
      +            "description": "Derived: operating_profit / revenue (0.25 = 25%). Only present when asked (sortBy, filters, metrics) or needed for a derived field.",
      +            "type": [
      +              "null",
      +              "number"
      +            ]
      +          },
      +          "operating_profit": {
      +            "description": "Operating income (loss). Null for most banks and insurers. In USD. Only present when asked (sortBy, filters, metrics) or needed for a derived field.",
      +            "type": [
      +              "null",
      +              "number"
      +            ]
      +          },
      +          "period": {
      +            "description": "The calendar period screened, e.g. CY2025 or CY2025Q3. SEC frames are calendar-aligned: each company appears with its own fiscal period that best fits this calendar period (Apple's year to 27 Sep 2025, Microsoft's to 30 Jun 2025 and Walmart's to 31 Jan 2026 are all in CY2025). See period_start/period_end.",
      +            "type": [
      +              "null",
      +              "string"
      +            ]
      +          },
      +          "period_end": {
      +            "description": "Last day of that fiscal period (YYYY-MM-DD); balance-sheet values are as of this date (when period_start is null: the balance-sheet date nearest the calendar period's end).",
      +            "type": [
      +              "null",
      +              "string"
      +            ]
      +          },
      +          "period_start": {
      +            "description": "First day of the company's own fiscal period that SEC assigned to this calendar period (YYYY-MM-DD); null when the company reported no duration value (income, cash flow or EPS) for it.",
      +            "type": [
      +              "null",
      +              "string"
      +            ]
      +          },
      +          "profit_before_tax": {
      +            "description": "Income from continuing operations before income taxes. In USD. Only present when asked (sortBy, filters, metrics) or needed for a derived field.",
      +            "type": [
      +              "null",
      +              "number"
      +            ]
      +          },
      +          "research_and_development": {
      +            "description": "Research and development expense. In USD. Only present when asked (sortBy, filters, metrics) or needed for a derived field.",
      +            "type": [
      +              "null",
      +              "number"
      +            ]
      +          },
      +          "retrieved_at": {
      +            "description": "UTC time the row was produced.",
      +            "type": [
      +              "null",
      +              "string"
      +            ]
      +          },
      +          "return_on_equity": {
      +            "description": "Derived: net_income / total_equity (0.25 = 25%). Calendar-year periods only. Only present when asked (sortBy, filters, metrics) or needed for a derived field.",
      +            "type": [
      +              "null",
      +              "number"
      +            ]
      +          },
      +          "revenue": {
      +            "description": "Total revenue / net sales (for banks: total net revenue). In USD. Only present when asked (sortBy, filters, metrics) or needed for a derived field.",
      +            "type": [
      +              "null",
      +              "number"
      +            ]
      +          },
      +          "schema_version": {
      +            "description": "Output schema version.",
      +            "type": [
      +              "null",
      +              "string"
      +            ]
      +          },
      +          "selling_general_and_administrative": {
      +            "description": "Selling, general and administrative expense (null when the company reports sales/marketing and G&A separately). In USD. Only present when asked (sortBy, filters, metrics) or needed for a derived field.",
      +            "type": [
      +              "null",
      +              "number"
      +            ]
      +          },
      +          "shares_outstanding": {
      +            "description": "Common shares outstanding at the balance-sheet date. Only present when asked (sortBy, filters, metrics) or needed for a derived field.",
      +            "type": [
      +              "null",
      +              "number"
      +            ]
      +          },
      +          "source_url": {
      +            "description": "EDGAR index page of the filing most of the row's values come from.",
      +            "type": [
      +              "null",
      +              "string"
      +            ]
      +          },
      +          "sources": {
      +            "additionalProperties": true,
      +            "description": "Only with includeSources: per metric {tag: XBRL concept used, accession: SEC filing the value comes from (the latest filing that reported it, or for re-checked values the first 10-K/10-Q that did), url: its EDGAR index page}, or {derived: formula} for derived values.",
      +            "type": [
      +              "null",
      +              "object"
      +            ]
      +          },
      +          "ticker": {
      +            "description": "Main ticker in the SEC's current ticker list (null if the company has none, e.g. delisted or private debt issuers).",
      +            "type": [
      +              "null",
      +              "string"
      +            ]
      +          },
      +          "total_assets": {
      +            "description": "Total assets at period end. In USD. Only present when asked (sortBy, filters, metrics) or needed for a derived field.",
      +            "type": [
      +              "null",
      +              "number"
      +            ]
      +          },
      +          "total_equity": {
      +            "description": "Total equity including noncontrolling interests, else stockholders' equity. In USD. Only present when asked (sortBy, filters, metrics) or needed for a derived field.",
      +            "type": [
      +              "null",
      +              "number"
      +            ]
      +          },
      +          "total_liabilities": {
      +            "description": "Total liabilities; when not tagged, total_assets - total_equity (sources says derived). In USD. Only present when asked (sortBy, filters, metrics) or needed for a derived field.",
      +            "type": [
      +              "null",
      +              "number"
      +            ]
      +          },
      +          "warnings": {
      +            "description": "Notes on this row: a value from a proxy statement replaced by the 10-K/10-Q figure, a value that could not be checked, or a metric left out because it was reported for a different period than the row's.",
      +            "type": [
      +              "array",
      +              "null"
      +            ]
      +          },
      +          "weighted_average_shares_basic": {
      +            "description": "Weighted average shares outstanding, basic. Never derived. Only present when asked (sortBy, filters, metrics) or needed for a derived field.",
      +            "type": [
      +              "null",
      +              "number"
      +            ]
      +          },
      +          "weighted_average_shares_diluted": {
      +            "description": "Weighted average shares outstanding, diluted. Never derived. Only present when asked (sortBy, filters, metrics) or needed for a derived field.",
      +            "type": [
      +              "null",
      +              "number"
      +            ]
      +          }
      +        },
      +        "type": [
      +          "object",
      +          "null"
      +        ]
      +      },
      +      "type": "array"
      +    },
      +    "tool": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "warnings": {
      +      "items": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "type": [
      +        "array",
      +        "null"
      +      ]
      +    }
      +  },
      +  "required": [
      +    "rows",
      +    "count"
      +  ],
      +  "type": "object"
      +}
  3. Added

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the annotations (readOnly, idempotent, openWorld, non-destructive), it discloses cost per returned row, that failed or timed-out calls are free, the 55-second limit, the 60/min (10 on a new free key) rate limit with a 10-second retry, and that partial results still return with `warnings` naming the gap. That is substantially more than the annotations convey and directly affects invocation strategy (e.g. batching with maxResults).

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?

Front-loaded with what the tool does and a concrete example, then requirement, units, filter semantics, then operational caveats (cost, timeout, rate limit) in a compressed short-paragraph form. Every sentence carries information an agent needs before calling.

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?

The tool has 8 parameters and an output schema, and the description covers everything outside those structured fields: required period, unit conventions, filter conjunction, ranking behavior, provenance of values, and cost/quota behavior. Nothing material for a correct call 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 still adds real meaning by explaining units (dollars, with 10000000000 = $10B; ratios as decimals, 0.2 = 20%) and the AND semantics of `filters`, plus how `sortBy` + `maxResults` combine into a top-N and that `metrics` only adds display columns. It does not elaborate on tickersOnly or includeSources, which the schema already covers.

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 — screening every US SEC filer by revenue, profit, margins, cash flow and balance sheet for a given calendar period — and gives concrete query shapes ("revenue over $10B and net margin above 20% in 2025"). It explicitly distinguishes itself from get_sec_financials, so an agent can pick the right tool from the name plus description alone.

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?

Names the alternative and the condition that selects it: "For one known company's history use get_sec_financials." It also shows the intended pattern of use through two worked screening examples and states that `period` is mandatory, leaving little to inference.

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.