Skip to main content
Glama

getSignature

Retrieve signature verification details for IPFS content identifiers to authenticate and validate data integrity on public or private networks.

Instructions

Get signature details for a specific CID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
networkNoWhether the file is on public or private IPFSpublic
cidYesThe CID to get the signature for

Implementation Reference

  • Complete implementation of the getSignature tool that retrieves signature details for a specific CID from Pinata IPFS. Includes schema definition (network and cid parameters) and the async handler that makes a GET request to the Pinata API and returns the signature data.
    server.tool(
      "getSignature",
      "Get signature details for a specific CID",
      {
        network: z
          .enum(["public", "private"])
          .default("public")
          .describe("Whether the file is on public or private IPFS"),
        cid: z.string().describe("The CID to get the signature for"),
      },
      async ({ network, cid }) => {
        try {
          const url = `https://api.pinata.cloud/v3/files/${network}/signature/${cid}`;
    
          const response = await fetch(url, {
            method: "GET",
            headers: getHeaders(),
          });
    
          if (!response.ok) {
            throw new Error(
              `Failed to get signature: ${response.status} ${response.statusText}`
            );
          }
    
          const data = await response.json();
          return successResponse(data);
        } catch (error) {
          return errorResponse(error);
        }
      }
    );

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