Skip to main content
Glama

Get payment result

get_payment_result
Read-only

Read the result of a paid call, by its paymentId. Use it when pay_service answered {"status":"pending"} (the service was still working when the Router stopped waiting — a payment was attempted, the call keeps running and its outcome is not known yet), or to recover a result whose response you lost. Reading costs nothing and charges nothing. Every answer with a state carries payment.status. state: "Pending" — still running, call again in a few seconds. state: "Ready" — status is the service's HTTP status and body its response (bodyEncoding says whether it is parsed JSON, text, or base64). state: "Failed" — the call ended without a response; failureReason says why. That does not prove nothing was charged, so check deliveryStatus in list_payments before paying again. {"status":"not_available"} — nothing to return: results are kept for 24 hours for the account that paid, and only then. Do NOT call pay_service again to get a pending result: that does not return a new one. Requires your Nevermined API key on the Authorization header.

Input Schema

NameRequiredDescriptionDefault
paymentIdYesThe `paymentId` a pay_service result returned.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / paymentId / pattern
      Added value: +"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=true, and the description goes well beyond that: it says reading costs nothing, that results are retained 24 hours for the paying account only, that a Failed state does not prove nothing was charged, and that a Nevermined API key is required on the Authorization header. It also fully explains the state machine of return values and what to do on Pending.

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 the verb and resource, and the per-state explanation is organized rather than rambling. It is dense and long for a single-parameter read tool, though nearly every clause carries operational value.

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 describe return values — and it does: state values Pending/Ready/Failed, payment.status, body, bodyEncoding, failureReason, and the not_available case. Nothing an agent needs to call it and interpret the response is missing.

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 single paymentId parameter is already documented with format and pattern, so the schema does the heavy lifting. The description restates that the ID comes from a pay_service result but adds no new syntax or retrieval semantics for the parameter itself.

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 ('Read the result of a paid call, by its paymentId') and implicitly separates itself from pay_service and list_payments. An agent can tell immediately this is a result-retrieval tool, not a payment-initiation one.

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 triggers: use it when pay_service answered {"status":"pending"} or to recover a lost response. It also states a clear prohibition ('Do NOT call pay_service again to get a pending result') and routes to list_payments for deliveryStatus checks before re-paying.

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