Skip to main content
Glama

w3_can_access_claim

Claim delegated capabilities for an authorized account by submitting a valid proof, such as a CID string or CAR file path, to enable access to specific resources.

Instructions

Claims delegated capabilities for the authorized account using a provided proof.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
proofYesDelegation proof (e.g., path to CAR file or base64 CID string) containing capabilities to claim.

Implementation Reference

  • The main handler function that executes the w3_can_access_claim tool logic. It parses the input arguments using the schema, executes the w3 CLI command 'can access claim', and returns the output in the expected format.
    const handleW3CanAccessClaim: ToolHandler = async (args) => {
      const parsed = Schemas.W3CanAccessClaimArgsSchema.safeParse(args);
      if (!parsed.success)
        throw new Error(
          `Invalid arguments for w3_can_access_claim: ${parsed.error.message}`
        );
      const { proof } = parsed.data;
      const { stdout } = await runW3Command(`can access claim "${proof}"`);
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify({
              message: "Capability claim attempted.",
              output: stdout.trim(),
            }),
          },
        ],
      };
    };
  • Zod schema defining the input arguments for the w3_can_access_claim tool, specifically requiring a 'proof' string.
    export const W3CanAccessClaimArgsSchema = z
      .object({
        proof: z
          .string()
          .describe(
            "Delegation proof (e.g., path to CAR file or base64 CID string) containing capabilities to claim."
          ),
      })
      .describe(
        "Claims delegated capabilities for the authorized account using a provided proof."
      );
  • Registration of the 'w3_can_access_claim' tool name mapped to its handler function in the toolHandlers export.
    w3_can_access_claim: handleW3CanAccessClaim,

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