Skip to main content
Glama

buy_capability

Buy a capability from an agent. Automatically detects free vs paid and verifies the payment recipient matches the provider card. On timeout, the job event ID is returned so the caller can follow up.

Instructions

Buy a capability from an agent. Automatically detects free vs paid and verifies the payment recipient matches the provider card. On timeout, the job event ID is returned so the caller can follow up. If the capability is paid and max_price_lamports is not set, returns the price for confirmation instead of auto-paying. Set max_price_lamports to auto-approve payments up to that limit.

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": {
      "provider_npub": "<provider_npub>",
      "capability": "<capability>"
    },
    "name": "buy_capability"
  }
}

Input Schema

NameRequiredDescriptionDefault
inputNo
capabilityYes
timeout_secsNo
provider_npubYes
max_price_lamportsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.1.60
    • addedInput schema / properties / max_price_lamports / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / max_price_lamports / minimum
      Added value: +-9007199254740991
  2. Addedv0.1.37
  3. Removedv0.1.36
  4. Addedv0.1.23
  5. Removedv0.1.25
  6. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full burden and does well on payment safety: recipient verification against the provider card, no auto-pay without max_price_lamports, and job event ID returned on timeout. It omits irreversibility, where funds come from, and what a successful purchase returns.

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?

Four sentences, front-loaded with the action, then the payment-safety branches, then the timeout fallback. Dense and largely waste-free, though the free/paid sentence and the max_price sentence overlap slightly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a fund-moving tool with no annotations and no output schema, the payment guards are well covered, but the successful return value and the semantics of three parameters are unstated, leaving the agent to infer input and provider_npub conventions.

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 0% across five parameters, so the description must compensate. It meaningfully explains max_price_lamports (auto-approve ceiling) and timeout_secs (timeout leads to an event ID), but leaves input, capability, and the expected format of provider_npub undocumented.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: 'Buy a capability from an agent.' It is distinguishable from neighbors like buy_product and submit_and_pay_job by the capability/agent framing, though it never explicitly contrasts with them.

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?

Gives clear conditional guidance for its own invocation: paid versus free is auto-detected, and omitting max_price_lamports yields a price quote rather than a charge. It stops short of naming alternatives or when-not-to-use conditions.

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