Skip to main content
Glama

Ratios computed from the filings

ratios
Read-onlyIdempotent

Return the ratios FinancialMD computes from a company's standardized facts: gross, operating, net and free cash flow margins, revenue growth year over year, return on equity and on assets, asset turnover, current ratio, debt to equity, interest coverage, basic and diluted EPS; for banks net interest income to average loans and securities (not the bank's reported NIM), efficiency ratio and loans to deposits; for insurers loss and acquisition cost ratios; and valuation at each period end (market cap, EV, P/E, P/S, P/B, EV/EBITDA, EV/EBIT, FCF and dividend yield) from the last IEX close on or before the period end (data.price_basis says which close, or why valuation is empty: several share classes, an ADR, no prices). The result has the statement grid shape (periods most recent first, one row per ratio, cells aligned with periods); margins and growth are fractions (0.462 is 46.2 percent). Every cell is a value object whose proof lists the proof ids of its inputs (proof.inputs) and whose method is derived_lineitem; proof_get on a ratio proof returns the inputs and the formula. A cell is null when an input is missing (a bank has no gross margin) or a denominator is zero: never NaN. as_of computes from the facts known on that date. For valuation on every trading day use ratios_daily. Use it when the question is about margins, returns, leverage, growth or valuation at period ends.

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": {
      "company": "<company>"
    },
    "name": "ratios"
  }
}

Input Schema

NameRequiredDescriptionDefault
as_ofNoKnowledge date (YYYY-MM-DD or RFC 3339): the answer is what was known at that instant. Omit for the current view.
limitNoMaximum number of periods or items to return (default 10, at most 200).
ratiosNoOptional: only these ratio ids (the grid is trimmed client-side; the call costs the same).
companyYesCompany: "ticker:AAPL" (or bare "AAPL", or "ticker:AAPL.XNAS"), "cik:320193", "fmd_01H...", or for a non-SEC EU/UK issuer "lei:<LEI>".
period_typeNoPeriod basis: annual (fiscal years), quarterly, ltm (last twelve months) or ytd (year to date).annual

Output Schema

NameRequiredDescriptionDefault
dataNo
metaNo
errorNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed14 schema fields changed
    • removedInput schema / examples
      Removed value: -[
      -  {
      -    "company": "ticker:AAPL",
      -    "limit": 5,
      -    "period_type": "annual"
      -  },
      -  {
      -    "as_of": "2024-12-31",
      -    "company": "ticker:JPM",
      -    "period_type": "quarterly",
      -    "ratios": [
      -      "roe",
      -      "net_margin"
      -    ]
      -  }
      -]
    • changedInput schema / properties / as_of / description
      Previous value: -"Knowledge date or timestamp (YYYY-MM-DD or RFC 3339). The answer is what FinancialMD knew at that instant: only facts whose known interval contains as_of. Omit for the current view."New value: +"Knowledge date (YYYY-MM-DD or RFC 3339): the answer is what was known at that instant. Omit for the current view."
    • removedInput schema / properties / as_of / examples
      Removed value: -[
      -  "2024-11-15",
      -  "2025-02-01T00:00:00Z"
      -]
    • changedInput schema / properties / company / description
      Previous value: -"Company identifier: a FinancialMD id (\"fmd_01H...\"), an SEC CIK (\"cik:320193\"), or a ticker (\"ticker:AAPL\", optionally with the MIC \"ticker:AAPL.XNAS\"). A bare ticker like \"AAPL\" is accepted and sent as ticker:AAPL. An issuer on an EU or UK regulated market that does not file with the SEC has no CIK: pass its LEI (\"lei:IOG4E947OATN0KJYSD45\") or its fmd_ id."New value: +"Company: \"ticker:AAPL\" (or bare \"AAPL\", or \"ticker:AAPL.XNAS\"), \"cik:320193\", \"fmd_01H...\", or for a non-SEC EU/UK issuer \"lei:<LEI>\"."
    • removedInput schema / properties / company / examples
      Removed value: -[
      -  "ticker:AAPL",
      -  "cik:320193",
      -  "fmd_01HZX8Q3K9W2M4N6P8R0T2V4X6"
      -]
    • removedOutput schema / description
      Removed value: -"The FinancialMD envelope (docs/API.md section 2): data plus meta (request_id, as_of knowledge time, matched company, coverage, pipeline_version, licence, terms, proof_base). Every numeric value inside data is an object with value, unit, currency, period, known interval, restated flag, method and a proof pointing at the filing. On failure the result is isError with an error object instead."
    • removedOutput schema / properties / data / description
      Removed value: -"The ratio grid: statement \"ratios\", period_type, view, currency, periods (most recent first) and one row per ratio id with cells aligned to periods."
    • changedOutput schema / properties / data / properties / rows / items / properties / cells / items / anyOf
      Previous value: -[
      -  {
      -    "description": "A proven number: value, unit, currency, decimals, period, known interval, restated, method, calc_type, proof.",
      -    "properties": {
      -      "calc_type": {
      -        "type": "string"
      -      },
      -      "currency": {
      -        "type": [
      -          "string",
      -          "null"
      -        ]
      -      },
      -      "decimals": {
      -        "type": [
      -          "integer",
      -          "null"
      -        ]
      -      },
      -      "known": {
      -        "properties": {
      -          "from": {
      -            "type": "string"
      -          },
      -          "to": {
      -            "type": [
      -              "string",
      -              "null"
      -            ]
      -          }
      -        },
      -        "type": "object"
      -      },
      -      "method": {
      -        "type": "string"
      -      },
      -      "period": {
      -        "type": "object"
      -      },
      -      "proof": {
      -        "description": "Where a value comes from: filing accession, form, filing date, taxonomy and tag, source URL, page and anchor.",
      -        "properties": {
      -          "accession": {
      -            "type": "string"
      -          },
      -          "anchor": {
      -            "type": [
      -              "string",
      -              "null"
      -            ]
      -          },
      -          "dims": {},
      -          "filed": {
      -            "type": "string"
      -          },
      -          "form": {
      -            "type": "string"
      -          },
      -          "id": {
      -            "type": "string"
      -          },
      -          "inputs": {
      -            "description": "For derived values (ratios): the proof ids of the inputs.",
      -            "items": {
      -              "type": "string"
      -            },
      -            "type": "array"
      -          },
      -          "page": {
      -            "type": [
      -              "integer",
      -              "null"
      -            ]
      -          },
      -          "source_url": {
      -            "type": "string"
      -          },
      -          "tag": {
      -            "type": [
      -              "string",
      -              "null"
      -            ]
      -          },
      -          "taxonomy": {
      -            "type": [
      -              "string",
      -              "null"
      -            ]
      -          }
      -        },
      -        "type": "object"
      -      },
      -      "restated": {
      -        "type": "boolean"
      -      },
      -      "unit": {
      -        "type": "string"
      -      },
      -      "value": {
      -        "type": [
      -          "number",
      -          "null"
      -        ]
      -      }
      -    },
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  },
      -  {
      -    "properties": {
      -      "versions": {
      -        "items": {
      -          "description": "A proven number: value, unit, currency, decimals, period, known interval, restated, method, calc_type, proof.",
      -          "properties": {
      -            "calc_type": {
      -              "type": "string"
      -            },
      -            "currency": {
      -              "type": [
      -                "string",
      -                "null"
      -              ]
      -            },
      -            "decimals": {
      -              "type": [
      -                "integer",
      -                "null"
      -              ]
      -            },
      -            "known": {
      -              "properties": {
      -                "from": {
      -                  "type": "string"
      -                },
      -                "to": {
      -                  "type": [
      -                    "string",
      -                    "null"
      -                  ]
      -                }
      -              },
      -              "type": "object"
      -            },
      -            "method": {
      -              "type": "string"
      -            },
      -            "period": {
      -              "type": "object"
      -            },
      -            "proof": {
      -              "description": "Where a value comes from: filing accession, form, filing date, taxonomy and tag, source URL, page and anchor.",
      -              "properties": {
      -                "accession": {
      -                  "type": "string"
      -                },
      -                "anchor": {
      -                  "type": [
      -                    "string",
      -                    "null"
      -                  ]
      -                },
      -                "dims": {},
      -                "filed": {
      -                  "type": "string"
      -                },
      -                "form": {
      -                  "type": "string"
      -                },
      -                "id": {
      -                  "type": "string"
      -                },
      -                "inputs": {
      -                  "description": "For derived values (ratios): the proof ids of the inputs.",
      -                  "items": {
      -                    "type": "string"
      -                  },
      -                  "type": "array"
      -                },
      -                "page": {
      -                  "type": [
      -                    "integer",
      -                    "null"
      -                  ]
      -                },
      -                "source_url": {
      -                  "type": "string"
      -                },
      -                "tag": {
      -                  "type": [
      -                    "string",
      -                    "null"
      -                  ]
      -                },
      -                "taxonomy": {
      -                  "type": [
      -                    "string",
      -                    "null"
      -                  ]
      -                }
      -              },
      -              "type": "object"
      -            },
      -            "restated": {
      -              "type": "boolean"
      -            },
      -            "unit": {
      -              "type": "string"
      -            },
      -            "value": {
      -              "type": [
      -                "number",
      -                "null"
      -              ]
      -            }
      -          },
      -          "type": "object"
      -        },
      -        "type": "array"
      -      }
      -    },
      -    "required": [
      -      "versions"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "properties": {
      +      "calc_type": {
      +        "type": "string"
      +      },
      +      "currency": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "decimals": {
      +        "type": [
      +          "integer",
      +          "null"
      +        ]
      +      },
      +      "known": {
      +        "properties": {
      +          "from": {
      +            "type": "string"
      +          },
      +          "to": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "method": {
      +        "type": "string"
      +      },
      +      "period": {
      +        "type": "object"
      +      },
      +      "proof": {
      +        "properties": {
      +          "accession": {
      +            "type": "string"
      +          },
      +          "anchor": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "dims": {},
      +          "filed": {
      +            "type": "string"
      +          },
      +          "form": {
      +            "type": "string"
      +          },
      +          "id": {
      +            "type": "string"
      +          },
      +          "inputs": {
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          "page": {
      +            "type": [
      +              "integer",
      +              "null"
      +            ]
      +          },
      +          "source_url": {
      +            "type": "string"
      +          },
      +          "tag": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "taxonomy": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "restated": {
      +        "type": "boolean"
      +      },
      +      "unit": {
      +        "type": "string"
      +      },
      +      "value": {
      +        "type": [
      +          "number",
      +          "null"
      +        ]
      +      }
      +    },
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  },
      +  {
      +    "properties": {
      +      "versions": {
      +        "items": {
      +          "properties": {
      +            "calc_type": {
      +              "type": "string"
      +            },
      +            "currency": {
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            },
      +            "decimals": {
      +              "type": [
      +                "integer",
      +                "null"
      +              ]
      +            },
      +            "known": {
      +              "properties": {
      +                "from": {
      +                  "type": "string"
      +                },
      +                "to": {
      +                  "type": [
      +                    "string",
      +                    "null"
      +                  ]
      +                }
      +              },
      +              "type": "object"
      +            },
      +            "method": {
      +              "type": "string"
      +            },
      +            "period": {
      +              "type": "object"
      +            },
      +            "proof": {
      +              "properties": {
      +                "accession": {
      +                  "type": "string"
      +                },
      +                "anchor": {
      +                  "type": [
      +                    "string",
      +                    "null"
      +                  ]
      +                },
      +                "dims": {},
      +                "filed": {
      +                  "type": "string"
      +                },
      +                "form": {
      +                  "type": "string"
      +                },
      +                "id": {
      +                  "type": "string"
      +                },
      +                "inputs": {
      +                  "items": {
      +                    "type": "string"
      +                  },
      +                  "type": "array"
      +                },
      +                "page": {
      +                  "type": [
      +                    "integer",
      +                    "null"
      +                  ]
      +                },
      +                "source_url": {
      +                  "type": "string"
      +                },
      +                "tag": {
      +                  "type": [
      +                    "string",
      +                    "null"
      +                  ]
      +                },
      +                "taxonomy": {
      +                  "type": [
      +                    "string",
      +                    "null"
      +                  ]
      +                }
      +              },
      +              "type": "object"
      +            },
      +            "restated": {
      +              "type": "boolean"
      +            },
      +            "unit": {
      +              "type": "string"
      +            },
      +            "value": {
      +              "type": [
      +                "number",
      +                "null"
      +              ]
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "type": "array"
      +      }
      +    },
      +    "required": [
      +      "versions"
      +    ],
      +    "type": "object"
      +  }
      +]
    • removedOutput schema / properties / data / properties / rows / items / properties / cells / items / description
      Removed value: -"A value object, null when the concept has no value for the period, or { versions: [...] } oldest first with history=true."
    • removedOutput schema / properties / data / properties / rows / items / properties / fiscal_alias / description
      Removed value: -"Deprecated twin of metric_alias, served for one more release."
    • removedOutput schema / properties / error / description
      Removed value: -"Present only on isError results: the API error code and message plus remedy hints."
    • removedOutput schema / properties / error / properties
      Removed value: -{
      -  "available_datasets": {
      -    "items": {
      -      "type": "string"
      -    },
      -    "type": "array"
      -  },
      -  "code": {
      -    "type": "string"
      -  },
      -  "docs": {
      -    "type": "string"
      -  },
      -  "message": {
      -    "type": "string"
      -  },
      -  "request_id": {
      -    "type": "string"
      -  },
      -  "retry_after": {
      -    "type": [
      -      "integer",
      -      "string"
      -    ]
      -  },
      -  "status": {
      -    "type": "integer"
      -  }
      -}
    • removedOutput schema / properties / meta / description
      Removed value: -"Request metadata: request_id, as_of, company resolution, coverage, pipeline_version, licence, terms, proof_base."
    • removedOutput schema / properties / meta / properties
      Removed value: -{
      -  "as_of": {
      -    "type": "string"
      -  },
      -  "attribution": {
      -    "description": "Citations a source requires on anything shown from the answer.",
      -    "items": {
      -      "properties": {
      -        "source": {
      -          "type": "string"
      -        },
      -        "text": {
      -          "type": "string"
      -        },
      -        "url": {
      -          "type": "string"
      -        }
      -      },
      -      "type": "object"
      -    },
      -    "type": "array"
      -  },
      -  "company": {
      -    "properties": {
      -      "cik": {
      -        "type": [
      -          "integer",
      -          "null"
      -        ]
      -      },
      -      "fmd_id": {
      -        "type": "string"
      -      },
      -      "matched_by": {
      -        "type": "string"
      -      },
      -      "name": {
      -        "type": "string"
      -      }
      -    },
      -    "type": "object"
      -  },
      -  "coverage": {
      -    "properties": {
      -      "from": {
      -        "type": "string"
      -      },
      -      "periods": {
      -        "type": "integer"
      -      },
      -      "to": {
      -        "type": "string"
      -      }
      -    },
      -    "type": "object"
      -  },
      -  "licence": {
      -    "items": {
      -      "type": "string"
      -    },
      -    "type": "array"
      -  },
      -  "pipeline_version": {
      -    "type": "string"
      -  },
      -  "proof_base": {
      -    "type": "string"
      -  },
      -  "request_id": {
      -    "type": "string"
      -  },
      -  "terms": {
      -    "type": "string"
      -  }
      -}
  2. Changed1 schema field changed
    • changedInput schema / properties / company / description
      Previous value: -"Company identifier: a FinancialMD id (\"fmd_01H...\"), an SEC CIK (\"cik:320193\"), or a ticker (\"ticker:AAPL\", optionally with the MIC \"ticker:AAPL.XNAS\"). A bare ticker like \"AAPL\" is accepted and sent as ticker:AAPL."New value: +"Company identifier: a FinancialMD id (\"fmd_01H...\"), an SEC CIK (\"cik:320193\"), or a ticker (\"ticker:AAPL\", optionally with the MIC \"ticker:AAPL.XNAS\"). A bare ticker like \"AAPL\" is accepted and sent as ticker:AAPL. An issuer on an EU or UK regulated market that does not file with the SEC has no CIK: pass its LEI (\"lei:IOG4E947OATN0KJYSD45\") or its fmd_ id."
  3. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already establish readOnly/idempotent/non-destructive, so the description correctly spends its words elsewhere: null-cell policy ('a cell is null when an input is missing ... never NaN'), the derived_lineitem method and proof-id provenance, as_of knowledge-date semantics, and why valuation can be empty (share classes, ADR, no prices, price_basis). This is unusually rich behavioral context an agent cannot get from the annotations.

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

Conciseness3/5

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

It is front-loaded with the returned content, but the long run-on enumeration of every ratio largely duplicates the ratios enum already in the schema, and the whole thing is delivered as one dense paragraph. It is information-rich yet would be far more scannable with the null semantics, proof structure, and ratios_daily routing split into distinct lines.

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 5-parameter tool with an output schema, it covers everything an agent still needs: grid shape (periods most recent first, one row per ratio), fraction-vs-percent units, null and zero-denominator handling, proof traversal via proof_get, and the daily-vs-period-end boundary. Nothing required to call or interpret it 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, but the description adds real meaning beyond the schema: as_of is framed as computing 'from the facts known on that date', and the ratios filter is disclosed as client-side trimming where 'the call costs the same', which affects whether an agent should bother filtering. period_type and limit are left entirely to the schema, keeping it short of a 5.

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 resource (computed ratios) and enumerates the concrete families it returns: margins, growth, returns, leverage, bank-specific NII-to-loans/efficiency/loans-to-deposits, insurer loss and acquisition cost ratios, and period-end valuation multiples. It also states the computational basis (FinancialMD-computed from standardized facts, not the bank's reported NIM), which separates it from siblings like financials_standardized or forward_ratios.

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?

Ends with an explicit selection rule: 'Use it when the question is about margins, returns, leverage, growth or valuation at period ends,' and routes period-end-vs-daily questions by naming ratios_daily for 'valuation on every trading day'. Both the when-to-use condition and the alternative are stated outright, leaving nothing 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.

Resources