MMetadata /docs
Docs/Tools/create_topup_link

create_topup_link

Get a secure payment link the account owner can use to add AI credits.

Destructive account

Deletes, archives, launches or moves budget. Do not give an agent this one without a human gate.

What it does

Get a secure payment link the account owner can use to add AI credits.

                    USAGE INSTRUCTIONS FOR LLM:
                    Returns a URL to a page where a human can pay with the card already on file or
                    enter a new one. You do NOT need to wait for something to fail first — ask for
                    the link the moment more credit is the obvious next step. Share the URL with the
                    account owner; you cannot pay on their behalf.

                    WHEN TO USE THIS TOOL:
                    - The balance is low or negative and the user wants to fix it now
                    - An audience or other work is about to cost more than the balance covers
                    - The user asks how to add credit, buy credits, or pay
                    - Any tool refused for lack of credit and you did not get a link with it

                    This tool keeps working when the balance is exhausted — being out of credit is
                    exactly when it is needed.

                    CALL THIS ONCE AND SHARE THE URL YOU GET. Each call issues a NEW link and
                    INVALIDATES any previous one for the account, because only one live payment
                    capability may exist at a time. So if you mint a second link after sharing the
                    first, the URL the account owner is holding stops working. Do not call it again
                    to "check" or "refresh" — re-read your earlier result instead.

                    AFTER SHARING IT: payment settles ASYNCHRONOUSLY. Poll `get_credit_balance`
                    every 20-30 seconds, not continuously, and resume work once the balance covers
                    what you need.

                    EXPECTED RESPONSE FORMAT:
                    {
                      "url": "https://agency-stage.metadata.io/payment/<token>",
                      "expires_at": "2026-08-11T18:58:00Z",
                      "max_amount_usd": 0,       // ceiling on this link; 0 means none
                      "account_id": "1234",
                      "balance_usd": -12.5       // the balance right now, for context
                    }

                    On failure returns {"error": "..."} — say that a link could not be created and
                    point the user at the Metadata app to add credit instead. Never invent a URL.

Arguments

Takes no arguments.

Request

curl
curl -s -X POST https://mcp-server.metadata.io/mcp \
  -H "Authorization: $METADATA_PAT" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "MCP-Protocol-Version: 2025-11-25" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"create_topup_link","arguments":{}}}'

Response

No recorded response. This tool can delete, archive, launch or move budget, so it is never executed to build these docs. The request above is still the exact shape to send. Nothing on this page is invented.

Other account tools:

All 160 tools · machine-readable index