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.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "create_subscription_portal_link"
  }
}

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. Signed in with 1Profile and owning several projects, it picks one)
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. Changed1 schema field changed
    • changedInput schema / properties / project_id / description
      Previous value: -"Cred project ID (optional; the API key already identifies the project)"New value: +"Cred project ID (optional; the API key already identifies the project. Signed in with 1Profile and owning several projects, it picks one)"
  2. 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 burden and does so well: it discloses the price (1 CRD per call, charged even on rejection, free on 429 RATE_LIMITED), the ephemeral nature of the output, and that error results carry a request_id for support. That is exactly the side-effect and failure context an agent needs before a costly mutation-adjacent call.

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 verb and result, then layered with cost, identity resolution and error handling — nearly every clause earns its place. The semicolon-chained, telegraphic style ("Mint it when the customer asks") is dense but not padded.

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, zero-required tool with no output schema and no annotations, the description covers cost, failure modes, storage policy and identity resolution. Minor gaps remain: the actual lifetime of the link is only "short-lived" and the returned URL shape is never described, but the essentials for correct invocation are present.

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 schema does most of the work (return_url restrictions, api_key, x402_payment). The description still adds meaning the schema lacks: the flow enum's default value and the behavioral difference between the two modes, plus how user_id/email select the most recent subscription.

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?

"Create a short-lived Stripe customer portal URL for a subscriber" names a specific verb and resource, and immediately disambiguates the two supported flows (payment_method_update vs overview) with the default stated. An agent can distinguish this from sibling tools like create_checkout_session 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?

"Mint it when the customer asks; don't store it" gives a clear when-to-use rule and an explicit prohibition on persisting the result. It also clarifies the identity modes (user_id/email resolves to the most recent subscription), though it never names a concrete alternative tool for the cases where a portal link is the wrong choice.

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