Stop Time Tracking via MCP: Logging Outcomes and Summaries

Developer reference for the stop_time_tracking MCP tool. Learn how to stop the current timer, log outcomes, and add summaries. Includes safety checks, confirmation patterns, example tool calls, natural language prompts, edge cases, and troubleshooting.

Tool Overview

Purpose

The stop_time_tracking tool stops the currently running timer and logs the time spent. Use this tool to end work sessions, switch tasks, or log time with an optional summary of what was accomplished.

⚠️ Write operation: This tool modifies data - always use confirmation patterns and preview duration before calling it.

Input Parameters

All parameters are optional. If no summary is provided, the timer is stopped without a summary comment.

Output Format

The tool returns the stopped tracking object with duration and summary:

{
  "task_id": 123,
  "task_title": "Implement login feature",
  "started_at": "2026-03-19T10:30:00Z",
  "stopped_at": "2026-03-19T12:45:00Z",
  "duration_minutes": 135,
  "duration_hours": 2.25,
  "summary": "Completed OAuth integration",
  "comment_id": 5
}

Response Fields

  • task_id: ID of the task that was being tracked
  • task_title: Title of the task (for convenience)
  • started_at: Timestamp when timer was started
  • stopped_at: Timestamp when timer was stopped
  • duration_minutes: Total duration in minutes
  • duration_hours: Total duration in hours (decimal)
  • summary: Summary text if provided (null if not provided)
  • comment_id: ID of the comment created if summary was provided (null otherwise)

Safety Checks and Confirmation Patterns

⚠️ Always Preview Duration Before Stopping

Never let AI stop a timer without showing what will happen. Use these patterns:

  • Check Status First: Call get_tracking_status to see current timer
  • Preview Duration: Show how long the timer has been running
  • Show Summary: Display summary text if provided
  • Confirmation Token: Require "CONFIRM" before calling stop_time_tracking

Learn more about safe write workflows →

Safe Prompt Pattern

✅ Safe Prompt Template:

"I want to stop the timer. 
First, check what timer is running and show me how long it's been running. 
Show me the summary I'll add (if any), then wait for CONFIRM before stopping. 
If I don't type CONFIRM, don't stop anything."

Example Tool Calls

Example 1: Stop Timer Without Summary

Tool Call (JSON):

{
  "tool": "stop_time_tracking",
  "arguments": {}
}

Returns: Stopped tracking object with duration, no comment created

Example 2: Stop Timer With Summary

Tool Call (JSON):

{
  "tool": "stop_time_tracking",
  "arguments": {
    "summary": "Completed OAuth integration and wrote tests"
  }
}

Returns: Stopped tracking object with duration and summary, comment created on task

Natural Language Prompt Examples

Safe Timer Stop with Preview

User Prompt:

"Stop the timer. Show me how long it's been running first, then wait for CONFIRM."

AI Behavior:

  1. AI calls get_tracking_status to see current timer
  2. AI calculates duration: "Timer running for 2 hours 15 minutes on: Login Feature"
  3. AI shows preview and waits for "CONFIRM"
  4. AI calls stop_time_tracking only after confirmation
  5. AI confirms timer was stopped

Stop with Summary

User Prompt:

"Stop the timer and add a summary: 'Completed OAuth integration'. Show me what you'll do first."

AI Behavior:

  1. AI checks get_tracking_status for current timer
  2. AI shows: "Stopping timer (2h 15m), adding comment: 'Completed OAuth integration'"
  3. AI waits for confirmation
  4. AI calls stop_time_tracking with summary
  5. AI confirms timer stopped and comment added

Common Use Cases

Edge Cases

No Timer Running

Situation: No timer is currently active

Response:

{
  "error": "no_timer_running",
  "message": "No timer is currently running"
}

Handling: This is normal - check if timer was already stopped or never started

Timer Not Found

Situation: Timer was stopped or cleared by another process

Response: Same as "no timer running" error

Handling: Verify timer status using get_tracking_status

Troubleshooting

No Timer Running

Symptom: Error about no timer running

Causes:

  • Timer was never started
  • Timer was already stopped
  • Timer was cleared by another process

Fix:

  • Call get_tracking_status to verify timer state
  • If no timer, start one using start_time_tracking
  • Check if timer was stopped in another session

Best Practices

Using stop_time_tracking Safely

  • ✅ Always call get_tracking_status first to check timer state
  • ✅ Show duration preview before stopping
  • ✅ Display summary text if provided
  • ✅ Require explicit confirmation (CONFIRM token)
  • ✅ Add meaningful summaries to document what was accomplished
  • ✅ Stop timer when switching tasks or ending work sessions
  • ✅ Use summaries to create audit trail of work completed

Often used together with:

Related Articles