Skip to main content
Glama

Explain a calculation step by step

explain
Read-onlyIdempotent

Runs any operation and returns the receipt plus human-readable derivation steps. Set op, then pass the fields that operation's own tool takes. Use it when the user asks how an answer was reached.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
opYesOperation to explain. holiday_lookup is the holidays tool; the others share their tool's name.
toNoISO date YYYY-MM-DD, or "today" (resolved in tz)
tzNoIANA timezone that defines "today" (e.g. Africa/Kampala). Default UTC.UTC
netNoNet-N payment terms in calendar days (Net 30 = 30).
dateNoISO date YYYY-MM-DD, or "today" (resolved in tz)
daysNoDay count for add_days, subtract_days and business_days add mode.
fromNoISO date YYYY-MM-DD, or "today" (resolved in tz)
rollNoRoll a weekend or holiday due date forward to the next business day. Default false.
yearNoCalendar year for holiday_lookup, e.g. 2027
eventNoEvent slug (e.g. christmas). Exactly one of event/weekday.
weekdayNo0 = Sunday .. 6 = Saturday. Exactly one of event/weekday.
workweekNoWorking week. Default mon-fri (Sat+Sun weekend).
invoiceDateNoISO date YYYY-MM-DD, or "today" (resolved in tz)
jurisdictionNoHoliday jurisdiction id: US, GB, GB-SCT, GB-NIR, IE, FR, CA, AU, UG (alias UK for GB). No default: omit for no holiday calendar.
customHolidaysNoCustom organizational holiday calendar as ISO dates (mutually exclusive with jurisdiction)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
stepsYesHuman-readable derivation, identical to the REST /api/v1/explain output
receiptYesAuditable receipt for the operation

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed16 schema fields changed
    • addedInput schema / properties / days / description
      Added value: +"Day count for add_days, subtract_days and business_days add mode."
    • addedInput schema / properties / event / description
      Added value: +"Event slug (e.g. christmas). Exactly one of event/weekday."
    • removedInput schema / properties / from / $ref
      Removed value: -"#/properties/date"
    • addedInput schema / properties / from / pattern
      Added value: +"^(\\d{4}-\\d{2}-\\d{2}|today)$"
    • addedInput schema / properties / from / type
      Added value: +"string"
    • removedInput schema / properties / invoiceDate / $ref
      Removed value: -"#/properties/date"
    • addedInput schema / properties / invoiceDate / pattern
      Added value: +"^(\\d{4}-\\d{2}-\\d{2}|today)$"
    • addedInput schema / properties / invoiceDate / type
      Added value: +"string"
    • addedInput schema / properties / net / description
      Added value: +"Net-N payment terms in calendar days (Net 30 = 30)."
    • addedInput schema / properties / op / description
      Added value: +"Operation to explain. holiday_lookup is the holidays tool; the others share their tool's name."
    • addedInput schema / properties / roll / description
      Added value: +"Roll a weekend or holiday due date forward to the next business day. Default false."
    • removedInput schema / properties / to / $ref
      Removed value: -"#/properties/date"
    • addedInput schema / properties / to / pattern
      Added value: +"^(\\d{4}-\\d{2}-\\d{2}|today)$"
    • addedInput schema / properties / to / type
      Added value: +"string"
    • addedInput schema / properties / weekday / description
      Added value: +"0 = Sunday .. 6 = Saturday. Exactly one of event/weekday."
    • addedInput schema / properties / year / description
      Added value: +"Calendar year for holiday_lookup, e.g. 2027"
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly=true, idempotent=true, and non-destructive. The description adds useful behavioral context beyond that: the tool delegates to another operation, the op parameter selects which one, and the result is a receipt plus derivation steps. No contradiction with annotations.

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?

Three compact sentences front-load the core function and output, then give the invocation pattern and intended use case. Every sentence earns its place with no redundant wording.

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?

For a 15-parameter meta-tool with an output schema and safety annotations, the description is sufficient: it defines the routing via op and points to the operation-specific tools for parameter details. It doesn't enumerate each op's parameter mapping, but the sibling tools and schema descriptions fill that gap.

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 covers 100% of parameters, so baseline is 3. The description adds the crucial meta-instruction that op selects the operation and the remaining fields should be the ones that operation's own tool takes, which is not obvious from the flat schema. This helps the agent identify the relevant parameter subset.

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 concrete verb and deliverable: it runs an operation and returns a receipt plus human-readable derivation steps. It also distinguishes itself from the computational sibling tools by stating it is for explaining how an answer was reached, not merely computing it.

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?

Provides explicit guidance: 'Use it when the user asks how an answer was reached.' It also explains the invocation pattern (set op, pass the target operation's fields). It doesn't explicitly say when not to use it or name alternative tools, but the delegation pattern implies a direct sibling-tool alternative.

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