Skip to main content
Glama

get_token

Exchange a paid create_topup charge_id for an lnpx_ spend token, enabling pay-per-request access to Claude and GPT models; repeat calls return the same token.

Instructions

After paying a create_topup invoice, exchange its charge_id for the lnpx_ spend token. Safe to call again: it returns the same token.

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": {
      "charge_id": "<charge_id>"
    },
    "name": "get_token"
  }
}

Input Schema

NameRequiredDescriptionDefault
charge_idYesThe charge_id returned by create_topup.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the burden and does well: it discloses idempotency (same token returned on repeat calls), the precondition (invoice must be paid), and the nature of the returned value. It omits auth requirements and error behavior for unpaid or unknown charge_ids.

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?

Two short sentences, front-loaded with purpose and followed by the idempotency guarantee. No filler or redundant restatement of the tool name.

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 a one-parameter tool with no output schema, the description covers the precondition, the return value, and repeat-call safety. Only failure modes and any auth expectations are left unstated, which is a minor gap.

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 says charge_id comes from create_topup; the description only adds the 'after paying' qualifier. Baseline 3 is appropriate since the schema does the heavy lifting for the single parameter.

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 concrete verb and resource: exchange a charge_id for the lnpx_ spend token. It also names the sibling that produces the input (create_topup), so an agent can place it in the workflow without opening any 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?

The trigger condition is explicit — call it after paying a create_topup invoice — and the repeat-call behavior is stated. It stops short of saying what to do if the invoice is unpaid or the charge_id is invalid, but the primary when-to-use is unambiguous.

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

Deploy Server

Other Tools