Time series for one metric across fiscal periods. Returns newest-first rows with fiscal_year + fiscal_period labels — AUTHORITATIVE for period-specific questions ("Q2 FY2025?"). The period_end calendar date is NOT the fiscal label, especially for non-December FYE companies (AAPL FY ends Sep; CRM ...
Part of the MetricDuck — Financial Analysis server.
Free to start. No card required.
AI agents call get_metric_history to retrieve information from MetricDuck — Financial Analysis without modifying any data. This is common in research, monitoring, and reporting workflows where the agent needs context before taking action. Because read operations don't change state, they are generally safe to allow without restrictions -- but you may still want rate limits to control API costs.
Even though get_metric_history only reads data, uncontrolled read access can leak sensitive information or rack up API costs. An agent caught in a retry loop could make thousands of calls per minute. A rate limit gives you a safety net without blocking legitimate use.
Read-only tools are safe to allow by default. No rate limit needed unless you want to control costs.
{
"version": "1",
"default": "deny",
"tools": {
"get_metric_history": {}
}
} See the full MetricDuck — Financial Analysis policy for all 22 tools.
These attack patterns abuse exactly the kind of access get_metric_history gives an agent. Each links to the full case and the policy that stops it:
Other read tools across the catalogue. The same approach applies to each: allow, with a rate cap to control cost.
Time series for one metric across fiscal periods. Returns newest-first rows with fiscal_year + fiscal_period labels — AUTHORITATIVE for period-specific questions ("Q2 FY2025?"). The period_end calendar date is NOT the fiscal label, especially for non-December FYE companies (AAPL FY ends Sep; CRM FY ends Jan; ORCL FY ends May). Each row with an SEC accession is cited back to the source filing via the MetricDuck viewer. Use Cases: - "What was AAPL's Q2 FY2025 gross margin?" -> get_metric_history("AAPL", "gross_margin") - "ROE last 5 years for MSFT" -> get_metric_history("MSFT", "roe", period_type="FY", window=5) - "NVDA TTM revenue trend" -> get_metric_history("NVDA", "revenues", period_type="TTM") - "ABNB gross booking value trend" -> get_metric_history("ABNB", "gross_booking_value") (operating KPI; quarterly or FY) - "Net interest margin for a bank" -> get_metric_history("<bank>", "net_interest_margin") - "As of a past date / point-in-time" -> get_metric_history("MSFT", "revenues", vantage_date="2024-04-30") (series as known from filings published on/before that date) Common XBRL metric_ids: gross_margin, oper_margin, net_margin, ebitda_margin, roe, roa, roic, pe_ratio, ev_ebitda, ev_sales, fcf_yield, pb_ratio, current_ratio, debt_to_equity, interest_coverage, revenues, net_income, ebitda, fcf, net_cf_ops, capex, dividends_per_share, dividends_paid, dividend_yield, dividend_payout_ratio, fcf_payout_ratio, dividend_coverage. Also serves NON-XBRL operating KPIs (LLM-extracted from 10-K/10-Q MD&A + earnings releases), available QUARTERLY and ANNUAL (FY) — coverage varies by KPI. This set spans banking (net_interest_margin, common_equity_tier_1_capital_ratio, return_on_average_assets/equity), insurance (combined_ratio), SaaS (arr, remaining_performance_obligations), retail/marketplace (store_count, same_store_sales, gross_booking_value, take_rate), lodging/REIT (revpar, occupancy_rate, average_daily_rate), airlines (passenger_load_factor, prasm, casm), energy (oil_production), workforce (headcount), and more — full data-derived (non-exhaustive) list: net_interest_margin, return_on_average_assets, return_on_average_equity, nonperforming_assets_to_total_assets, nonperforming_loans_to_total_loans, allowance_for_credit_losses_to_total_loans, loan_to_deposit_ratio, net_charge_offs_to_average_loans, common_equity_tier_1_capital_ratio, tier_1_leverage_ratio, tier_1_capital_ratio, total_capital_ratio, return_on_average_tangible_common_equity, net_leverage_ratio, nonperforming_loan_ratio, liquidity_coverage_ratio, net_stable_funding_ratio, combined_ratio, loss_ratio, expense_ratio, policies_in_force, arr, recurring_revenue, remaining_performance_obligations, organic_revenue_growth, cancellation_rate, subscribers, arpu, store_count, same_store_sales, average_order_value, active_customers, customers, active_buyers, orders, bookings, backlog, gross_booking_value, nights_and_seats_booked, monthly_active_platform_consumers, trips, take_rate, occupancy_rate, average_daily_rate, revpar, weighted_average_remaining_lease_term, assets_under_management, passenger_load_factor, available_seat_miles, revenue_passenger_miles, passenger_mile_yield, prasm, trasm, casm, casm_ex, oil_production, natural_gas_production, book_to_bill_ratio, wafer_shipments, production_capacity, headcount, full_time_equivalent_employees, cash_runway. If a KPI you need isn't listed, just try its canonical name; only if it's truly absent does it live solely in filing text — then reach it via get_filing_section(ticker, "mda_results_operations", query=…) or compare_earnings_calls(ticker). Metric_id matching is strict (lowercase, exact spelling). Financial-sector tickers (banks, insurers) often NULL on COGS-based metrics (gross_margin, gross_profit) — use sector-appropriate alternatives (e.g. net_interest_margin, combined_ratio) where available. Price-derived multiples here (pe_ratio, ev_ebitda, pb_ratio…) use the PERIOD-END close; for a price on a SPECIFIC date use get_stock_price. To assemble a CUSTOM multiple (e.g. EV including operating leases) combine get_stock_price (price leg) with get_metric_history primitives: oper_lease_liabs, ttl_debt, cash_st_invs, ttl_equity, shares_basic. Adjacent tools: get_company_overview for a single-period snapshot across many metrics; get_financials for full statements (all line items) across multiple periods; get_stock_price for daily share prices and period returns.. It is categorised as a Read tool in the MetricDuck — Financial Analysis MCP Server, which means it retrieves data without modifying state.
Register the MetricDuck — Financial Analysis MCP server in PolicyLayer and add a rule for get_metric_history: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches MetricDuck — Financial Analysis. Nothing to install.
get_metric_history is a Read tool with low risk. Read-only tools are generally safe to allow by default.
Yes. Add a rate_limit block to the get_metric_history rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for get_metric_history. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
get_metric_history is provided by the MetricDuck — Financial Analysis MCP server (https://mcp.metricduck.com/mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
Deterministic rules across all 22 MetricDuck — Financial Analysis tools. Per-identity grants. Full audit log. Live in minutes. Nothing to install.
Free to start. No card required.
4,600+ MCP servers and 31,000+ tools scanned and risk-classified.