Skip to main content
Glama

Get a canonical formula

get_formula
Read-onlyIdempotent

The canonical formula of one GASP Standard metric in the GASP grammar, with its unit, operating (O) and market (M) forms, named variants, breakdowns (one row per value of a field or bucket; total() reads the whole population), notes, the metrics it reads with role and polarity, the fields and datasets the formula and each form read, the enum filters each form applies (so forms reading the same fields show where they differ) and the formula as written in the standard. A metric that cannot be computed as one formula gives the reason. Names resolve as in lookup_metric. Use get_data_requirements for field types and example SQL and generate_query for SQL against your own tables.

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": {
      "metric": "<metric>"
    },
    "name": "get_formula"
  }
}

Input Schema

NameRequiredDescriptionDefault
metricYesExact metric name, abbreviation, alias or formula id (e.g. 'NRR', 'LTV', 'CAC Payback', 'aging_buckets'). A name several departments use returns the candidates to choose from.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so the safety profile is covered; the description instead adds substantive payload behavior — breakdown rows are one per field value or bucket with total() reading the whole population, enum filters are shown per form so overlapping forms can be compared, and a non-computable metric returns the reason rather than failing. That last point is genuinely valuable failure-mode disclosure absent from the annotations. It stops short of stating output size or shape conventions for the returned object.

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?

The information density is high and mostly earns its place, but it is delivered as a single sprawling sentence of roughly a hundred words with the routing guidance tacked onto the end. Front-loading the resource is done well, yet a comma-list of nine payload components is harder to parse than the same content split into two or three sentences.

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?

There is no output schema, so the description carries the full burden of describing the return value, and it does so thoroughly: unit, O/M forms, variants, breakdown semantics, notes, dependency metrics with role and polarity, fields and datasets read, per-form enum filters, and the verbatim standard text. Combined with the non-computable-metric case and the lookup_metric cross-reference, an agent can call this correctly and interpret the result. Only the overall response envelope (single object vs. list when candidates are returned) is left implicit.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With one parameter at 100% schema coverage, the schema already documents that the metric accepts a name, abbreviation, alias or formula id and that ambiguous names return candidates. The description's only addition is 'Names resolve as in lookup_metric,' which is a useful cross-reference but does not extend the parameter's meaning beyond the schema. Baseline 3 is correct here.

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 precise resource — one GASP Standard metric's canonical formula in the GASP grammar — and enumerates exactly what that payload contains (unit, O/M forms, variants, breakdowns, notes, dependency metrics with role/polarity, fields/datasets, enum filters per form, source text). It explicitly separates itself from lookup_metric (name resolution), get_data_requirements (field types/SQL) and generate_query (SQL on user tables), so an agent can place it among siblings without opening a schema.

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?

It routes adjacent needs to the right alternatives explicitly: get_data_requirements for field types and example SQL, generate_query for SQL against your own tables, and lookup_metric for name resolution semantics. What it does not state is the inverse condition — when an agent should prefer lookup_metric or lookup_definition over this tool — so the routing is one-directional rather than a full when/when-not decision.

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.