Skip to main content
Glama

addSignature

Attach EIP-712 cryptographic signatures to CIDs for content verification and authentication on IPFS networks.

Instructions

Add an EIP-712 cryptographic signature to a CID for content verification

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
networkNoWhether the file is on public or private IPFSpublic
cidYesThe CID to sign
signatureYesThe EIP-712 signature
addressYesThe wallet address that created the signature

Implementation Reference

  • Complete implementation of the 'addSignature' tool. It registers and implements an MCP tool that adds an EIP-712 cryptographic signature to a CID for content verification on Pinata. The tool accepts parameters for network (public/private), cid, signature, and address, then makes a POST request to the Pinata API endpoint.
    server.tool(
      "addSignature",
      "Add an EIP-712 cryptographic signature to a CID for content verification",
      {
        network: z
          .enum(["public", "private"])
          .default("public")
          .describe("Whether the file is on public or private IPFS"),
        cid: z.string().describe("The CID to sign"),
        signature: z.string().describe("The EIP-712 signature"),
        address: z.string().describe("The wallet address that created the signature"),
      },
      async ({ network, cid, signature, address }) => {
        try {
          const url = `https://api.pinata.cloud/v3/files/${network}/signature/${cid}`;
    
          const response = await fetch(url, {
            method: "POST",
            headers: getHeaders(),
            body: JSON.stringify({ signature, address }),
          });
    
          if (!response.ok) {
            const errorText = await response.text();
            throw new Error(
              `Failed to add signature: ${response.status} ${response.statusText}\n${errorText}`
            );
          }
    
          const data = await response.json();
          return {
            content: [
              {
                type: "text",
                text: `✅ Signature added 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. It mentions 'content verification' but doesn't disclose behavioral traits like whether this is a read-only or mutating operation, what happens on success/failure, if it requires authentication, or any rate limits. The description is too minimal for a tool that likely involves cryptographic operations.

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 zero waste. It is front-loaded with the core purpose and avoids unnecessary details, making it highly concise and well-structured for quick understanding.

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 complexity of cryptographic signing and no annotations or output schema, the description is incomplete. It doesn't explain what the tool returns, error conditions, or security implications. For a tool with 4 parameters and no structured behavioral hints, more context is needed to guide proper usage.

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 100%, so the schema fully documents all parameters. The description adds no additional meaning beyond implying the signature is for verification, which is already suggested by 'EIP-712 cryptographic signature'. Baseline score of 3 is appropriate as the schema handles parameter documentation.

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 action ('Add an EIP-712 cryptographic signature') and the resource ('to a CID'), making the purpose specific and understandable. It distinguishes from siblings like 'deleteSignature' by focusing on addition rather than removal, though it doesn't explicitly contrast with all sibling tools.

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 like 'getSignature' or 'deleteSignature', nor does it mention prerequisites such as needing a valid signature or address. It lacks context about typical use cases or constraints.

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