Skip to main content
Glama
gate

gatepay-local-mcp

by gate

x402_create_signature

Parse X402 payment requirements and generate a signed payment authorization, returning the payment payload and PAYMENT-SIGNATURE header for submission.

Instructions

Parse X402 payment requirements and create a signed payment authorization. Returns the complete payment payload including signature and the base64-encoded PAYMENT-SIGNATURE header value. Supports signing modes: local_private_key, quick_wallet, and plugin_wallet. The output can be used with x402_submit_payment to complete the payment request.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sign_modeNoOptional preferred signing mode. Omit to auto-select the highest-priority ready mode.
response_bodyNoOptional: Response body from 402 response, used if PAYMENT-REQUIRED header is not available
wallet_login_providerNoWhen quick_wallet needs login: OAuth provider (google or gate). Defaults to gate.
payment_required_headerNoBase64-encoded PAYMENT-REQUIRED header value from a 402 response
Behavior3/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It describes the operation (parse, create signature) and the return value (payload and header), and lists supported signing modes. However, it does not disclose potential prerequisites (e.g., wallet configuration), failure modes, or authentication requirements, leaving some behavioral gaps for a signing tool.

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 three sentences, front-loaded with the primary action and returns. It efficiently states the purpose, supported modes, and downstream usage without wasted words. Every sentence adds value.

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?

Given 4 optional parameters, no output schema, and no annotations, the description covers the main outcomes (returned payload and header) and integration with x402_submit_payment. It also lists signing modes. It could be more complete by describing the exact return structure or edge cases, but it is adequate for the tool's complexity.

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?

The schema provides 100% parameter description coverage, so the baseline is 3. The description adds minimal semantics beyond the schema by mentioning signing modes, which aligns with the sign_mode enum, but it does not add deeper meaning for the other parameters (e.g., how payment_required_header interacts with response_body).

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 uses a specific verb+resource: 'Parse X402 payment requirements and create a signed payment authorization.' It clearly states what the tool does and what it returns (payload with signature and PAYMENT-SIGNATURE header). It does not explicitly differentiate itself from the sibling x402_sign_payment, but the mention of parsing requirements and returning a complete payload adds specificity.

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?

Clear context is provided by stating the output can be used with x402_submit_payment to complete the payment request, which implies when to use this tool (before submission). However, it does not mention exclusions or explicitly contrast with alternative sibling tools like x402_sign_payment, so it lacks full 'when not to use' guidance.

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/gate/gatepay-local-mcp'

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