Skip to main content
Glama

Phlece

x402 payment header

phlece_x402_header

Turns the wallet's signature of a routed authorization into the x402 payment header (PAYMENT-SIGNATURE, or X-PAYMENT for x402 v1 services) to send with the request. Counts the amount against the wallet's policy.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "routeId": "<routeId>",
      "signature": "<signature>"
    },
    "name": "phlece_x402_header"
  }
}

Input Schema

NameRequiredDescriptionDefault
routeIdYes
signatureYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Goes beyond annotations by disclosing two real side effects: the output is a header in two different formats depending on x402 version, and the amount is counted against the wallet's policy (a stateful accounting effect consistent with readOnlyHint=false and idempotentHint=false). It does not say what happens when the policy rejects the amount, nor whether the tool itself transmits the request or only mints the header.

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?

Two tight sentences with the action and output format front-loaded; nothing is filler. The density of x402 jargon makes it slightly harder to parse than a fully front-loaded statement, but no sentence is wasted.

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?

With no output schema, the description helpfully characterizes the return value as a named header variant. It falls short on failure behavior (insufficient policy) and on whether sending the request is this tool's job or the caller's, which matters for a non-idempotent, policy-affecting step.

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 coverage is 0%, so the description must carry the parameters, and it only partially does: 'the wallet's signature of a routed authorization' gives meaning to `signature`, and 'routed' hints that `routeId` comes from a prior routing step. It does not state the encoding of the signature, whether routeId is an opaque id from route_request, or how the two relate.

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?

States a specific transformation (signature of a routed authorization → x402 payment header) and names the concrete artifacts produced (PAYMENT-SIGNATURE / X-PAYMENT for v1). That is clearly distinct from sibling preparation/quoting tools, though it never names a sibling or explicitly contrasts its role in the workflow.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'to send with the request' implies this is the step after routing and signing, but usage is left implicit. There is no explicit when-to-use, no when-not-to-use, and no guidance on ordering relative to phlece_route_request or phlece_record_job_payment.

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