Skip to main content
Glama
tomoyanakano

screentime-mcp-server

by tomoyanakano

screentime_sql

Execute custom SQL queries against the macOS Screen Time database to retrieve app usage data. Use the ZOBJECT table for raw pipe-separated results.

Instructions

Run a custom SQL query against macOS knowledgeC.db (Screen Time database). Use ZOBJECT table with ZSTREAMNAME='/app/usage'. Timestamps use Core Data epoch (978307200 offset from Unix). Returns raw pipe-separated results.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesSQL query to execute against knowledgeC.db

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the load. It discloses non-obvious behavioral facts: the ZOBJECT table, ZSTREAMNAME filter, Core Data epoch offset, and pipe-separated return format. However it omits whether the query is read-only, whether writes/deletes are blocked, and any limits or error behavior for a raw SQL execution tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three compact sentences covering purpose, query target, and return format. Front-loaded with the action; no wasted prose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-param raw query tool with no output schema, the description covers the key domain gotchas (table, stream name, epoch offset, output format). Missing only the safety profile (read-only vs write) and any execution constraints.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% for the single 'sql' parameter, so the schema already documents it. The description adds useful domain context (which table and stream to target, the epoch offset) that helps write a correct query, but not parameter-level syntax.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (Run a custom SQL query) and resource (macOS knowledgeC.db / Screen Time database). Distinguishes itself from sibling get_screentime by being the raw/arbitrary query tool versus a canned getter.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Implies usage context ('custom SQL query', names the ZOBJECT table and stream name) but never states when to prefer this over get_screentime or when to avoid it. Usage is inferred, not articulated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools