Skip to main content
Glama

getGroup

Retrieve detailed information about a specific group by its ID from Pinata's IPFS network, enabling content organization and access management.

Instructions

Retrieve detailed information about a specific group by its ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
networkNoWhether the group is in public or private IPFSpublic
idYesThe unique ID of the group to retrieve

Implementation Reference

  • getGroup tool registration and handler - retrieves detailed information about a specific group by its ID from the Pinata API
    server.tool(
      "getGroup",
      "Retrieve detailed information about a specific group by its ID",
      {
        network: z
          .enum(["public", "private"])
          .default("public")
          .describe("Whether the group is in public or private IPFS"),
        id: z.string().describe("The unique ID of the group to retrieve"),
      },
      async ({ network, id }) => {
        try {
          const url = `https://api.pinata.cloud/v3/groups/${network}/${id}`;
    
          const response = await fetch(url, {
            method: "GET",
            headers: getHeaders(),
          });
    
          if (!response.ok) {
            throw new Error(
              `Failed to get group: ${response.status} ${response.statusText}`
            );
          }
    
          const data = await response.json();
          return successResponse(data);
        } catch (error) {
          return errorResponse(error);
        }
      }
    );
  • getHeaders helper function - generates authorization headers with the PINATA_JWT token for API requests
    const getHeaders = () => {
      if (!PINATA_JWT) {
        throw new Error("PINATA_JWT environment variable is not set");
      }
      return {
        Authorization: `Bearer ${PINATA_JWT}`,
        "Content-Type": "application/json",
      };
    };
  • errorResponse helper function - returns a standardized error response format for tool failures
    const errorResponse = (error: unknown) => ({
      content: [
        {
          type: "text" as const,
          text: `Error: ${error instanceof Error ? error.message : String(error)}`,
        },
      ],
      isError: true,
    });
  • successResponse helper function - returns a standardized success response with JSON-formatted data
    const successResponse = (data: unknown) => ({
      content: [{ type: "text" as const, text: JSON.stringify(data, null, 2) }],
    });
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states this is a retrieval operation, implying read-only behavior, but doesn't mention authentication needs, rate limits, error conditions, or what 'detailed information' includes (e.g., metadata, members). This leaves significant gaps for a tool with potential complexity.

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 that front-loads the core purpose ('Retrieve detailed information') without unnecessary words. Every part of the sentence contributes directly to understanding the tool's function.

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 no annotations and no output schema, the description is incomplete for a tool that retrieves 'detailed information.' It doesn't specify what information is returned (e.g., group attributes, status), how errors are handled, or dependencies, leaving the agent with insufficient context for reliable use.

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 both parameters ('network' with enum/default and 'id' as required). The description adds no additional parameter semantics beyond implying 'id' is needed for retrieval, which is already clear from the schema. This meets the baseline for high schema coverage.

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 ('Retrieve detailed information') and resource ('about a specific group by its ID'), making the purpose unambiguous. However, it doesn't differentiate from sibling tools like 'listGroups' or 'getFileById', which would require mentioning this is for individual group details rather than listing or file retrieval.

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 'listGroups' for browsing groups or 'getFileById' for file details. It lacks context about prerequisites (e.g., needing a group ID) or exclusions, leaving usage unclear relative to siblings.

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