Skip to main content
Glama
ratheesh-aot

Clockify MCP Server

by ratheesh-aot

duplicate_time_entry

Copy an existing time entry in Clockify to replicate tracking for similar tasks or projects, saving manual entry time.

Instructions

Duplicate a time entry

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspaceIdYesWorkspace ID
userIdYesUser ID
idYesTime entry ID to duplicate

Implementation Reference

  • The main handler function for the 'duplicate_time_entry' tool. It extracts workspaceId, userId, and id from input arguments, performs a POST request to the Clockify API endpoint to duplicate the specified time entry, and returns a success response with details of the duplicated entry.
    private async duplicateTimeEntry(args: any) {
      const { workspaceId, userId, id } = args;
    
      const result = await this.makeRequest(
        `/workspaces/${workspaceId}/user/${userId}/time-entries/${id}/duplicate`,
        "POST"
      );
    
      return {
        content: [
          {
            type: "text",
            text: `Time entry duplicated successfully!\nID: ${result.id}\nDescription: ${result.description || "No description"}\nStart: ${result.timeInterval.start}\nEnd: ${result.timeInterval.end || "Ongoing"}\nDuration: ${result.timeInterval.duration || "N/A"}\nBillable: ${result.billable}\nProject: ${result.projectId || "No project"}`,
          },
        ],
        isError: false,
      };
    }
  • src/index.ts:746-748 (registration)
    The switch case in the CallToolRequestHandler that handles incoming calls to 'duplicate_time_entry' by validating parameters and invoking the duplicateTimeEntry handler method.
    case "duplicate_time_entry":
      if (!args?.workspaceId || !args?.userId || !args?.id) throw new McpError(ErrorCode.InvalidParams, 'workspaceId, userId and id are required');
      return await this.duplicateTimeEntry(args as any);
  • The tool registration entry in the listTools response, defining the name, description, and input schema (parameters and required fields) for the 'duplicate_time_entry' tool.
      name: "duplicate_time_entry",
      description: "Duplicate a time entry",
      inputSchema: {
        type: "object",
        properties: {
          workspaceId: { type: "string", description: "Workspace ID" },
          userId: { type: "string", description: "User ID" },
          id: { type: "string", description: "Time entry ID to duplicate" },
        },
        required: ["workspaceId", "userId", "id"],
      },
    },
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Duplicate' implies a mutation operation, but the description doesn't specify whether this creates a new time entry with copied data, if it requires specific permissions, what happens to the original entry, or what the response looks like. This is a significant gap for a mutation tool with zero annotation coverage.

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 waste. It's appropriately sized and front-loaded, immediately conveying the core action without unnecessary elaboration.

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?

Given the complexity of a mutation tool with no annotations and no output schema, the description is incomplete. It lacks details on behavior, output, error conditions, or how it fits within the context of sibling tools. The 100% schema coverage helps with parameters, but overall completeness is inadequate for this type of operation.

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?

The schema description coverage is 100%, with all three parameters (workspaceId, userId, id) documented in the schema. The description doesn't add any meaning beyond what the schema provides, such as explaining relationships between parameters or usage nuances. With high schema coverage, the baseline is 3.

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 'Duplicate a time entry' clearly states the verb ('duplicate') and resource ('time entry'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'create_time_entry' or 'update_time_entry' that also manipulate time entries, which would require a 5.

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. There's no mention of prerequisites (e.g., needing an existing time entry), when duplication is appropriate compared to creating a new entry, or how it differs from sibling tools like 'create_time_entry' or 'update_time_entry'.

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