Skip to main content
Glama

add_payment_to_cart

Assign a saved payment method (credit or campus card) to a cart by providing cart ID, payment type, and payment ID. Optionally set amount in cents for partial payment.

Instructions

attach a saved payment method to a cart.

Args: cart_id: The cart ID payment_type: Grubhub payment type, such as CREDIT_CARD or CAMPUS_CARD payment_id: Payment method ID amount_cents: Optional amount in cents; omit to cover remaining balance

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cart_idYes
payment_typeYes
payment_idYes
amount_centsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

With no annotations provided, the description must fully disclose behavioral traits. It indicates mutation ('attach') but does not explain what happens on failure, side effects, or required state (e.g., cart must exist, payment method must be saved). This is insufficient for a mutation tool with no annotation support.

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 extremely concise: a one-sentence summary followed by a clean parameter list. Every sentence and element serves a purpose, with no redundancy or filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 4 parameters, no annotations, and an output schema (not described), the description covers parameters well but lacks usage guidelines and behavioral context. It does not mention prerequisites or state changes, making it adequate but not fully complete for an AI agent.

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?

Despite 0% schema coverage, the description explains all four parameters with meaningful context. It provides example values for payment_type and clarifies that amount_cents is optional and defaults to covering the remaining balance. This adds significant value beyond the bare schema.

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 uses the specific verb 'attach' and clearly identifies the resource as 'a saved payment method to a cart'. It provides examples of payment types (CREDIT_CARD, CAMPUS_CARD), distinguishing from sibling 'add_campus_card_payment' which likely handles a specific payment type.

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?

The description implies usage for attaching a saved payment method to a cart, but does not explicitly state when to use it versus alternatives like 'add_campus_card_payment', nor does it provide exclusion criteria or prerequisites.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sawyershoemaker/grubhub-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server