Skip to main content
Glama

update_client

Modify client details in Clockify, including name and archive status, to maintain accurate project organization and time tracking records.

Instructions

Update an existing client

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspaceIdYesWorkspace ID
clientIdYesClient ID
nameNoClient name
archivedNoWhether client is archived

Implementation Reference

  • The handler function that implements the core logic of the 'update_client' tool. It extracts workspaceId, clientId, and updateData from arguments, makes a PUT request to the Clockify API endpoint `/workspaces/{workspaceId}/clients/{clientId}`, and returns a success message with updated client details.
    private async updateClient(args: any) { const { workspaceId, clientId, ...updateData } = args; const client = await this.makeRequest( `/workspaces/${workspaceId}/clients/${clientId}`, "PUT", updateData ); return { content: [ { type: "text", text: `Client updated successfully!\nName: ${client.name}\nArchived: ${client.archived}`, }, ], isError: false, }; }
  • src/index.ts:791-793 (registration)
    The switch case in the CallToolRequest handler that routes calls to the 'update_client' tool to the updateClient method, with parameter validation.
    case "update_client": if (!args?.workspaceId || !args?.clientId) throw new McpError(ErrorCode.InvalidParams, 'workspaceId and clientId are required'); return await this.updateClient(args as any);
  • The tool registration entry that defines the name, description, and input schema (parameters and requirements) for the 'update_client' tool in the ListTools response.
    name: "update_client", description: "Update an existing client", inputSchema: { type: "object", properties: { workspaceId: { type: "string", description: "Workspace ID" }, clientId: { type: "string", description: "Client ID" }, name: { type: "string", description: "Client name" }, archived: { type: "boolean", description: "Whether client is archived" }, }, required: ["workspaceId", "clientId"], },
  • src/index.ts:580-591 (registration)
    Registration of the 'update_client' tool in the tools list returned by ListToolsRequestHandler.
    name: "update_client", description: "Update an existing client", inputSchema: { type: "object", properties: { workspaceId: { type: "string", description: "Workspace ID" }, clientId: { type: "string", description: "Client ID" }, name: { type: "string", description: "Client name" }, archived: { type: "boolean", description: "Whether client is archived" }, }, required: ["workspaceId", "clientId"], },
  • TypeScript interface defining the structure of a Client object, used in the context of client management tools including update_client.
    interface Client { id?: string; name: string; workspaceId: string; archived?: boolean; }

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