Skip to main content
Glama

w3_delegation_revoke

Revoke a specific delegation by CID using this MCP IPFS tool. Ensure the input includes the delegation CID and absolute file path for required proofs, facilitating controlled access management in storacha.network spaces.

Instructions

Tool for w3_delegation_revoke operation. Requires ABSOLUTE paths for file arguments.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
delegationCidYesThe CID of the delegation to revoke.
proofNoABSOLUTE path to a file containing the delegation and any additional proofs needed.

Implementation Reference

  • The main handler function that implements the tool logic: parses arguments using the schema, constructs and executes the 'w3 delegation revoke' CLI command, and formats the response.
    const handleW3DelegationRevoke: ToolHandler = async (args) => {
      const parsed = Schemas.W3DelegationRevokeArgsSchema.safeParse(args);
      if (!parsed.success)
        throw new Error(
          `Invalid arguments for w3_delegation_revoke: ${parsed.error.message}`
        );
      const { delegationCid, proof } = parsed.data;
      let command = `delegation revoke ${delegationCid}`;
      if (proof) command += ` --proof "${proof}"`;
      const { stdout } = await runW3Command(command);
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify({
              message: `Successfully revoked delegation ${delegationCid}.`,
              output: stdout.trim(),
            }),
          },
        ],
      };
    };
  • Zod schema defining the input arguments for the tool: delegationCid (required) and proof (optional file path).
    export const W3DelegationRevokeArgsSchema = z.object({
      delegationCid: z.string().describe("The CID of the delegation to revoke."),
      proof: z
        .string()
        .optional()
        .describe(
          "ABSOLUTE path to a file containing the delegation and any additional proofs needed."
        ),
    });
  • Maps the tool name 'w3_delegation_revoke' to its handler function in the toolHandlers export used by the MCP server.
    w3_delegation_revoke: handleW3DelegationRevoke,
  • src/index.ts:83-88 (registration)
    Dynamic registration of the tool in ListTools handler, deriving name, description, and inputSchema from imported schemas. The tool name appears in special handling logic around line 74.
      return {
        name: toolName,
        description: description.trim(),
        inputSchema: zodToJsonSchema(schema) as ToolInputSchema,
      };
    });
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions that 'ABSOLUTE paths' are required for file arguments, which is useful operational context. However, it doesn't describe what 'revoke' actually does (permanent deletion? temporary suspension?), what permissions are needed, whether the operation is reversible, or what side effects might occur. For a mutation tool with zero annotation coverage, this is insufficient.

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?

The description is appropriately concise with two sentences. The first sentence is redundant (tautology), but the second sentence provides critical operational information about absolute paths. While the first sentence could be eliminated, the overall structure is efficient with no wasted words beyond the initial tautology.

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?

For a mutation tool ('revoke') with no annotations and no output schema, the description is incomplete. It doesn't explain what the tool actually does behaviorally, what happens when invoked, what permissions are required, or what the expected outcome is. The absolute path requirement is helpful but insufficient for understanding the tool's purpose and effects in 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?

Schema description coverage is 100%, so both parameters are documented in the schema. The description adds value by emphasizing that 'ABSOLUTE paths' are required for file arguments, which clarifies the 'proof' parameter requirement beyond what the schema states ('ABSOLUTE path to a file'). This provides important operational guidance that compensates for the baseline expectation of 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Tool for w3_delegation_revoke operation' is a tautology that merely restates the tool name without explaining what 'revoke' means in this context. It doesn't specify what resource is being revoked (delegation) or what the operation entails, though the sibling tool 'w3_delegation_create' suggests this is likely a deletion/removal operation. The description fails to provide a clear verb+resource statement.

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?

No guidance is provided about when to use this tool versus alternatives. While the sibling list includes 'w3_delegation_ls' (likely for listing delegations) and 'w3_delegation_create' (likely for creating them), the description doesn't explain when revocation is appropriate versus other operations like modification or when to use this versus other deletion tools like 'w3_rm'. The only usage hint is the technical requirement about absolute paths.

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

Related 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/alexbakers/mcp-ipfs'

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