Skip to main content
Glama

Create Payment Record

record_payment

Create a receipt or updated invoice from supplied payment details. Does not charge or verify payment. HTTP calls can return a temporary download link.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "document": {
        "to": {
          "name": "Client"
        },
        "from": {
          "name": "Acme"
        },
        "doc_type": "invoice"
      },
      "amount_paid": 100
    },
    "name": "record_payment"
  }
}

Input Schema

NameRequiredDescriptionDefault
documentYesStateless input invoice JSON payload.
paid_dateNoPayment date (YYYY-MM-DD).
amount_paidNoAmount paid toward balance.
payment_methodNoPayment method (Stripe, Apple Pay, Wire).
transaction_referenceNoTransaction reference ID.

Output Schema

NameRequiredDescriptionDefault
documentYesReceipt or updated invoice JSON.
downloadNoTemporary file link for HTTP tool calls.
pdf_base64YesBase64 vector PDF.
download_errorNoWhy a temporary download link could not be created. The embedded PDF is still available.
compile_time_msYesCompile time in ms.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedOutput schema / properties / download
      Added value: +{
      +  "description": "Temporary file link for HTTP tool calls.",
      +  "properties": {
      +    "expires_at": {
      +      "format": "date-time",
      +      "type": "string"
      +    },
      +    "expires_in_seconds": {
      +      "type": "integer"
      +    },
      +    "filename": {
      +      "type": "string"
      +    },
      +    "url": {
      +      "format": "uri",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "url",
      +    "filename",
      +    "expires_at",
      +    "expires_in_seconds"
      +  ],
      +  "type": "object"
      +}
    • addedOutput schema / properties / download_error
      Added value: +{
      +  "description": "Why a temporary download link could not be created. The embedded PDF is still available.",
      +  "type": "string"
      +}
  2. Changed9 schema fields changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "amount_paid": 100,
      +    "document": {
      +      "doc_type": "invoice",
      +      "from": {
      +        "name": "Acme"
      +      },
      +      "to": {
      +        "name": "Client"
      +      }
      +    }
      +  }
      +]
    • changedInput schema / properties / amount_paid / description
      Previous value: -"Amount paid; defaults to grand total (PAID IN FULL) or computes partial balance due."New value: +"Amount paid toward balance."
    • changedInput schema / properties / document / description
      Previous value: -"Stateless input invoice JSON payload to compute payment against (returns a new synthesized document without mutating server records)."New value: +"Stateless input invoice JSON payload."
    • changedInput schema / properties / paid_date / description
      Previous value: -"Date payment was received (YYYY-MM-DD)."New value: +"Payment date (YYYY-MM-DD)."
    • changedInput schema / properties / payment_method / description
      Previous value: -"Method of payment (e.g., Stripe, Apple Pay, Bank Wire)."New value: +"Payment method (Stripe, Apple Pay, Wire)."
    • changedInput schema / properties / transaction_reference / description
      Previous value: -"Transaction or checkout reference ID."New value: +"Transaction reference ID."
    • changedOutput schema / properties / compile_time_ms / description
      Previous value: -"Vector compilation latency in milliseconds."New value: +"Compile time in ms."
    • changedOutput schema / properties / document / description
      Previous value: -"Newly synthesized receipt or partial-payment invoice JSON."New value: +"Receipt or updated invoice JSON."
    • changedOutput schema / properties / pdf_base64 / description
      Previous value: -"Base64-encoded vector PDF."New value: +"Base64 vector PDF."
  3. First observed

TDQS

A3.8/5.0
Behavior4/5

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

The annotations already declare write behavior, non-idempotency, and non-destructiveness. The description adds important context beyond annotations: it does not charge or verify payment, and HTTP calls may return a temporary download link, which is useful behavioral information for an agent.

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?

The description is three short, front-loaded sentences that immediately state the action and then add two critical behavioral constraints. Every sentence earns its place with no filler.

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?

Given the rich schema, output schema, and annotations, the description provides enough context to invoke the tool safely: it clarifies non-charging behavior and temporary download links. The main gap is the absence of explicit routing guidance versus sibling document tools.

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%, so the input schema already documents all five parameters, including the nested document payload and payment fields. The description adds little parameter-specific meaning beyond the schema baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: creating a receipt or updated invoice from payment details. It distinguishes the action from charging or verifying payment, but does not explicitly differentiate it from siblings such as generate_document or preview_document.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

It implies use when a payment record/receipt/invoice update is needed and clarifies that it does not charge or verify payment. However, it gives no explicit guidance on when to prefer it over related siblings like generate_document, preview_document, or calculate_totals.

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.