Skip to main content
Glama

AgentPay — trust routing + spend caps for x402 agents

sbtc_peg

The sBTC peg as an agent-readable feed — the one dataset only Stacks state can answer. Live sBTC supply (and share of the peg cap), peg-in and peg-out flows for 24h and 7d (sats, counts, unique recipients, net), in-flight bridge requests (pending and accepted deposits with the oldest pending age, pending withdrawals, 24h failures), the last peg events with Bitcoin txids, the signer set and signature threshold, and the rolling withdrawal cap with its current headroom. Read from the sBTC token and registry contracts and the bridge API (Emily); a source that fails degrades to null plus a note. Signer liveness is not public and is reported as null — the pending ages and withdrawal headroom are the proxies.

Use when: An agent wants the state of the sBTC peg before moving BTC onto or off Stacks, sizing against the withdrawal cap, or reading Bitcoin-capital flow into Stacks as a signal. Not for: you need the sBTC price or market data — token_price / token_market_data are free; you need a swap quote — pre_trade_check prices Bitflow. This call settles $0.01 on-chain. Returns: asset, contract, network, as_of{time, stacks_height, bitcoin_height}, supply{sats, btc, peg_cap_sats, pct_of_cap}, flows{24h, 7d}{peg_in_sats, peg_in_count, peg_in_unique_recipients, peg_out_sats, peg_out_count, net_sats, from_stacks_height, complete}, in_flight{deposits_pending, deposits_accepted, oldest_pending_deposit_age_hours, withdrawals_pending, withdrawals_accepted, deposits_failed_24h, withdrawals_failed_24h}, last_events[{type, sats, stacks_height, bitcoin_txid, recipient|sender}], signers{count, signature_threshold, aggregate_pubkey, limits{peg_cap_sats, per_deposit_minimum_sats, per_withdrawal_cap_sats, rolling_withdrawal_cap_sats, rolling_window_blocks, available_to_withdraw_sats, withdrawal_headroom_pct, throttle_mode}, liveness, note}, read, sources, notes[] Example response: {"asset":"sBTC","contract":"SM3VDXK3WZZSA84XXFKAFAF15NNZX32CTSG82JFQ4.sbtc-token","network":"stacks-mainnet","as_of":{"time":"2026-11-05T13:16:06+00:00","stacks_height":9418770,"bitcoin_height":974675},"supply":{"sats":248402294199,"btc":2484.02294199,"peg_cap_sats":2100000000000000,"pct_of_cap":0.0118},"flows":{"24h":{"peg_in_sats":349000521,"peg_in_count":870,"peg_in_unique_recipients":11,"peg_out_sats":172451573,"peg_out_count":15,"net_sats":176548948,"from_stacks_height":9411041,"complete":true},"7d":{"peg_in_sats":1093108934,"peg_in_count":5324,"peg_in_unique_recipients":39,"peg_out_sats":790710098,"peg_out_count":110,"net_sats":302398836,"from_stacks_height":9359229,"complete":true}},"in_flight":{"deposits_pending":10,"deposits_accepted":16,"oldest_pending_deposit_age_hours":50,"withdrawals_pending":0,"withdrawals_accepted":3,"deposits_failed_24h":0,"withdrawals_failed_24h":1},"last_events":[{"type":"peg_in","sats":85000,"stacks_height":9418744,"bitcoin_txid":"62acd3f2cee3b1bb0ba547de0d1fc32253bf69e79b63cf19f9e055dc97f741db","recipient":"SP000000000000000000002Q6VF78.pox-5"}],"signers":{"count":11,"signature_threshold":8,"aggregate_pubkey":"0x02d99ad0f0111a7e9aaa2ed22940efec98db0ece9b9475e61e1eec65a6e7f3af69","limits":{"peg_cap_sats":2100000000000000,"per_deposit_minimum_sats":10000,"per_withdrawal_cap_sats":5100000000,"rolling_withdrawal_cap_sats":15100000000,"rolling_window_blocks":150,"available_to_withdraw_sats":14786411900,"withdrawal_headroom_pct":97.9,"throttle_mode":null},"liveness":null,"note":"signer liveness is not published; the observable proxies are pending/accepted deposit ages and the rolling withdrawal headroom"},"read":"sBTC supply 2484.02 BTC; 24h net +1.7655 BTC (870 in / 15 out); 7d net +3.0240 BTC (5324 in / 110 out); 10 deposits pending (oldest 50.0h); 8-of-11 signers; withdrawal headroom 97.9%","notes":[]}

Price: $0.01 USDC per call (x402 over MCP: an unpaid call returns PaymentRequired; pay via _meta x402/payment)

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "sbtc_peg"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior3/5

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

Discloses several behaviors annotations don't cover: data provenance (token/registry contracts plus Emily), graceful degradation to null plus a note on source failure, and that signer liveness is never public and is proxied by pending ages and withdrawal headroom. It also resolves the otherwise confusing readOnlyHint=false by explaining the $0.01 on-chain x402 settlement and PaymentRequired response. However, the description repeatedly frames itself as a 'read' feed while the annotation says readOnlyHint=false; the settlement sentence explains the discrepancy, so this is disclosed rather than contradictory, but it does mean the safety profile rests on prose rather than annotations.

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?

Front-loaded with the resource and scope, then cleanly sectioned into Use when / Not for / Returns / example / price. The main waste is the full example JSON, which largely restates the enumerated 'Returns' fields and makes the definition much longer than an agent strictly needs; without an output schema some return detail is warranted, but the duplication is not.

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

Completeness5/5

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

There is no output schema, so the description carries the full burden of explaining returns, and it does so exhaustively down to nested field names and an example payload, plus source attribution, degraded-mode behavior, freshness markers (stacks_height, bitcoin_height), and pricing/payment mechanics. An agent has everything needed to decide, call, and interpret the response.

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

Parameters4/5

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

The tool takes zero parameters, so there is no parameter semantics to add and the baseline applies. The extensive field-by-field return documentation is useful but belongs to contextual completeness, not parameter semantics.

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?

Names a specific resource (the sBTC peg) and enumerates exactly what the feed covers: supply and share of cap, 24h/7d flows, in-flight bridge requests, last events, signer set and threshold, rolling withdrawal cap headroom. It also explicitly carves itself away from siblings by naming token_price, token_market_data, and pre_trade_check as the tools for price/quote needs.

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?

Has an explicit 'Use when:' block giving three concrete trigger conditions (moving BTC onto/off Stacks, sizing against the withdrawal cap, reading Bitcoin-capital flow as a signal) and a 'Not for:' block that redirects to the correct alternatives for price, market data, and swap quotes.

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.