Skip to main content
Glama

create a plan or credits approval link

billing-approval-links_create

Create a payment approval link for a person to approve and pay for a plan or credit top-up when an automated Sync request is refused, so the organization can unblock it.

Instructions

Create a sync.so link where a person approves and pays for a plan or a credit top-up, because you cannot pay. It is for the session's organization unless you pass organizationId; when the refused request ran with a one-call organizationId, pass the same one so the payment unblocks that organization. Use it when a Sync refusal has nextAction.type upgrade_plan (pass plan: its requiredPlan) or buy_credits (pass credits: requiredCredits), or when the user asks to upgrade their plan or buy credits. Not for an unpaid invoice, a declined card or a payment to confirm (give the person nextAction.url instead), and not to read the current plan or balance (account_get-context, account_get-usage).

Effects: it creates no charge, subscription or payment and holds nothing. Each call returns a new link.

Give url to the person verbatim: they open it in a browser, review the plan or credits, price and organization, and approve and pay there. When expiresAt is set (a first paid plan), the page needs no sign-in and works until then, 15 minutes after the call: say so, give the link only to the person who should pay, and create a new one if it has expired. When expiresAt is null, they sign in first, only owners and admins of the organization can approve, and the link does not expire, so reuse it instead of creating another. After they say they have approved, account_get-context shows the new plan and account_get-usage the new credit balance; check them before retrying the refused request.

Send exactly one of plan or credits. Refusals: 409 already_on_plan (it already has that plan or a higher one, so nothing is due), approval_credits_unavailable (credits need a paid credit plan first) or billing_managed_by_sync (custom agreement: contact sync.); 400 approval_plan_unavailable (this organization cannot buy that plan); 402 account_on_hold.

Returns: id, url, expiresAt, organization, kind, change (subscribe, upgrade or top_up), plan or credits, amountCents with currency, interval for a plan, and currentPlan.

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": "billing-approval-links_create"
  }
}

Input Schema

NameRequiredDescriptionDefault
planNoPlan to subscribe or upgrade to: requiredPlan (or nextAction.requiredPlan) from the refusal, or the plan the user asked for. Credit-billed organizations buy hobby, starter, pro or team; others buy hobbyist, creator, growth or scale. Send plan or credits, not both.
creditsNoCredits to buy, 500 to 50,000: requiredCredits from the refusal (at least 500), or the amount the user asked for. Only organizations billed in credits can buy them. Send plan or credits, not both.
organizationIdNoRun only this call in another of the user’s Sync organizations, by id from organizations_list, when the user asks for it (for example “generate this in the Acme org”). The session keeps its organization; reads of the ids this call returns stay in this organization. Omit to use the session’s organization.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.3.35
    • changedOutput schema / anyOf
      Previous value: -[
      -  {
      -    "$schema": "https://json-schema.org/draft/2020-12/schema",
      -    "additionalProperties": false,
      -    "properties": {
      -      "amountCents": {
      -        "description": "Price in cents: the plan price per interval, or the credits’ one-time price.",
      -        "maximum": 9007199254740991,
      -        "minimum": -9007199254740991,
      -        "type": "integer"
      -      },
      -      "change": {
      -        "description": "subscribe: a first paid plan, paid at checkout. upgrade: charged to the card on file when approved. top_up: a one-time credit purchase.",
      -        "type": "string"
      -      },
      -      "credits": {
      -        "anyOf": [
      -          {
      -            "maximum": 9007199254740991,
      -            "minimum": -9007199254740991,
      -            "type": "integer"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "description": "Credits being bought; null for a plan."
      -      },
      -      "currency": {
      -        "description": "Currency of amountCents, such as usd.",
      -        "type": "string"
      -      },
      -      "currentPlan": {
      -        "additionalProperties": false,
      -        "description": "The organization’s plan before approval.",
      -        "properties": {
      -          "id": {
      -            "description": "Plan id.",
      -            "type": "string"
      -          },
      -          "name": {
      -            "description": "Plan name to show the person.",
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "id",
      -          "name"
      -        ],
      -        "type": "object"
      -      },
      -      "id": {
      -        "description": "Link id.",
      -        "type": "string"
      -      },
      -      "interval": {
      -        "description": "month or year for a plan; null for credits.",
      -        "type": [
      -          "string",
      -          "null"
      -        ]
      -      },
      -      "kind": {
      -        "description": "plan or credits.",
      -        "type": "string"
      -      },
      -      "organization": {
      -        "additionalProperties": false,
      -        "description": "The Sync organization this call ran in.",
      -        "properties": {
      -          "id": {
      -            "format": "uuid",
      -            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      -            "type": "string"
      -          },
      -          "name": {
      -            "type": [
      -              "string",
      -              "null"
      -            ]
      -          }
      -        },
      -        "required": [
      -          "id",
      -          "name"
      -        ],
      -        "type": "object"
      -      },
      -      "plan": {
      -        "anyOf": [
      -          {
      -            "additionalProperties": false,
      -            "properties": {
      -              "id": {
      -                "description": "Plan id.",
      -                "type": "string"
      -              },
      -              "name": {
      -                "description": "Plan name to show the person.",
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "id",
      -              "name"
      -            ],
      -            "type": "object"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "description": "The plan being approved; null for credits."
      -      },
      -      "url": {
      -        "description": "Page on sync.so to give the person, verbatim. They sign in, review and pay there; it does not expire.",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "id",
      -      "url",
      -      "kind",
      -      "change",
      -      "plan",
      -      "credits",
      -      "amountCents",
      -      "currency",
      -      "interval",
      -      "currentPlan"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "$schema": "https://json-schema.org/draft/2020-12/schema",
      -    "additionalProperties": false,
      -    "properties": {
      -      "error": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "code": {
      -            "type": "string"
      -          },
      -          "generationId": {
      -            "type": "string"
      -          },
      -          "importJobId": {
      -            "format": "uuid",
      -            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      -            "type": "string"
      -          },
      -          "importStatus": {
      -            "enum": [
      -              "queued",
      -              "downloading",
      -              "processing",
      -              "completed",
      -              "failed"
      -            ],
      -            "type": "string"
      -          },
      -          "message": {
      -            "type": "string"
      -          },
      -          "progress": {
      -            "maximum": 100,
      -            "minimum": 0,
      -            "type": "number"
      -          },
      -          "retryAfterMs": {
      -            "type": "number"
      -          },
      -          "retryable": {
      -            "type": "boolean"
      -          },
      -          "status": {
      -            "maximum": 9007199254740991,
      -            "minimum": -9007199254740991,
      -            "type": "integer"
      -          }
      -        },
      -        "required": [
      -          "message"
      -        ],
      -        "type": "object"
      -      }
      -    },
      -    "required": [
      -      "error"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "$schema": "https://json-schema.org/draft/2020-12/schema",
      +    "additionalProperties": false,
      +    "properties": {
      +      "amountCents": {
      +        "description": "Price in cents: the plan price per interval, or the credits’ one-time price.",
      +        "maximum": 9007199254740991,
      +        "minimum": -9007199254740991,
      +        "type": "integer"
      +      },
      +      "change": {
      +        "description": "subscribe: a first paid plan, paid at checkout. upgrade: charged to the card on file when approved. top_up: a one-time credit purchase.",
      +        "type": "string"
      +      },
      +      "credits": {
      +        "anyOf": [
      +          {
      +            "maximum": 9007199254740991,
      +            "minimum": -9007199254740991,
      +            "type": "integer"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "Credits being bought; null for a plan."
      +      },
      +      "currency": {
      +        "description": "Currency of amountCents, such as usd.",
      +        "type": "string"
      +      },
      +      "currentPlan": {
      +        "additionalProperties": false,
      +        "description": "The organization’s plan before approval.",
      +        "properties": {
      +          "id": {
      +            "description": "Plan id.",
      +            "type": "string"
      +          },
      +          "name": {
      +            "description": "Plan name to show the person.",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "id",
      +          "name"
      +        ],
      +        "type": "object"
      +      },
      +      "expiresAt": {
      +        "description": "When url stops working, 15 minutes after it was made: a first paid plan, paid without signing in. Null or absent for a link that needs sign-in and does not expire.",
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "id": {
      +        "description": "Link id.",
      +        "type": "string"
      +      },
      +      "interval": {
      +        "description": "month or year for a plan; null for credits.",
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "kind": {
      +        "description": "plan or credits.",
      +        "type": "string"
      +      },
      +      "organization": {
      +        "additionalProperties": false,
      +        "description": "The Sync organization this call ran in.",
      +        "properties": {
      +          "id": {
      +            "format": "uuid",
      +            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      +            "type": "string"
      +          },
      +          "name": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          }
      +        },
      +        "required": [
      +          "id",
      +          "name"
      +        ],
      +        "type": "object"
      +      },
      +      "plan": {
      +        "anyOf": [
      +          {
      +            "additionalProperties": false,
      +            "properties": {
      +              "id": {
      +                "description": "Plan id.",
      +                "type": "string"
      +              },
      +              "name": {
      +                "description": "Plan name to show the person.",
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "id",
      +              "name"
      +            ],
      +            "type": "object"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "The plan being approved; null for credits."
      +      },
      +      "url": {
      +        "description": "Page on sync.so to give the person, verbatim. They review and pay there, without signing in when expiresAt is set.",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "id",
      +      "url",
      +      "kind",
      +      "change",
      +      "plan",
      +      "credits",
      +      "amountCents",
      +      "currency",
      +      "interval",
      +      "currentPlan"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "$schema": "https://json-schema.org/draft/2020-12/schema",
      +    "additionalProperties": false,
      +    "properties": {
      +      "error": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "code": {
      +            "type": "string"
      +          },
      +          "generationId": {
      +            "type": "string"
      +          },
      +          "importJobId": {
      +            "format": "uuid",
      +            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      +            "type": "string"
      +          },
      +          "importStatus": {
      +            "enum": [
      +              "queued",
      +              "downloading",
      +              "processing",
      +              "completed",
      +              "failed"
      +            ],
      +            "type": "string"
      +          },
      +          "message": {
      +            "type": "string"
      +          },
      +          "progress": {
      +            "maximum": 100,
      +            "minimum": 0,
      +            "type": "number"
      +          },
      +          "retryAfterMs": {
      +            "type": "number"
      +          },
      +          "retryable": {
      +            "type": "boolean"
      +          },
      +          "status": {
      +            "maximum": 9007199254740991,
      +            "minimum": -9007199254740991,
      +            "type": "integer"
      +          }
      +        },
      +        "required": [
      +          "message"
      +        ],
      +        "type": "object"
      +      }
      +    },
      +    "required": [
      +      "error"
      +    ],
      +    "type": "object"
      +  }
      +]
  2. Addedv0.3.11

TDQS

A4.4/5.0
Behavior3/5

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

With annotations already declaring readOnlyHint=false, destructiveHint=false and idempotentHint=false, the description still adds substantial value: no charge, subscription or payment is created and nothing is held, each call mints a new link; when expiresAt is set the page is unauthenticated and valid 15 minutes, when null the person signs in and only owners/admins can approve and the link doesn't expire; plus a full refusal-code map (409 already_on_plan, 402 account_on_hold, billing_managed_by_sync) and a post-approval verification path. The gaps are minor (no rate limits or link revocation) but the disclosure is unusually complete for a non-destructive mutation, so a middle score would undersell it.

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 core verb and the routing rule, then organized into effects, expiry/gifting instructions, refusals and returns. It is long, and the returns paragraph duplicates the output schema, but nearly every remaining sentence carries decision-relevant information.

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?

For a three-parameter, zero-required mutation with an output schema, the description covers what is created, what is not created, expiry and sign-in behavior, who may approve, error semantics and the follow-up verification step. An agent can call it, hand the url to the right person, and verify the result without further context.

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 description coverage is 100%, so the baseline is 3, and the description goes beyond it: it explains that exactly one of plan or credits must be sent, that plan comes from requiredPlan on the refusal or the user's ask, and the non-obvious organizationId rule that a one-call override must be repeated to unblock that organization while the session keeps its own organization. It does not restate the credits range, which the schema already covers.

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 Sync.so approval/payment link) with the scope constraint (session's organization unless organizationId is passed), and explicitly names sibling tools (account_get-context, account_get-usage) for what it is not. An agent can distinguish it from the rest of the catalog without opening schemas.

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?

Gives explicit triggers (nextAction.type upgrade_plan or buy_credits, or the user asking to upgrade/buy credits), explicit exclusions (unpaid invoice, declined card, payment to confirm, reading plan or balance) with the alternative to use instead, and the rule to pass the same one-call organizationId the refused request used. Nothing is left to inference.

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