Skip to main content
Glama

get_app_usage

Retrieve per-application time-on-task for the last N hours, including app names, foreground seconds, and focus sessions, sorted by usage time.

Instructions

Return per-application time-on-task over the last N hours.

Returns a list of (app_name, foreground_seconds, focus_sessions) entries, sorted by foreground time descending.

USE WHEN: you want a clean app-level breakdown without OCR/keyword data. NOT FOR: full activity summary including content — use get_activity_summary.

BEHAVIOR: pure read from foreground-window log. No side effects. Granularity is per-second.

PARAMETERS: hours: lookback window. Range 1-24. Default 1.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hoursNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Describes as 'pure read from foreground-window log. No side effects.' and specifies granularity (per-second). No annotations exist, so this is sufficient, though could mention data retention or access constraints.

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

Conciseness5/5

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

Extremely concise: three short sections with no fluff. Each sentence serves a purpose (overview, use case, behavior, parameter). Perfectly front-loaded.

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

Completeness5/5

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

Given the tool's simplicity (1 param, output schema exists), the description covers purpose, usage, behavior, and parameter completely. No gaps remain.

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

Parameters4/5

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

The parameter 'hours' is described with range (1-24) and default (1), adding value beyond the schema. Schema coverage is 0%, so description compensates well, though could clarify unit (hour).

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?

The description clearly states 'Return per-application time-on-task over the last N hours' with verb, resource, and scope. It also distinguishes from sibling tools like get_activity_summary, making it unambiguous.

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

Usage Guidelines5/5

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

Explicit 'USE WHEN' and 'NOT FOR' sections provide clear context and name an alternative tool (get_activity_summary), guiding the agent on appropriate usage.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ContextPulse/contextpulse'

If you have feedback or need assistance with the MCP directory API, please join our Discord server