Skip to main content
Glama

Buy a pack with store credit

buy_pack_with_store_credit
Destructive

Buy a shop pack with this account's store credit (see shop_packs' store_credit_cents), exactly like the shop's store-credit purchase (POST /v1/iap/store-credit). Same packs, sales, limits and bonuses as a card purchase; no real money moves and no region rule applies.

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": {
      "sku": "<sku>"
    },
    "name": "buy_pack_with_store_credit"
  }
}

Input Schema

NameRequiredDescriptionDefault
skuYesthe pack's sku, from shop_packs
tokenNothe token your login returned; pass it when a call answered not_logged_in after you logged in
contextNooptional short note on why you are buying, kept with the purchase
sale_idNoa limited-time sale id from shop_packs' sales, to buy at the sale price
sectionsNooptional list of the Snapshot's top-level keys to return with the purchase, overriding snapshot; now is always included
snapshotNohow much of the Snapshot to return after the purchase: none (default) no snapshot; changes only what the purchase changed (diamonds, items), in a changes field; city only now, config_hash, map_size, player, city, marches, rallies and notices; full the whole Snapshot

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / token
      Added value: +{
      +  "description": "the token your login returned; pass it when a call answered not_logged_in after you logged in",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare this as destructive, non-idempotent, and closed-world, so the description need not restate those. It adds useful context beyond annotations: no real money moves, no region rule applies, and the purchase behaves like a card purchase for limits and bonuses. It does not describe failure behavior such as insufficient credit.

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?

The description is front-loaded with the core action and remains compact. There is slight redundancy between 'exactly like the shop's store-credit purchase' and 'Same packs, sales, limits and bonuses as a card purchase,' but nothing is wasted.

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?

An output schema exists and annotations carry the safety profile, so the description does not need to explain return values or mutation risk. It covers the key behavioral distinctions in reasonable depth, though it could mention the insufficient-credit prerequisite more explicitly.

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 description coverage is 100%, so the input schema already documents all six parameters in detail. The description mainly cross-references shop_packs for the sku, store credit balance, and sale_id, which is useful but largely duplicates what the schema already says.

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?

The description states a specific verb and resource: buy a shop pack with store credit. It distinguishes this from the sibling buy_pack by specifying the payment method (store credit versus card) and references the shop_packs tool for the balance source.

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?

It clearly establishes the context: use this for store-credit purchases, with the same packs, sales, limits and bonuses as a card purchase. It does not explicitly say when to choose buy_pack instead or state the prerequisite of sufficient store credit, so it stops short of a full routing rule.

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