Skip to main content
Glama
ratheesh-aot

Clockify MCP Server

by ratheesh-aot

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;
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It states this is an update operation (implying mutation) but doesn't address permissions needed, whether changes are reversible, what happens to unspecified fields, or potential side effects. For a mutation tool with zero annotation coverage, this leaves significant behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero wasted words. It's appropriately sized for a straightforward update operation and front-loads the essential information immediately.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with no annotations and no output schema, the description is inadequate. It doesn't explain what fields can be updated beyond the schema, what the response looks like, or important behavioral aspects. Given the complexity of client updates and lack of structured coverage, more descriptive context is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all 4 parameters. The description doesn't add any parameter-specific context beyond what's in the schema (e.g., explaining relationships between parameters or special constraints). The baseline of 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('update') and resource ('an existing client'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'update_project' or 'update_tag' beyond the resource name, missing explicit distinction between different update operations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'create_client' or 'delete_client'. It doesn't mention prerequisites (e.g., needing an existing client ID) or contextual factors that would inform tool selection among the many update operations available.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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