Skip to main content
Glama

Last Price

get_receipt

Read-onlyIdempotent

Get the receipt for one of your workspace's priced calls, by its usage event id (the id list_usage_events returns and report_outcome takes): what was priced, by which function and agent, when, the amount, how it was paid, and the outcome if one was reported. Receipts are made only when you ask, never sent for every call. For CSV or a printable page, call GET /api/receipts/{id} with format=csv or format=html. Needs a Last Price credential with price compute or billing read scope. Needs a claimed workspace: a sandbox key from self-registration is refused (403) until a person claims the workspace.

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": {
      "usage_event_id": "<usage_event_id>"
    },
    "name": "get_receipt"
  }
}

Input Schema

NameRequiredDescriptionDefault
usage_event_idYesThe priced call's usage event id, as list_usage_events returns it.

Output Schema

NameRequiredDescriptionDefault
issuerNo
objectNo
messageNoA short sentence about the result that an agent can show its person.
receiptNo
issued_atNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / properties / message / description
      Added value: +"A short sentence about the result that an agent can show its person."
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "properties": {
      +    "issued_at": {
      +      "type": "string"
      +    },
      +    "issuer": {
      +      "type": "object"
      +    },
      +    "message": {
      +      "type": "string"
      +    },
      +    "object": {
      +      "enum": [
      +        "receipt"
      +      ],
      +      "type": "string"
      +    },
      +    "receipt": {
      +      "properties": {
      +        "amount": {
      +          "type": "number"
      +        },
      +        "currency": {
      +          "type": "string"
      +        },
      +        "payment": {
      +          "type": "string"
      +        },
      +        "usage_event_id": {
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    }
      +  },
      +  "type": "object"
      +}
  3. Added

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the bar is lower, but the description still adds real behavior: receipts are generated on demand rather than continuously, the credential needs price compute or billing read scope, and a self-registered sandbox key is refused with 403 until the workspace is claimed. That last point is exactly the kind of failure mode an agent cannot infer from structured fields.

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?

Front-loaded with purpose, then key semantics, then the REST alternative, then prerequisites — a logical order with no filler sentences. It runs slightly long because it enumerates return fields ('what was priced, by which function and agent, when, the amount, how it was paid...') that an output schema already covers.

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 one-parameter read tool with full schema coverage, annotations, and an output schema, this covers everything an agent needs: how to obtain the id, what comes back, an alternative for other formats, and both auth/workspace preconditions including the 403 case.

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% and the single parameter is already documented, so baseline is high; the description still adds meaning by identifying the id as the same one returned by list_usage_events and accepted by report_outcome, which clarifies provenance and reuse beyond the schema's own wording.

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?

States a specific verb and resource ('Get the receipt for one of your workspace's priced calls') and pins the exact lookup key, distinguishing it from list-style siblings. It also cross-references the tools that produce/consume the same id (list_usage_events, report_outcome), so an agent can place it in a workflow 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 Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit when-to-use (a single priced call identified by usage event id) and an explicit alternative for other needs: 'For CSV or a printable page, call GET /api/receipts/{id} with format=csv or format=html.' It also states the two prerequisites (scope and claimed workspace) that otherwise cause silent failures.

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