Skip to main content
Glama

Pre-authorize future subscription periods (Base)

shop.subscription.preauthorize

Store 1..12 pre-signed USDC authorizations (EIP-3009 TransferWithAuthorization, signed with viem signTypedData) for the FUTURE periods of a Base subscription you pay for, so the platform pulls each period when it starts. Each authorization is for one period: from = the wallet that paid the subscription, to = the merchant payout wallet, value = the plan price in micro-USDC (when the platform fee is on, value = price - fee plus a second fee_authorization to the fee wallet for the fee; without it the fee is invoiced to the merchant), validAfter = the unix start of the period, validBefore 1 h to 72 h after it, a fresh nonce. The whole call is refused (422, nothing stored) if any item does not match. Nothing is debited early; cancel with shop.subscription.cancel (stored authorizations are never executed after it) or on-chain with cancelAuthorization(authorizer, nonce, signature) on the USDC contract. Status active or past_due, Base only; another identity's subscription is 404.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
authorizationsYes
subscription_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
pull_modeYes
renewal_keyNo
subscription_idYes
preauthorized_periodsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / properties / renewal_key
      Added value: +{
      +  "type": "string"
      +}
  2. Added

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only establish that this is a non-read-only, non-destructive write; the description adds the real behavioral burden: atomic all-or-nothing storage ('The whole call is refused (422, nothing stored) if any item does not match'), no early debit, fee-routing logic, validity windows, and post-cancel semantics. This is exactly the context annotations cannot carry.

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?

It is front-loaded with the core action and every clause carries load-bearing detail (fee path, validity bounds, atomic refusal, cancel paths). It is a dense, single-block paragraph for a genuinely complex financial operation, so the length is justified, though slightly heavy to scan.

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?

An output schema exists, so return format need not be described, and the description covers the remaining essentials: preconditions (status, Base), error behavior (422 atomic refusal, 404 for another identity), and cancellation semantics. Complete for a tool of this complexity.

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 description coverage is 0%, so the description must compensate and it does: it defines each authorization field (from = paying wallet, to = merchant payout wallet, value = micro-USDC with fee handling, validAfter = unix period start, validBefore 1h-72h window, fresh nonce) and the count/period semantics of the array. This meaningfully exceeds 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 states a precise verb and resource ('Store 1..12 pre-signed USDC authorizations ... for the FUTURE periods of a Base subscription') and immediately explains the effect ('so the platform pulls each period when it starts'). It also names the sibling used to undo it (shop.subscription.cancel), letting an agent distinguish it from cancel/get without opening a 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?

It gives concrete applicability constraints ('Status active or past_due, Base only; another identity's subscription is 404') and routes the agent to alternatives ('cancel with shop.subscription.cancel ... or on-chain with cancelAuthorization'). What it lacks is an explicit contrast with the other subscription siblings (confirm_pull, get), so it is clear context rather than full when/when-not 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.