ActivityWatch MCP Server

activitywatch_run_query

Execute queries on ActivityWatch time tracking data to analyze application usage, browsing history, and productivity patterns using a structured query language.

Instructions

Run a query in ActivityWatch's query language

Input Schema

NameRequiredDescriptionDefault
nameNoOptional name for the query (used for caching)
queryYesMUST BE A SINGLE STRING containing all query statements separated by semicolons. DO NOT split into multiple strings.
timeperiodsYesTime periods to query. Format: ['2024-10-28/2024-10-29'] where dates are in ISO format and joined with a slash

Input Schema (JSON Schema)

{ "properties": { "name": { "description": "Optional name for the query (used for caching)", "type": "string" }, "query": { "description": "MUST BE A SINGLE STRING containing all query statements separated by semicolons. DO NOT split into multiple strings.", "examples": [ "events = query_bucket('aw-watcher-window_UNI-qUxy6XHnLkk'); RETURN = events;" ], "items": { "description": "Complete query with all statements in one string separated by semicolons", "type": "string" }, "maxItems": 1, "minItems": 1, "type": "array" }, "timeperiods": { "description": "Time periods to query. Format: ['2024-10-28/2024-10-29'] where dates are in ISO format and joined with a slash", "examples": [ "2024-10-28/2024-10-29" ], "items": { "description": "Time period in format 'start-date/end-date'", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}/[0-9]{4}-[0-9]{2}-[0-9]{2}$", "type": "string" }, "maxItems": 10, "minItems": 1, "type": "array" } }, "required": [ "timeperiods", "query" ], "type": "object" }

You must be authenticated.

Other Tools from ActivityWatch MCP Server

Related Tools

ID: msnzvab06f