Skip to main content
Glama

Top up an existing answering line

buy_line_pack

Return a checkout link to top up one existing answering line with a prepaid pack. Use only after the owner asks to buy and approves the price from get_answering_line_offer; get_answering_line supplies line_id and billing_mode. Choose line_minutes, line_outcomes or legacy calls to match that line. For a new line use set_up_answering_line; other products use their own product endpoint. The owner pays on Stripe; this tool never sees a card or charges it directly. Needs billing:checkout and ownership of the line; rate limited per account. Returns checkout_url, product, pack, price_cents, units, unit and payment instructions. Nothing renews.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "product": "<product>",
      "pack": "<pack>",
      "line_id": "<line_id>"
    },
    "name": "buy_line_pack"
  }
}

Input Schema

NameRequiredDescriptionDefault
packYesPack id from get_answering_line_offer; legacy calls use calls10 or calls50.
line_idYesAn existing line_id from get_answering_line owned by this account.
productYesMatch billing_mode: minutes → line_minutes, outcomes → line_outcomes, legacy calls → calls.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already flag a non-read-only, open-world, non-idempotent but non-destructive write. The description adds real context beyond that: the owner pays on Stripe and the tool never sees the card, it requires billing:checkout and line ownership, it is rate limited per account, nothing renews, and it returns a link rather than performing the charge. Minor gap: it doesn't say whether re-calling regenerates a link or whether prior links expire.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose is front-loaded, then preconditions, parameter choice, alternative routing, payment behavior, permissions, and return fields in tight order. Only 'other products use their own product endpoint' is close to filler, but it still serves routing.

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?

With no output schema, the description usefully enumerates the returned fields (checkout_url, product, pack, price_cents, units, unit, payment instructions) and covers permissions and billing behavior for a 3-param checkout generator. What remains unstated is re-invocation behavior and link expiry, the main thing an agent might need to know before retrying.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the schema already spells out the billing_mode-to-product mapping and the legacy calls10/calls50 pack ids, so the description's 'Choose line_minutes, line_outcomes or legacy calls to match that line' largely restates it. It adds only the workflow pointer that pack comes from get_answering_line_offer, which is worth little above the 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?

States a specific verb and resource ('Return a checkout link to top up one existing answering line with a prepaid pack') and scopes it to prepaid packs on existing lines, which separates it cleanly from set_up_answering_line and the read siblings.

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 preconditions ('Use only after the owner asks to buy and approves the price from get_answering_line_offer'), names the tools that supply inputs (get_answering_line for line_id and billing_mode), and routes elsewhere for new lines or other products. When-to-use, prerequisites, and alternatives are all present.

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.