Skip to main content
Glama

update_client

Modify client details such as name or archive status within a Clockify workspace by specifying the workspace and client ID using this integration tool.

Instructions

Update an existing client

Input Schema

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

Implementation Reference

  • The main handler function for 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}` with the update data, and returns a success message with the 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, }; }
  • The input schema definition for the 'update_client' tool, registered in the ListTools response. Defines parameters like workspaceId (required), clientId (required), name, and archived.
    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:793-795 (registration)
    The dispatch/registration in the CallToolRequestSchema handler's switch statement, which validates required params and calls the updateClient method.
    return await this.updateClient(args as any); case "delete_client": if (!args?.workspaceId || !args?.clientId) throw new McpError(ErrorCode.InvalidParams, 'workspaceId and clientId are required');

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