Skip to main content
Glama

create_timeslip

Log work hours in FreeAgent by creating timeslips with task, project, user, date, and duration details to track time accurately.

Instructions

Create a new timeslip

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskYesTask URL
userYesUser URL
projectYesProject URL
dated_onYesDate (YYYY-MM-DD)
hoursYesHours worked (e.g. "1.5")
commentNoOptional comment

Implementation Reference

  • MCP tool handler for 'create_timeslip': validates input attributes and delegates to FreeAgentClient.createTimeslip, returning the created timeslip as JSON.
    case 'create_timeslip': {
      const attributes = validateTimeslipAttributes(request.params.arguments);
      const timeslip = await this.client.createTimeslip(attributes);
      return {
        content: [{ type: 'text', text: JSON.stringify(timeslip, null, 2) }]
      };
    }
  • src/index.ts:117-132 (registration)
    Registers the 'create_timeslip' tool in the MCP server's list_tools response, including name, description, and JSON input schema.
    {
      name: 'create_timeslip',
      description: 'Create a new timeslip',
      inputSchema: {
        type: 'object',
        properties: {
          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: ['task', 'user', 'project', 'dated_on', 'hours']
      }
    },
  • Input validation function for create_timeslip parameters, ensuring required fields are present and casting to TimeslipAttributes type.
    function validateTimeslipAttributes(data: unknown): TimeslipAttributes {
      if (typeof data !== 'object' || !data) {
        throw new Error('Invalid timeslip data: must be an object');
      }
    
      const attrs = data as Record<string, unknown>;
    
      if (typeof attrs.task !== 'string' ||
        typeof attrs.user !== 'string' ||
        typeof attrs.project !== 'string' ||
        typeof attrs.dated_on !== 'string' ||
        typeof attrs.hours !== 'string') {
        throw new Error('Invalid timeslip data: missing required fields');
      }
    
      return {
        task: attrs.task,
        user: attrs.user,
        project: attrs.project,
        dated_on: attrs.dated_on,
        hours: attrs.hours,
        comment: attrs.comment as string | undefined
      };
    }
  • TypeScript interface defining the structure of TimeslipAttributes used for create_timeslip input.
    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;
    }
  • FreeAgentClient method that performs the actual API POST request to create a timeslip in FreeAgent.
    async createTimeslip(timeslip: TimeslipAttributes): Promise<Timeslip> {
        try {
            console.error('[API] Creating timeslip:', timeslip);
            const response = await this.axiosInstance.post<TimeslipResponse>('/timeslips', {
                timeslip
            });
            return response.data.timeslip;
        } catch (error) {
            console.error('[API] Failed to create timeslip:', error);
            throw error;
        }
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states 'Create a new timeslip', implying a write operation, but fails to disclose critical traits like authentication needs, rate limits, side effects, or what happens on success/failure. 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, directly stating the tool's purpose without unnecessary elaboration, earning full marks for conciseness.

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 creation tool with 6 parameters, no annotations, and no output schema, the description is incomplete. It lacks details on behavioral traits, error handling, or return values, making it inadequate for an agent to use the tool effectively without additional context.

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 6 parameters with clear descriptions (e.g., 'Task URL', 'Hours worked'). The description adds no additional meaning beyond what the schema provides, such as explaining relationships between parameters or usage examples, meeting the baseline for high schema coverage.

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

Purpose3/5

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

The description 'Create a new timeslip' clearly states the action (create) and resource (timeslip), but it's vague about what a 'timeslip' represents in this context. It doesn't differentiate from siblings like 'update_timeslip' or 'start_timer' beyond the basic verb, missing specificity about scope or purpose.

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?

No guidance is provided on when to use this tool versus alternatives like 'update_timeslip' or 'start_timer'. The description lacks context about prerequisites, such as whether existing timeslips are needed, or explicit exclusions, leaving the agent to infer usage from sibling names alone.

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