Skip to main content
Glama

toggl_start_timer

Start a new time entry timer in Toggl Track to track work hours with description, project, task, and tags for accurate time management.

Instructions

Start a new time entry timer

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
descriptionNoDescription of the time entry
workspace_idNoWorkspace ID (uses default if not provided)
project_idNoProject ID (optional)
task_idNoTask ID (optional)
tagsNoTags for the entry

Implementation Reference

  • MCP server handler for 'toggl_start_timer' tool call: extracts parameters, calls TogglAPI.startTimer, hydrates the entry with cache, and returns formatted success response.
    case 'toggl_start_timer': {
      const workspaceId = args?.workspace_id || defaultWorkspaceId;
      if (!workspaceId) {
        throw new Error('Workspace ID required (set TOGGL_DEFAULT_WORKSPACE_ID or provide workspace_id)');
      }
      
      const entry = await api.startTimer(
        workspaceId as number,
        args?.description as string | undefined,
        args?.project_id as number | undefined,
        args?.task_id as number | undefined,
        args?.tags as string[] | undefined
      );
      
      await ensureCache();
      const hydrated = await cache.hydrateTimeEntries([entry]);
      
      return {
        content: [{
          type: 'text',
          text: JSON.stringify({ 
            success: true,
            message: 'Timer started',
            entry: hydrated[0] 
          }, null, 2)
        }]
      };
    }
  • Tool schema definition for 'toggl_start_timer' including name, description, and input schema for parameters.
    {
      name: 'toggl_start_timer',
      description: 'Start a new time entry timer',
      inputSchema: {
        type: 'object',
        properties: {
          description: {
            type: 'string',
            description: 'Description of the time entry'
          },
          workspace_id: {
            type: 'number',
            description: 'Workspace ID (uses default if not provided)'
          },
          project_id: {
            type: 'number',
            description: 'Project ID (optional)'
          },
          task_id: {
            type: 'number',
            description: 'Task ID (optional)'
          },
          tags: {
            type: 'array',
            items: { type: 'string' },
            description: 'Tags for the entry'
          }
        }
      },
    },
  • TogglAPI.startTimer method: constructs the time entry payload with running timer (duration -1) and delegates to createTimeEntry.
    async startTimer(workspaceId: number, description?: string, projectId?: number, taskId?: number, tags?: string[]): Promise<TimeEntry> {
      const entry: Partial<CreateTimeEntryRequest> = {
        description,
        project_id: projectId,
        task_id: taskId,
        tags,
        start: new Date().toISOString(),
        duration: -1 // Negative duration indicates running timer
      };
      
      return this.createTimeEntry(workspaceId, entry);
    }
  • Core API call helper: formats and POSTs the time entry creation request to Toggl API.
    async createTimeEntry(workspaceId: number, entry: Partial<CreateTimeEntryRequest>): Promise<TimeEntry> {
      const payload: CreateTimeEntryRequest = {
        workspace_id: workspaceId,
        created_with: 'mcp-toggl',
        start: entry.start || new Date().toISOString(),
        ...entry
      };
      
      return this.request<TimeEntry>('POST', `/workspaces/${workspaceId}/time_entries`, payload);
    }
  • src/index.ts:386-388 (registration)
    Registers all tools including 'toggl_start_timer' by returning the tools array in response to ListToolsRequest.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return { tools };
    });
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states the tool starts a timer but doesn't mention what happens if a timer is already running, whether this requires authentication, or any side effects like cache updates. This leaves significant behavioral gaps for a mutation tool.

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, clear sentence with no wasted words. It's front-loaded with the essential action and resource, making it immediately understandable without unnecessary elaboration.

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?

For a mutation tool with no annotations and no output schema, the description is insufficient. It doesn't explain what the tool returns, error conditions, or behavioral constraints. Given the complexity of starting a timer (which may interact with other tools like 'toggl_get_current_entry'), more context is needed.

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?

The schema has 100% description coverage, so all parameters are documented in the schema itself. The description adds no additional parameter information beyond what's already in the schema, meeting the baseline expectation but not providing extra value.

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

Purpose4/5

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

The description clearly states the action ('Start') and resource ('a new time entry timer'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from its sibling 'toggl_stop_timer' or other time-related tools, which would be needed for a perfect score.

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?

The description provides no guidance on when to use this tool versus alternatives like 'toggl_stop_timer' or 'toggl_get_current_entry'. There's no mention of prerequisites (e.g., authentication status) or typical use cases, leaving the agent to infer usage from context 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/verygoodplugins/mcp-toggl'

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