activitywatch_run_query
Run a query in ActivityWatch
This record as markdown: /tools/8bitgentleman-activitywatch-mcp-server/activitywatch-run-query.md
What activitywatch_run_query does on ActivityWatch MCP Server
AI agents invoke activitywatch_run_query to trigger actions in ActivityWatch MCP Server. What it does depends on the arguments the agent supplies, and its effects often reach beyond the immediate call: builds kicked off, notifications sent, workflows started.
Why activitywatch_run_query is rated High
This tool allows execution of queries against a time-tracking database. While individual queries are read-like in nature, the 'run_query' interface permits arbitrary query execution, making this an Execute category tool rather than Read. The high severity reflects the sensitive nature of the data (full browsing history, application usage patterns) that could be exfiltrated.
From the tool's definition Tool name 'run_query' combined with description 'Run a query in ActivityWatch' indicates execution of arbitrary queries against the ActivityWatch database.
Attacks that exploit this kind of access
The rule that runs activitywatch_run_query safely
PolicyLayer is an MCP gateway: it sits between your AI agents and ActivityWatch MCP Server, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For activitywatch_run_query, this is the rule to start with:
activitywatch_run_query stays usable, but rate-capped: a runaway agent can't fire it dozens of times a minute. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect ActivityWatch MCP Server, apply this rule, and every activitywatch_run_query call is checked against it from then on.
Questions about activitywatch_run_query
Run a query in ActivityWatch. It is categorised as a Execute tool in the ActivityWatch MCP Server MCP Server, which means it can trigger actions or run processes. Use rate limits and argument validation.
Register the ActivityWatch MCP Server MCP server in PolicyLayer and add a rule for activitywatch_run_query: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches ActivityWatch MCP Server. Nothing to install.
activitywatch_run_query is a Execute tool with high risk. Execute tools should be rate-limited and have argument validation enabled.
Yes. Add a rate_limit block to the activitywatch_run_query rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for activitywatch_run_query. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
activitywatch_run_query is provided by the ActivityWatch MCP Server MCP server (8bitgentleman/activitywatch-mcp-server). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on ActivityWatch MCP Server, and thousands of servers like it.
Across the catalogue