Skip to main content
Glama

start_timer

Start tracking time for a specific timeslip in FreeAgent to record billable hours or project work duration.

Instructions

Start a timer for a timeslip

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesTimeslip ID

Implementation Reference

  • MCP CallToolRequest handler for the 'start_timer' tool. Extracts the timeslip ID from arguments and calls FreeAgentClient.startTimer(id), then returns the resulting timeslip as formatted JSON text content.
    case 'start_timer': {
      const { id } = request.params.arguments as { id: string };
      const timeslip = await this.client.startTimer(id);
      return {
        content: [{ type: 'text', text: JSON.stringify(timeslip, null, 2) }]
      };
    }
  • src/index.ts:161-171 (registration)
    Registration of the 'start_timer' tool in the ListToolsRequestSchema response, defining its name, description, and input schema (requiring a string 'id').
    {
      name: 'start_timer',
      description: 'Start a timer for a timeslip',
      inputSchema: {
        type: 'object',
        properties: {
          id: { type: 'string', description: 'Timeslip ID' }
        },
        required: ['id']
      }
    },
  • Helper method in FreeAgentClient that implements the core logic: POST request to FreeAgent API `/timeslips/${id}/timer` to start the timer, returning the updated Timeslip object.
    async startTimer(id: string): Promise<Timeslip> {
        try {
            console.error('[API] Starting timer for timeslip:', id);
            const response = await this.axiosInstance.post<TimeslipResponse>(`/timeslips/${id}/timer`);
            return response.data.timeslip;
        } catch (error) {
            console.error('[API] Failed to start timer:', error);
            throw error;
        }
    }

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