Skip to main content
Glama

Get policy usage

get_policy_usage
Read-onlyIdempotent

Usage report of one policy (policyId) or of a whole policy group (policyGroup: every policy of it added up, one row per policy), over the last 7 or 30 complete days (UTC), for the devices on the policies now: screen time (foreground hours of apps), the most-used apps by screen time, data usage (Wi-Fi and mobile MB) and the apps that used the most data, with a daily series. The same numbers as the policy's Insights tab in the portal. A policy whose data is not available says why (reason): no_devices, no_reports (nothing reported yet), no_settings_app or collector_off (the policy does not collect it: Nomid Settings and its statistics collector must be on), denied. Use it for usage, screen time, app usage, traffic or data consumption reports; present them as a table.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

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

Input Schema

NameRequiredDescriptionDefault
daysNoThe period: the last 7 (default) or 30 complete days (UTC), today excluded.
companyNoOptional: a `company` value from list_companies to run this in. Omit it for the connection's own company.
policyIdNoThe policy's pathName (from list_policies), for one policy's usage.
policyGroupNoA policy group's name (as list_policies shows it under group) or path name, for every policy of the group added up. Give policyId or policyGroup, not both.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the readOnly/idempotent annotations: it specifies the UTC window with today excluded, that only currently-attached devices are counted, and enumerates the reason codes (no_devices, no_reports, no_settings_app, collector_off, denied) that explain missing data. That is exactly the kind of failure-mode context an agent needs before calling.

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?

Front-loaded with the core capability and no filler sentences, but the body is a single dense run-on packed with parentheticals, which makes the reason-code list and metric list harder to scan than a short bulleted structure would.

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?

With no output schema, the description still conveys the return shape (per-policy rows with daily series and named metrics) and the empty-result signaling via reason codes. Nothing essential for correct invocation is left to inference.

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?

Schema coverage is already 100%, but the description adds meaning: policyGroup aggregates the whole group and yields one row per policy, and the two selectors are mutually exclusive. The 'added up' vs 'one row per policy' phrasing is slightly muddy but the intent survives.

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+resource (usage report of one policy or a policy group) plus the exact metrics returned: screen time, top apps, Wi-Fi/mobile MB, top data apps, daily series. This clearly separates it from siblings like get_policy_settings or get_fleet_summary, which do not report usage.

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

Usage Guidelines4/5

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

Explicitly lists the triggering intents ('usage, screen time, app usage, traffic or data consumption reports') and tells the agent to present results as a table, plus the policyId-vs-policyGroup selection rule. It does not name a competing sibling to avoid, but the usage context is unambiguous.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources