# activitywatch_run_query

Run a query in ActivityWatch

Agent View of the PolicyLayer registry record for `activitywatch_run_query`. HTML page: https://policylayer.com/tools/8bitgentleman-activitywatch-mcp-server/activitywatch-run-query

## Facts

- Tool: `activitywatch_run_query`
- Server: ActivityWatch MCP Server (`8bitgentleman/activitywatch-mcp-server`) — https://policylayer.com/tools/8bitgentleman-activitywatch-mcp-server.md
- Homepage: https://github.com/8bitgentleman/activitywatch-mcp-server
- Risk category: Execute (High risk)
- Registry record: grade D, identity unverified
- Server rate-limited: no
- Parameters: 0
- Recommended policy verdict: Rate-limited

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "activitywatch_run_query",
    "arguments": {}
  }
}
```

## 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 own definition: "Tool name 'run_query' combined with description 'Run a query in ActivityWatch' indicates execution of arbitrary queries against the ActivityWatch database."

## Use case

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.

## Recommended policy (PolicyLayer)

Verdict: **Rate-limited**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches ActivityWatch MCP Server:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "activitywatch_run_query": {
      "limits": [
        {
          "counter": "activitywatch_run_query_rate",
          "window": "minute",
          "max": 10,
          "scope": "grant"
        }
      ]
    }
  }
}
```

## Other tools on ActivityWatch MCP Server (9)

- `activitywatch_delete_category` — Destructive — https://policylayer.com/tools/8bitgentleman-activitywatch-mcp-server/activitywatch-delete-category.md
- `activitywatch_get_categories` — Read — https://policylayer.com/tools/8bitgentleman-activitywatch-mcp-server/activitywatch-get-categories.md
- `activitywatch_get_events` — Read — https://policylayer.com/tools/8bitgentleman-activitywatch-mcp-server/activitywatch-get-events.md
- `activitywatch_get_settings` — Read — https://policylayer.com/tools/8bitgentleman-activitywatch-mcp-server/activitywatch-get-settings.md
- `activitywatch_get_uncategorized_events` — Read — https://policylayer.com/tools/8bitgentleman-activitywatch-mcp-server/activitywatch-get-uncategorized-events.md
- `activitywatch_list_buckets` — Read — https://policylayer.com/tools/8bitgentleman-activitywatch-mcp-server/activitywatch-list-buckets.md
- `activitywatch_query_examples` — Read — https://policylayer.com/tools/8bitgentleman-activitywatch-mcp-server/activitywatch-query-examples.md
- `activitywatch_add_category` — Write — https://policylayer.com/tools/8bitgentleman-activitywatch-mcp-server/activitywatch-add-category.md
- `activitywatch_update_category` — Write — https://policylayer.com/tools/8bitgentleman-activitywatch-mcp-server/activitywatch-update-category.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=8bitgentleman-activitywatch-mcp-server · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/8bitgentleman-activitywatch-mcp-server
