Skip to main content
Glama

Get Calculation

get_calculation
Read-onlyIdempotent

Read one calculation: its status, its inputs and, once it has succeeded, its costed result. Use it to follow a calculation that upload_and_quote or quote_part started until its status is final: succeeded, failed, cancelled, timed_out or blocked (held for quota or billing). Until then it is queued, running or polling (an assembly waiting for its components): check again every few seconds. Returns the status, part revision, costing environment, lot size, material and the result, with its analytics: cost decomposition, price band, material, assumptions, process plan and review. Its bulk is left out, named in analytics_omitted: lot-size curve (optimize_lot_size), cost sheet (get_cost_breakdown), time breakdown (get_process_plan), cost drivers (explain_cost ranks them), assembly BOM rows; include_analytics=true returns it all. For what it costs and why, use explain_cost. Read-only and free.

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": {
      "calculation_id": "<calculation_id>"
    },
    "name": "get_calculation"
  }
}

Input Schema

NameRequiredDescriptionDefault
calculation_idYesId of a calculation, as upload_and_quote, quote_part or list_calculations return it.
include_analyticsNoWhether to include the `analytics` object (the cost breakdown and audit detail, often over 100 kB in full). Omitted: the whole object for the app and the REST API; for an MCP agent, the object without its bulk — the lot-size curve, the cost sheet (the `get_cost_breakdown` tool), the time breakdown, the cost drivers and an assembly's BOM rows (the `calculations_get_calculation_bom` tool (toolset `calculations`)), named in `analytics_omitted`. Pass true for the whole object anywhere, false to leave it out.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / include_analytics / description
      Previous value: -"Whether to include the `analytics` object (the cost breakdown and audit detail, often over 100 kB in full). Omitted: the whole object for the app and the REST API; for an MCP agent, the object without its bulk — the lot-size curve, the cost sheet (the `get_cost_breakdown` tool) and an assembly's BOM rows (the `calculations_get_calculation_bom` tool (toolset `calculations`)), named in `analytics_omitted`. Pass true for the whole object anywhere, false to leave it out."New value: +"Whether to include the `analytics` object (the cost breakdown and audit detail, often over 100 kB in full). Omitted: the whole object for the app and the REST API; for an MCP agent, the object without its bulk — the lot-size curve, the cost sheet (the `get_cost_breakdown` tool), the time breakdown, the cost drivers and an assembly's BOM rows (the `calculations_get_calculation_bom` tool (toolset `calculations`)), named in `analytics_omitted`. Pass true for the whole object anywhere, false to leave it out."
  2. Changed1 schema field changed
    • changedInput schema / properties / include_analytics / description
      Previous value: -"Whether to include the `analytics` object (the full cost breakdown and audit detail, often over 100 kB). Omitted: included for the app and the REST API, left out (null) for an MCP agent — pass true to get it, or read the cost through the cost sheet (the `get_cost_breakdown` tool; over MCP, `get_cost_breakdown`), which is compact. Pass false to leave it out anywhere."New value: +"Whether to include the `analytics` object (the cost breakdown and audit detail, often over 100 kB in full). Omitted: the whole object for the app and the REST API; for an MCP agent, the object without its bulk — the lot-size curve, the cost sheet (the `get_cost_breakdown` tool) and an assembly's BOM rows (the `calculations_get_calculation_bom` tool (toolset `calculations`)), named in `analytics_omitted`. Pass true for the whole object anywhere, false to leave it out."
  3. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  4. Changed1 schema field changed
    • addedInput schema / properties / calculation_id / description
      Added value: +"Id of a calculation, as upload_and_quote, quote_part or list_calculations return it."
  5. Changed1 schema field changed
    • changedInput schema / properties / include_analytics / description
      Previous value: -"Whether to include the `analytics` object (the full cost breakdown and audit detail, often over 100 kB). Omitted: included for the app and the REST API, left out (null) for an MCP agent — pass true to get it, or read the cost through the cost sheet (`GET /calculations/{calculation_id}/cost-sheet`; over MCP, `get_cost_breakdown`), which is compact. Pass false to leave it out anywhere."New value: +"Whether to include the `analytics` object (the full cost breakdown and audit detail, often over 100 kB). Omitted: included for the app and the REST API, left out (null) for an MCP agent — pass true to get it, or read the cost through the cost sheet (the `get_cost_breakdown` tool; over MCP, `get_cost_breakdown`), which is compact. Pass false to leave it out anywhere."
  6. Added

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the readOnlyHint, idempotentHint, and destructiveHint=false annotations, the description explains the calculation lifecycle, final versus non-final statuses, polling cadence, and the default MCP-specific analytics truncation. It also notes that the call is free, adding useful operational context.

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

Conciseness4/5

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

The purpose is front-loaded, followed by usage, lifecycle states, return content, and analytics omissions in a logical order. It is dense and long for one paragraph, but almost every clause carries operational information; the "Read-only and free" ending is minor redundancy rather than waste.

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?

There is no output schema, so the description must explain the return shape, and it does: status, part revision, costing environment, lot size, material, result, analytics, and what analytics_omitted means. For a read-only lookup tool with two parameters, this is complete enough for correct invocation and interpretation.

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?

Schema coverage is 100%, and the schema already documents both calculation_id and the detailed default behavior of include_analytics. The description repeats the include_analytics omission list and true/false behavior rather than adding new parameter meaning, so the baseline of 3 is appropriate.

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 opens with a specific verb and resource: "Read one calculation" and states that it returns status, inputs, and the costed result. It clearly distinguishes this tool from cost-explanation siblings by pointing to explain_cost, and from bulk analytics tools by naming the omitted sections.

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?

It says exactly when to use the tool: to follow a calculation started by upload_and_quote or quote_part until its status is final. It also gives the alternative for cost reasoning (explain_cost) and names the tools that cover the omitted bulk analytics, leaving little inference needed.

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.