Skip to main content
Glama

request_delegation

Start the human delegation (approval) flow needed for checkout/payment. PREFERRED: pass the buyer's email — the gateway emails them a 6-digit code and returns a device_code; ask the user for the code and call submit_delegation_otp. This keeps approval fully in-chat (no link) and you never see the code, so you cannot approve on their behalf. If you omit email, it falls back to a browser approval link (device flow) which the user must open; then poll check_delegation. You can never approve a delegation yourself.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
emailNoBuyer's email. When provided, a one-time approval code is emailed to them and approval happens in-chat via submit_delegation_otp (recommended).
scopesNoScopes to request (defaults to all four scopes)
site_idYesSite ID requiring delegation
marketing_opt_inNoSet true ONLY if the buyer explicitly agreed to receive marketing/deals emails (e.g. ticked the opt-in box). Subscribes their email to the consumer mailing list.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
statusNo
deliveryNo
user_codeNo
approvalUrlNo
device_codeNo
delegation_tokenNo

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A5/5.0
Behavior5/5

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

Discloses both flows, explains that passing email results in a code emailed to the buyer (which the AI never sees), and that omitting email falls back to a browser link. Annotations indicate non-read-only and non-destructive, which aligns with the description. No contradiction.

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?

Concise single paragraph that starts with the core purpose, then presents the recommended flow, then the alternative, ending with a critical constraint. Every sentence earns its place.

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?

Given the complexity of the delegation flow (two methods), annotations, and presence of an output schema, the description covers all necessary behavioral context, including the two paths, privacy aspect, and polling requirement.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, but the description adds significant value: explains the purpose of `email` (preferred flow), default for `scopes`, and strict condition for `marketing_opt_in` (only if buyer explicitly agreed).

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 clearly states the tool starts the human delegation (approval) flow for checkout/payment, distinguishing between the email-based flow and the device flow fallback. It also differentiates from sibling tools like submit_delegation_otp and check_delegation.

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?

Explicitly recommends passing email for in-chat approval via submit_delegation_otp, and describes the alternative device flow with polling check_delegation. States 'You can never approve a delegation yourself,' which is crucial guidance.

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.

TDQS

A4.2/5.0
Disambiguation5/5

Each tool targets a distinct action or resource, with detailed descriptions that clearly differentiate cart management, checkout flow, payment steps, delegation, orders, and product operations. Potential overlaps like get_active_cart vs. get_cart are resolved by their specific use cases.

Naming Consistency5/5

All tools use a consistent verb_noun_snake_case pattern (e.g., add_to_cart, set_shipping_address). There are no mixing of conventions like camelCase or inconsistent verb styles.

Tool Count4/5

26 tools is on the higher side but appropriate for a comprehensive e-commerce server covering product discovery, cart management, checkout, payment, orders, and reviews. Could potentially be streamlined slightly, but still reasonable.

Completeness5/5

The tool set covers the full e-commerce lifecycle: site listing, product search/compare/reviews, cart CRUD, coupon application, shipping, checkout, payment with delegation and OTP, order retrieval, and back-in-stock alerts. No obvious gaps for typical buyer workflows.