Skip to main content
Glama

get_timeslip

Retrieve a specific timeslip from FreeAgent using its unique ID to access time tracking details for billing or reporting purposes.

Instructions

Get a single timeslip by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesTimeslip ID

Implementation Reference

  • Handler for the get_timeslip tool that extracts the ID from arguments and delegates to FreeAgentClient.getTimeslip, returning JSON response.
    case 'get_timeslip': { const { id } = request.params.arguments as { id: string }; const timeslip = await this.client.getTimeslip(id); return { content: [{ type: 'text', text: JSON.stringify(timeslip, null, 2) }] }; }
  • src/index.ts:106-116 (registration)
    Tool registration in ListTools handler, defining name, description, and input schema requiring 'id'.
    { name: 'get_timeslip', description: 'Get a single timeslip by ID', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Timeslip ID' } }, required: ['id'] } },
  • Implementation of getTimeslip in FreeAgentClient, performs API GET request to retrieve timeslip by ID.
    async getTimeslip(id: string): Promise<Timeslip> { try { console.error('[API] Fetching timeslip:', id); const response = await this.axiosInstance.get<TimeslipResponse>(`/timeslips/${id}`); return response.data.timeslip; } catch (error) { console.error('[API] Failed to fetch timeslip:', error); throw error; } }
  • Type schemas for API response (TimeslipResponse) and Timeslip object used in getTimeslip.
    export interface TimeslipResponse { timeslip: Timeslip; }

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