delete_project
Remove a project from your Clockify workspace by specifying the workspace and project IDs to clean up outdated or completed projects.
Instructions
Delete a project
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workspaceId | Yes | Workspace ID | |
| projectId | Yes | Project ID |
Implementation Reference
- src/index.ts:1116-1131 (handler)The main handler function for the 'delete_project' tool. It performs a DELETE request to the Clockify API endpoint `/workspaces/{workspaceId}/projects/{projectId}` and returns a success message.private async deleteProject(workspaceId: string, projectId: string) { await this.makeRequest( `/workspaces/${workspaceId}/projects/${projectId}`, "DELETE" ); return { content: [ { type: "text", text: `Project ${projectId} deleted successfully!`, }, ], isError: false, }; }
- src/index.ts:460-471 (registration)Tool registration in the listTools response, defining the name, description, and input schema for 'delete_project'.{ name: "delete_project", description: "Delete a project", inputSchema: { type: "object", properties: { workspaceId: { type: "string", description: "Workspace ID" }, projectId: { type: "string", description: "Project ID" }, }, required: ["workspaceId", "projectId"], }, },
- src/index.ts:463-470 (schema)Input schema definition for the 'delete_project' tool, specifying required workspaceId and projectId parameters.inputSchema: { type: "object", properties: { workspaceId: { type: "string", description: "Workspace ID" }, projectId: { type: "string", description: "Project ID" }, }, required: ["workspaceId", "projectId"], },
- src/index.ts:763-765 (registration)Dispatch logic in the CallToolRequestSchema handler that routes calls to the deleteProject method.case "delete_project": if (!args?.workspaceId || !args?.projectId) throw new McpError(ErrorCode.InvalidParams, 'workspaceId and projectId are required'); return await this.deleteProject(args.workspaceId as string, args.projectId as string);