Skip to main content
Glama

firewall_before_payment

Paid automatic before-payment gate for x402 clients. Call after receiving the merchant's real PAYMENT-REQUIRED challenge but before creating/signing the merchant payment. Returns firewall_action ALLOW, REVIEW or BLOCK plus signed proof. ALLOW means the wallet/client may proceed only if its own spending authority also permits the payment. Machine price: $0.001 via x402.

Input Schema

NameRequiredDescriptionDefault
requestYes
categoryNoOptional purchase/service category for audit context.
merchant_idNoOptional stable merchant identifier; defaults to the resource hostname.
payment_requiredYesMerchant's real x402 PAYMENT-REQUIRED payload, decoded or encoded.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the burden well: it discloses the three possible firewall actions, says a signed proof is returned, qualifies what ALLOW means, and notes the call itself costs $0.001 via x402. It does not cover idempotency, failure behavior, or authentication requirements.

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 front-loaded, with each sentence serving a purpose: purpose, timing, return shape, ALLOW semantics, and price. There is no filler.

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 tool with no annotations and no output schema, the description supplies the critical return values and decision meaning. It is still somewhat thin on error handling, repeat-call behavior, and parameter-specific usage, but the core invocation context is complete.

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 75%, so the schema already documents most fields. The description reinforces that the PAYMENT-REQUIRED challenge and merchant request must be bound to the decision, but it adds no detail about the optional category, merchant_id, or request-body semantics beyond what the schema provides.

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?

The description states a specific verb and resource: a before-payment firewall gate for x402 clients that returns ALLOW/REVIEW/BLOCK plus signed proof. It is clear what the tool does, but it does not explicitly distinguish itself from nearby siblings such as preflight_x402, clearance_x402_ap2, or authorize_x402_ap2.

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?

It gives precise sequencing: call after receiving the merchant's real PAYMENT-REQUIRED challenge but before creating or signing the merchant payment. It lacks explicit when-not-to-use guidance or named alternatives among the sibling tools.

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.

Resources