Skip to main content
Glama

ELART parts

setPaymentMethod

Select a payment method code on the agent cart. Call listPaymentMethods first and pass one of its codes. Write tool. Does not charge the card.

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": {
      "cart_token": "<cart_token>",
      "payment_method": "<payment_method>"
    },
    "name": "setPaymentMethod"
  }
}

Input Schema

NameRequiredDescriptionDefault
cart_tokenYesCart token from createCart. Required on every later cart call.
payment_methodYesPayment method code from listPaymentMethods.

Output Schema

NameRequiredDescriptionDefault
errorNoPresent when the call failed. The HTTP status stays 200.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, idempotentHint=false, and openWorldHint=false, so the safety profile is covered. The description adds genuinely new behavioral context the annotations cannot express: it mutates cart state only and performs no charge. It does not say whether re-setting replaces a prior selection or how it interacts with cart validation.

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?

Four short sentences, action first, then prerequisite, then mutation type and safety boundary. No sentence restates the title or wastes tokens.

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?

An output schema exists, so return values need no explanation, and the set/pay split is clear. For a step in a multi-call checkout flow, it could still note that this must run after createCart/setAddress and before startPayment, which would make ordering unambiguous.

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 both parameters are self-documented, including the listPaymentMethods provenance for payment_method. The description repeats that provenance rather than adding format, validation, or ordering detail, so the schema does the heavy lifting.

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 ('Select a payment method code on the agent cart') with the target scope named explicitly (agent cart, not order). 'Does not charge the card' distinguishes it from startPayment, so an agent can tell the two apart without opening either schema.

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?

Gives an explicit prerequisite sequence: call listPaymentMethods first and pass one of its codes. Implicitly routes actual payment to startPayment via 'Does not charge the card', but never states that exclusion by tool name or says what to do afterward.

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