user_update
Modify user account information, product access, or usage data in the Pickaxe platform to maintain accurate user management.
Instructions
Update an existing user's details, products, or usage.
Input 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 function for the 'user_update' tool. Constructs update data from arguments and sends a PATCH request to the Pickaxe API endpoint `/studio/user/{email}`.
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:328-359 (schema)Input schema definition for the 'user_update' tool, specifying parameters like email (required), name, products, usage counts, and email verification status.
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"], }, - src/index.ts:325-360 (registration)Tool registration in the tools array, including name, description, and inputSchema. This array is returned by the ListTools handler.
{ 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"], }, },