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, }; });

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