Skip to main content
Glama

deletePaymentInstruction

Remove a specific x402 payment instruction from the Pinata MCP server by providing its unique identifier to manage payment records.

Instructions

Delete an x402 payment instruction

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe unique identifier of the payment instruction to delete

Implementation Reference

  • The complete implementation of the deletePaymentInstruction tool - registers the tool with its schema and defines the handler that makes a DELETE request to Pinata's x402 payment instructions API
    server.tool(
      "deletePaymentInstruction",
      "Delete an x402 payment instruction",
      {
        id: z
          .string()
          .describe("The unique identifier of the payment instruction to delete"),
      },
      async ({ id }) => {
        try {
          const url = `https://api.pinata.cloud/v3/x402/payment_instructions/${id}`;
    
          const response = await fetch(url, {
            method: "DELETE",
            headers: getHeaders(),
          });
    
          if (!response.ok) {
            throw new Error(
              `Failed to delete payment instruction: ${response.status} ${response.statusText}`
            );
          }
    
          const data = await response.json();
          return {
            content: [
              {
                type: "text",
                text: `✅ Payment instruction deleted successfully\n\n${JSON.stringify(data, null, 2)}`,
              },
            ],
          };
        } catch (error) {
          return errorResponse(error);
        }
      }
    );
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action ('Delete') but does not elaborate on critical aspects like whether this is irreversible, requires specific permissions, has side effects (e.g., affecting linked files or groups), or what happens on success/failure. For a destructive operation with zero annotation coverage, this is a significant gap.

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 a single, efficient sentence with no wasted words, making it easy to parse and front-loaded with the core action. Every word earns its place, adhering to best practices for brevity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's destructive nature, lack of annotations, and no output schema, the description is incomplete. It fails to address behavioral risks, return values, or error conditions, which are crucial for safe agent operation. The high schema coverage does not compensate for these omissions in a deletion context.

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?

The input schema has 100% description coverage, with the 'id' parameter clearly documented as 'The unique identifier of the payment instruction to delete'. The description does not add extra meaning beyond this, but with high schema coverage and only one parameter, a baseline of 4 is appropriate as the schema adequately handles the semantics.

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 clearly states the verb ('Delete') and resource ('an x402 payment instruction'), making the purpose unambiguous. However, it does not differentiate this tool from sibling tools like 'deleteFile' or 'deleteGroup', which have similar deletion patterns but target different resources.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives, such as 'cancelPinRequest' or 'updatePaymentInstruction', nor does it mention prerequisites like needing the payment instruction ID or conditions for deletion. It lacks explicit when/when-not instructions or sibling comparisons.

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/PinataCloud/pinata-mcp'

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