Skip to main content
Glama

analyze_psbt_security

Detect mempool sniping vulnerabilities in Bitcoin PSBTs by analyzing signature hash flags and multisig configurations to identify front-running risks in 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
Behavior5/5

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

With no annotations provided, the description carries full burden and excels: it defines exact detection logic (vulnerable when SIGHASH_SINGLE|ANYONECANPAY without 2-of-2 multisig), protection criteria (2-of-2 P2WSH with SIGHASH_ALL), and operational constraints (pure BIP 174 parsing, no node required). No contradictions.

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?

Well-structured with logical flow: vulnerability detection → attack vector → protection mechanism → technical requirements → parameters. Front-loaded with purpose. The 'Args:' formatting is slightly informal but efficient. No redundant sentences.

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?

For a specialized security analysis tool, the description provides complete domain context: it explains the threat model (mempool sniping), the cryptographic conditions (sighash types, multisig structures), and input requirements. Output schema exists per context signals, so return value description is unnecessary.

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?

Schema has 0% description coverage (only title 'Psbt Hex'). The description compensates by specifying 'Hex-encoded PSBT string (BIP 174 v0),' providing encoding format and protocol version. This successfully conveys the parameter's semantics despite the schema deficiency.

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 opens with a specific verb ('Analyze') and resource ('PSBT'), clearly defining the scope as 'ordinals inscription listing mempool sniping vulnerability.' It distinguishes from generic transaction analysis siblings by focusing specifically on ordinals listing security and PSBT parsing.

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?

Provides clear context for when to use (analyzing ordinals listing PSBTs for front-running risk) and notes 'No Bitcoin node required,' indicating it's for offline/local PSBT analysis. Lacks explicit comparison to sibling 'explain_inscription_listing_security' but implies usage through detailed vulnerability scenarios.

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/Bortlesboat/bitcoin-mcp'

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