Skip to main content
Glama

create_subscription_portal_link

Create a short-lived Stripe customer portal URL for a subscriber to update their card (flow payment_method_update, default) or see invoices and card (overview). Mint it when the customer asks; don't store it. With user_id/email, uses their most recent subscription. Costs 1 CRD (platform credit) per call, charged even when the call is then rejected (a 429 RATE_LIMITED costs nothing). Error results include request_id; quote it to support.

Input Schema

NameRequiredDescriptionDefault
flowNo
emailNoCustomer email (alternative to subscription_id)
api_keyNoCred API key (optional if set via the x-api-key header)
user_idNoExternal user ID (alternative to subscription_id)
project_idNoCred project ID (optional; the API key already identifies the project)
return_urlNoURL to return to from the portal; must be https on a Cred host or a domain listed under Dashboard → Payments → Allowed redirect domains, else 400 REDIRECT_NOT_ALLOWED
x402_paymentNoBase64 x402 PaymentPayload, only when a previous call failed with an x402 PaymentRequired because the account is out of CRD
subscription_idNoCred subscription ID or Stripe sub_… ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full behavioral burden and does so well: it discloses the 1 CRD per-call cost, that the charge applies even to rejected calls, the exception for 429 RATE_LIMITED, the ephemeral nature of the link, and that error results include a request_id to quote to support. This is exactly the cost/rate-limit/error context an agent cannot infer from structured fields.

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 action and resource, then flows, usage, identity, cost, and errors in priority order. Every sentence carries information, though the density of the cost/payment aside makes it slightly harder to scan than a formatted definition.

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?

For an 8-parameter tool with zero required parameters and no output schema, the description covers cost, error handling, flow semantics, and subscriber identification. It leaves open what happens if no identifier (subscription_id, user_id, or email) is supplied, and never states that the return value is the portal URL itself.

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?

Schema coverage is already 88%, so the baseline is 3, but the description adds real meaning beyond it: it documents the default value of the 'flow' enum (payment_method_update) and explains that user_id/email resolve to the customer's most recent subscription rather than requiring subscription_id.

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 — 'Create a short-lived Stripe customer portal URL' — and immediately names the two supported flows with their outcomes, so an agent can distinguish this from siblings like list_subscriptions or cancel_subscription without opening the 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 explicit when-to-use ('Mint it when the customer asks') plus an exclusion ('don't store it') and explains identity resolution ('With user_id/email, uses their most recent subscription'). It does not name a sibling tool to use instead for other subscription operations, which is the one gap.

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