Skip to main content
Glama

toggl_get_current_entry

Retrieve the currently active time entry from Toggl Track to monitor ongoing work sessions or check timer status.

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: fetches the current running time entry using the TogglAPI, hydrates it with project/workspace names from cache, and returns a JSON response indicating if a timer is running and entry details.
    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). This is part of the tools array used for MCP tool listing.
    { name: 'toggl_get_current_entry', description: 'Get the currently running time entry, if any', inputSchema: { type: 'object', properties: {}, required: [] }, },
  • Supporting method in TogglAPI class that makes the HTTP request to Toggl Track API endpoint '/me/time_entries/current' to retrieve the currently running time entry.
    async getCurrentTimeEntry(): Promise<TimeEntry | null> { const result = await this.request<TimeEntry | null>('GET', '/me/time_entries/current'); return result; }
  • src/index.ts:386-388 (registration)
    Registration of the tools list handler for MCP ListToolsRequestSchema, which returns the array of tools including 'toggl_get_current_entry'.
    server.setRequestHandler(ListToolsRequestSchema, async () => { return { 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/verygoodplugins/mcp-toggl'

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