delete_client
Remove a client from a workspace by specifying the workspace ID and client ID to manage and organize projects effectively.
Instructions
Delete a client
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| clientId | Yes | Client ID | |
| workspaceId | Yes | Workspace ID |
Implementation Reference
- src/index.ts:1306-1321 (handler)The handler function that executes the delete_client tool. It makes a DELETE request to the Clockify API endpoint `/workspaces/{workspaceId}/clients/{clientId}` 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 definition for the delete_client tool, specifying required parameters workspaceId and clientId as strings.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 ListTools response, including name, description, and input 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 CallToolRequest handler that routes calls to the delete_client tool to the deleteClient method after parameter validation.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);