Skip to main content
Glama

update_timeslip

Modify an existing timeslip entry to update hours worked, project details, dates, or comments for accurate time tracking in FreeAgent.

Instructions

Update an existing timeslip

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesTimeslip ID
taskNoTask URL
userNoUser URL
projectNoProject URL
dated_onNoDate (YYYY-MM-DD)
hoursNoHours worked (e.g. "1.5")
commentNoOptional comment

Implementation Reference

  • Main handler logic for the 'update_timeslip' tool: parses arguments, filters valid update fields, invokes the client method, and formats the response.
    case 'update_timeslip': {
      const { id, ...updates } = request.params.arguments as { id: string } & Record<string, unknown>;
      // Only include valid update fields
      const validUpdates: Partial<TimeslipAttributes> = {};
      if (typeof updates.task === 'string') validUpdates.task = updates.task;
      if (typeof updates.user === 'string') validUpdates.user = updates.user;
      if (typeof updates.project === 'string') validUpdates.project = updates.project;
      if (typeof updates.dated_on === 'string') validUpdates.dated_on = updates.dated_on;
      if (typeof updates.hours === 'string') validUpdates.hours = updates.hours;
      if (typeof updates.comment === 'string') validUpdates.comment = updates.comment;
    
      const timeslip = await this.client.updateTimeslip(id, validUpdates);
      return {
        content: [{ type: 'text', text: JSON.stringify(timeslip, null, 2) }]
      };
    }
  • src/index.ts:133-149 (registration)
    Registration of the 'update_timeslip' tool in the ListTools response, defining name, description, and JSON input schema.
    {
      name: 'update_timeslip',
      description: 'Update an existing timeslip',
      inputSchema: {
        type: 'object',
        properties: {
          id: { type: 'string', description: 'Timeslip ID' },
          task: { type: 'string', description: 'Task URL' },
          user: { type: 'string', description: 'User URL' },
          project: { type: 'string', description: 'Project URL' },
          dated_on: { type: 'string', description: 'Date (YYYY-MM-DD)' },
          hours: { type: 'string', description: 'Hours worked (e.g. "1.5")' },
          comment: { type: 'string', description: 'Optional comment' }
        },
        required: ['id']
      }
    },
  • FreeAgentClient helper method that executes the HTTP PUT request to the FreeAgent API to update a timeslip.
    async updateTimeslip(id: string, timeslip: Partial<TimeslipAttributes>): Promise<Timeslip> {
        try {
            console.error('[API] Updating timeslip:', id, timeslip);
            const response = await this.axiosInstance.put<TimeslipResponse>(`/timeslips/${id}`, {
                timeslip
            });
            return response.data.timeslip;
        } catch (error) {
            console.error('[API] Failed to update timeslip:', error);
            throw error;
        }
    }
  • TypeScript interface defining the structure of TimeslipAttributes used in update operations (Partial used in client method).
    export interface TimeslipAttributes {
        url?: string;
        task: string;
        user: string;
        project: string;
        dated_on: string;
        hours: string;
        comment?: string;
        billed_on_invoice?: string;
        created_at?: string;
        updated_at?: string;
        timer?: TimerAttributes;
    }
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 'Update' implies mutation but doesn't specify required permissions, whether changes are reversible, error handling, or rate limits. This is inadequate 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, direct sentence with zero wasted words. It's perfectly front-loaded and appropriately sized for its purpose, making it highly efficient.

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 7 parameters, no annotations, and no output schema, the description is insufficient. It lacks behavioral context, usage guidance, and details on return values or error cases, leaving significant gaps in understanding.

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 fully documents all 7 parameters. The description adds no additional parameter semantics beyond what's in the schema, meeting the baseline for high coverage but not providing extra value.

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 action ('Update') and resource ('an existing timeslip'), making the purpose immediately understandable. It distinguishes from sibling tools like 'create_timeslip' and 'delete_timeslip' by specifying it's for existing records, though it doesn't explicitly contrast with 'get_timeslip' or 'list_timeslips'.

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_timeslip' for new entries or 'delete_timeslip' for removal. It doesn't mention prerequisites (e.g., needing an existing timeslip ID) or contextual constraints, leaving usage entirely implicit.

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/markpitt/freeagent-mcp'

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