delete_client
Delete a client from your workspace by providing the client record ID. This action removes the client and its data.
Instructions
Delete a client from the workspace.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| record_id | Yes | Client record ID to delete |
Implementation Reference
- server/index.js:263-274 (registration)Registration of the 'delete_client' tool via server.tool() with name 'delete_client', description, schema, and handler.
server.tool( "delete_client", "Delete a client from the workspace.", { record_id: z.string().describe("Client record ID to delete"), }, { title: "Delete Client", readOnlyHint: false, destructiveHint: true, openWorldHint: false }, async ({ record_id }) => { const data = await apiCall("/v1/workspace/client/delete", "DELETE", { record_id }); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] }; } ); - server/index.js:266-268 (schema)Input schema for 'delete_client' expecting a single 'record_id' (string) via Zod validation.
{ record_id: z.string().describe("Client record ID to delete"), }, - server/index.js:270-273 (handler)Handler function for 'delete_client' that calls apiCall to DELETE /v1/workspace/client/delete with record_id.
async ({ record_id }) => { const data = await apiCall("/v1/workspace/client/delete", "DELETE", { record_id }); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] }; } - server/index.js:112-123 (helper)The apiCall helper function used by the handler to make HTTP requests with the API key.
async function apiCall(path, method, body) { const url = `${BASE_URL}${path}`; const res = await fetch(url, { method, headers: { Authorization: `Bearer ${API_KEY}`, "Content-Type": "application/json", }, ...(body ? { body: JSON.stringify(body) } : {}), }); return res.json(); }