delete_tag
Remove tags from your Clockify workspace to maintain organized time tracking data and clean project management.
Instructions
Delete a tag
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workspaceId | Yes | Workspace ID | |
| tagId | Yes | Tag ID |
Implementation Reference
- src/index.ts:1393-1408 (handler)The handler function that sends a DELETE request to the Clockify API endpoint `/workspaces/{workspaceId}/tags/{tagId}` to delete the specified tag and returns a success message.private async deleteTag(workspaceId: string, tagId: string) { await this.makeRequest( `/workspaces/${workspaceId}/tags/${tagId}`, "DELETE" ); return { content: [ { type: "text", text: `Tag ${tagId} deleted successfully!`, }, ], isError: false, }; }
- src/index.ts:652-658 (schema)The input schema defining the parameters for the delete_tag tool: workspaceId and tagId as required strings.inputSchema: { type: "object", properties: { workspaceId: { type: "string", description: "Workspace ID" }, tagId: { type: "string", description: "Tag ID" }, }, required: ["workspaceId", "tagId"],
- src/index.ts:808-810 (registration)Registration of the delete_tag tool handler in the switch statement for CallToolRequestSchema, which validates arguments and calls the deleteTag method.case "delete_tag": if (!args?.workspaceId || !args?.tagId) throw new McpError(ErrorCode.InvalidParams, 'workspaceId and tagId are required'); return await this.deleteTag(args.workspaceId as string, args.tagId as string);
- src/index.ts:649-660 (registration)Tool definition and registration in the ListToolsRequestSchema response, including name, description, and input schema.{ name: "delete_tag", description: "Delete a tag", inputSchema: { type: "object", properties: { workspaceId: { type: "string", description: "Workspace ID" }, tagId: { type: "string", description: "Tag ID" }, }, required: ["workspaceId", "tagId"], }, },