user_update
Modify user account details, product access, and usage data in the Pickaxe platform to maintain accurate user profiles and permissions.
Instructions
Update an existing user's details, products, or usage.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| studio | No | Studio name to use. Available: STAGING, MAIN, DEV, PRODUCTION. Default: PRODUCTION | |
| Yes | The user's email address | ||
| name | No | Updated display name | |
| products | No | Updated array of product IDs | |
| currentUses | No | Set current usage count | |
| extraUses | No | Add extra usage allowance | |
| isEmailVerified | No | Update email verification status |
Implementation Reference
- src/index.ts:543-558 (handler)Handler for the 'user_update' tool. Conditionally builds an update payload from input arguments and sends a PATCH request to the Pickaxe API endpoint `/studio/user/{email}` to update the user's details, products, usage, or verification status.case "user_update": { const data: Record<string, unknown> = {}; if (args.name !== undefined) data.name = args.name; if (args.products !== undefined) data.products = args.products; if (args.currentUses !== undefined) data.currentUses = args.currentUses; if (args.extraUses !== undefined) data.extraUses = args.extraUses; if (args.isEmailVerified !== undefined) data.isEmailVerified = args.isEmailVerified; const result = await pickaxeRequest( `/studio/user/${encodeURIComponent(args.email as string)}`, "PATCH", { data }, studio ); return JSON.stringify(result, null, 2); }
- src/index.ts:325-360 (registration)Registration of the 'user_update' tool in the tools array, including name, description, and detailed input schema defining parameters like studio, email (required), name, products, usage fields, and email verification.{ name: "user_update", description: "Update an existing user's details, products, or usage.", inputSchema: { type: "object", properties: { studio: studioParam, email: { type: "string", description: "The user's email address", }, name: { type: "string", description: "Updated display name", }, products: { type: "array", items: { type: "string" }, description: "Updated array of product IDs", }, currentUses: { type: "number", description: "Set current usage count", }, extraUses: { type: "number", description: "Add extra usage allowance", }, isEmailVerified: { type: "boolean", description: "Update email verification status", }, }, required: ["email"], }, },