Skip to main content
Glama
bjunjo

treasury-mcp

by bjunjo

analyze_psbt_security

Detect mempool sniping vulnerabilities in Bitcoin PSBTs by analyzing signature hash types and multisig configurations to prevent inscription theft during ordinals listings.

Instructions

Analyze a PSBT for ordinals inscription listing mempool sniping vulnerability.

Detects whether an ordinals listing PSBT is vulnerable to front-running in the mempool. A listing is VULNERABLE when it uses SIGHASH_SINGLE|ANYONECANPAY without a 2-of-2 multisig locking step — an attacker can redirect the inscription before confirmation. A listing is PROTECTED when the inscription is locked in a 2-of-2 P2WSH multisig and the marketplace co-signs with SIGHASH_ALL, preventing any transaction modification.

No Bitcoin node required — analysis is pure PSBT parsing (BIP 174).

Args: psbt_hex: Hex-encoded PSBT string (BIP 174 v0)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
psbt_hexYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key traits: it's a read-only analysis tool ('Detects whether...'), requires no Bitcoin node ('No Bitcoin node required'), and uses pure PSBT parsing. It also explains vulnerability criteria (e.g., SIGHASH_SINGLE|ANYONECANPAY without multisig) and protection mechanisms, adding valuable context beyond basic functionality.

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?

The description is well-structured and front-loaded, starting with the core purpose. Each sentence adds value: vulnerability detection, criteria for vulnerable/protected states, technical details (no node required, BIP 174), and parameter explanation. There is no wasted text, making it efficient and easy to parse.

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?

Given the tool's complexity (involving Bitcoin PSBTs and security analysis), no annotations, and an output schema (implied by 'Has output schema: true'), the description is complete. It covers purpose, usage context, behavioral traits, and parameter details. The output schema likely handles return values, so the description appropriately focuses on input and process without redundancy.

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

Parameters5/5

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

The input schema has 0% description coverage, so the description must compensate fully. It does so by clearly explaining the single parameter 'psbt_hex' as a 'Hex-encoded PSBT string (BIP 174 v0)', specifying the format and standard. This adds essential meaning beyond the schema's basic type and title, ensuring the agent understands the required input.

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 explicitly states the tool's purpose: 'Analyze a PSBT for ordinals inscription listing mempool sniping vulnerability.' It specifies the verb ('analyze'), resource ('PSBT'), and scope ('ordinals inscription listing'), clearly distinguishing it from sibling tools like 'analyze_transaction' or 'explain_inscription_listing_security' by focusing on vulnerability detection rather than general analysis or explanation.

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 description provides clear context for when to use this tool: for analyzing PSBTs related to ordinals inscription listings to check for mempool front-running vulnerabilities. It does not explicitly mention when not to use it or name alternatives, but the specificity of 'ordinals inscription listing' implies it's not for general PSBT analysis. Sibling tools like 'explain_inscription_listing_security' might be alternatives, but this isn't stated.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bjunjo/treasury-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server