Skip to main content
Glama

update_tag

Modify tag details such as name and archived status within Clockify by specifying workspace and tag IDs, ensuring accurate time entry and project organization.

Instructions

Update an existing tag

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
archivedNoWhether tag is archived
nameNoTag name
tagIdYesTag ID
workspaceIdYesWorkspace ID

Implementation Reference

  • The handler function that executes the tool logic: extracts parameters, makes a PUT request to Clockify API to update the tag, and returns a success message.
    private async updateTag(args: any) { const { workspaceId, tagId, ...updateData } = args; const tag = await this.makeRequest( `/workspaces/${workspaceId}/tags/${tagId}`, "PUT", updateData ); return { content: [ { type: "text", text: `Tag updated successfully!\nName: ${tag.name}\nArchived: ${tag.archived}`, }, ], isError: false, }; }
  • src/index.ts:805-807 (registration)
    Tool call dispatcher in the CallToolRequestSchema handler that routes to the updateTag method after validation.
    case "update_tag": if (!args?.workspaceId || !args?.tagId) throw new McpError(ErrorCode.InvalidParams, 'workspaceId and tagId are required'); return await this.updateTag(args as any);
  • src/index.ts:635-648 (registration)
    Tool registration in the ListToolsRequestSchema response, defining the tool name, description, and input schema.
    { name: "update_tag", description: "Update an existing tag", inputSchema: { type: "object", properties: { workspaceId: { type: "string", description: "Workspace ID" }, tagId: { type: "string", description: "Tag ID" }, name: { type: "string", description: "Tag name" }, archived: { type: "boolean", description: "Whether tag is archived" }, }, required: ["workspaceId", "tagId"], }, },
  • Input schema defining parameters for the update_tag tool: workspaceId and tagId required, name and archived optional.
    inputSchema: { type: "object", properties: { workspaceId: { type: "string", description: "Workspace ID" }, tagId: { type: "string", description: "Tag ID" }, name: { type: "string", description: "Tag name" }, archived: { type: "boolean", description: "Whether tag is archived" }, }, required: ["workspaceId", "tagId"], },

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ratheesh-aot/clockify-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server