delete_client
Remove a client from your Clockify workspace to maintain accurate project organization and time tracking records.
Instructions
Delete a client
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workspaceId | Yes | Workspace ID | |
| clientId | Yes | Client ID |
Implementation Reference
- src/index.ts:1306-1321 (handler)The handler function that performs the DELETE request to the Clockify API endpoint for deleting a client and returns a success message.private async deleteClient(workspaceId: string, clientId: string) { await this.makeRequest( `/workspaces/${workspaceId}/clients/${clientId}`, "DELETE" ); return { content: [ { type: "text", text: `Client ${clientId} deleted successfully!`, }, ], isError: false, }; }
- src/index.ts:596-603 (schema)Input schema defining the required parameters: workspaceId and clientId for the delete_client tool.inputSchema: { type: "object", properties: { workspaceId: { type: "string", description: "Workspace ID" }, clientId: { type: "string", description: "Client ID" }, }, required: ["workspaceId", "clientId"], },
- src/index.ts:593-604 (registration)Registration of the delete_client tool in the list of tools returned by ListToolsRequestHandler, including name, description, and schema.{ name: "delete_client", description: "Delete a client", inputSchema: { type: "object", properties: { workspaceId: { type: "string", description: "Workspace ID" }, clientId: { type: "string", description: "Client ID" }, }, required: ["workspaceId", "clientId"], }, },
- src/index.ts:794-796 (registration)Dispatch case in the CallToolRequestHandler switch statement that validates arguments and calls the deleteClient handler method.case "delete_client": if (!args?.workspaceId || !args?.clientId) throw new McpError(ErrorCode.InvalidParams, 'workspaceId and clientId are required'); return await this.deleteClient(args.workspaceId as string, args.clientId as string);
- src/index.ts:51-56 (schema)TypeScript interface defining the Client object structure used in the codebase.interface Client { id?: string; name: string; workspaceId: string; archived?: boolean; }