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
| Name | Required | Description | Default |
|---|---|---|---|
| proof | Yes | Delegation proof (e.g., path to CAR file or base64 CID string) containing capabilities to claim. |
Implementation Reference
- src/tool_handlers.ts:812-831 (handler)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(), }), }, ], }; };
- src/schemas.ts:339-349 (schema)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." );
- src/tool_handlers.ts:974-974 (registration)Registration of the 'w3_can_access_claim' tool name mapped to its handler function in the toolHandlers export.w3_can_access_claim: handleW3CanAccessClaim,