Update Client
update_clientUpdate a client's name, email, or phone by providing their record ID.
Instructions
Update an existing client.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| record_id | Yes | Client record ID | |
| name | No | Client name | |
| No | Client email | ||
| phone | No | Client phone number |
Implementation Reference
- server/index.js:267-288 (registration)Registration of the update_client tool with its input schema (record_id required, name/email/phone optional) and handler that sends a PUT request to /v1/workspace/client/update.
server.registerTool( "update_client", { title: "Update Client", description: "Update an existing client.", inputSchema: { record_id: z.string().describe("Client record ID"), name: z.string().optional().describe("Client name"), email: z.string().optional().describe("Client email"), phone: z.string().optional().describe("Client phone number"), }, annotations: { readOnlyHint: false, destructiveHint: false, openWorldHint: false }, }, async ({ record_id, name, email, phone }) => { const body = { record_id }; if (name) body.name = name; if (email) body.email = email; if (phone) body.phone = phone; const data = await apiCall("/v1/workspace/client/update", "PUT", body); return { content: [{ type: "text", text: JSON.stringify(data?.result ?? data, null, 2) }] }; } ); - server/index.js:280-287 (handler)Handler function for update_client - constructs a body with record_id and optional fields (name, email, phone), then calls the API endpoint /v1/workspace/client/update via PUT.
async ({ record_id, name, email, phone }) => { const body = { record_id }; if (name) body.name = name; if (email) body.email = email; if (phone) body.phone = phone; const data = await apiCall("/v1/workspace/client/update", "PUT", body); return { content: [{ type: "text", text: JSON.stringify(data?.result ?? data, null, 2) }] }; } - server/index.js:272-278 (schema)Input schema for update_client defining record_id (required string) and optional fields: name, email, phone.
inputSchema: { record_id: z.string().describe("Client record ID"), name: z.string().optional().describe("Client name"), email: z.string().optional().describe("Client email"), phone: z.string().optional().describe("Client phone number"), }, annotations: { readOnlyHint: false, destructiveHint: false, openWorldHint: false },