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_statusto 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:
- AI calls
get_tracking_statusto see current timer - AI calculates duration: "Timer running for 2 hours 15 minutes on: Login Feature"
- AI shows preview and waits for "CONFIRM"
- AI calls
stop_time_trackingonly after confirmation - 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:
- AI checks
get_tracking_statusfor current timer - AI shows: "Stopping timer (2h 15m), adding comment: 'Completed OAuth integration'"
- AI waits for confirmation
- AI calls
stop_time_trackingwith summary - AI confirms timer stopped and comment added
Common Use Cases
- Time Tracking Basics - Stop timers when ending work sessions
- Time Tracking Hygiene - Stop long-running timers and clean up
- Editor Workflow - Stop timer and log progress when switching tasks
- Check Status First - Always check timer status before stopping
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_statusto 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_statusfirst 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
Related Tools
Often used together with:
- get_tracking_status - Check timer status before stopping
- start_time_tracking - Start timer when beginning work
- add_task_comment - Add detailed comments after stopping timer
- Least-Privilege Workflows - Safe write workflow patterns
