Skip to main content
Glama

toggl_get_current_entry

Retrieve the currently active time entry from Toggl Track to monitor ongoing work or manage timers in automation workflows.

Instructions

Get the currently running time entry, if any

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler logic for the 'toggl_get_current_entry' tool call. Fetches current entry via API, hydrates with cache, handles no-entry case, returns formatted JSON.
    case 'toggl_get_current_entry': { const entry = await api.getCurrentTimeEntry(); if (!entry) { return { content: [{ type: 'text', text: JSON.stringify({ running: false, message: 'No timer currently running' }) }] }; } await ensureCache(); const hydrated = await cache.hydrateTimeEntries([entry]); return { content: [{ type: 'text', text: JSON.stringify({ running: true, entry: hydrated[0] }, null, 2) }] }; }
  • Schema definition for the tool, including name, description, and empty input schema (no parameters required).
    { name: 'toggl_get_current_entry', description: 'Get the currently running time entry, if any', inputSchema: { type: 'object', properties: {}, required: [] }, },
  • Core API method implementation that performs the HTTP GET request to Toggl's /me/time_entries/current endpoint to retrieve the running time entry.
    async getCurrentTimeEntry(): Promise<TimeEntry | null> { const result = await this.request<TimeEntry | null>('GET', '/me/time_entries/current'); return result; }

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/verygoodplugins/mcp-toggl'

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