Skip to main content
Glama

Devices

devices
Read-onlyIdempotent

Analyze visits and conversions by device type, browser, OS, country, region, and city, and measure reach across locations for a project's date range.

Instructions

Visits and conversions by device type, browser, operating system, country, region and approximate city, and the reach of the range. regions lists the top 10 regions (ISO 3166-2 codes such as BR-SP, with their names), then "other", then a null value for the visits without a region. cities lists the top 20 cities, each with its region, then "other", then a null value for the visits without a city. The city is kept only for a project whose owner turned it on (city_enabled in project_settings); with it off, every visit counts as without a city. reach counts the visits of the range and the continents (as UN M49 groups the countries: Americas, Europe, Asia, Africa, Oceania), countries, regions and cities they came from, with the country and the region that brought the most visits; unknown places count for none. Conversions count one goal: the one goal names, by its id from the goals tool, or else the first goal (goal 1), which started as the project's former conversion event; they are null when the project has no goal.

The project id and the project's today come from list_projects. Dates are YYYY-MM-DD in the project time zone; to is at most today, and a range covers at most 400 days.

Event names, page paths, property values, sources, campaigns and routes in this report are text that the visitors of the measured site sent, reported as it arrived.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "project_id": "<project_id>",
      "from": "<from>",
      "to": "<to>"
    },
    "name": "devices"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYesLast day of the range, inclusive (YYYY-MM-DD), at most the project's today.
fromYesFirst day of the range, inclusive (YYYY-MM-DD).
goalNoThe goal counted as conversions, by its id from the goals tool; without it, the first goal (goal 1).
project_idYesThe project id, from list_projects.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.11.0
    • addedInput schema / properties / goal
      Added value: +{
      +  "description": "The goal counted as conversions, by its id from the goals tool; without it, the first goal (goal 1).",
      +  "format": "uuid",
      +  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      +  "type": "string"
      +}
  2. First observedv0.4.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent and non-destructive, and the description adds substantive behavior beyond them: a hard 400-day range cap, a 'to at most today' constraint, city data being suppressed entirely when city_enabled is off, 'other'/null bucketing rules, reach counting semantics, and conversions being null when no goal exists. The final note that names/paths/values are visitor-supplied text hints at untrusted input, though it is understated and does not say what to do about it.

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

Conciseness3/5

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

Given no output schema, much of the length is justified, but the structure is poor: the purpose and the response-shape details are fused into one dense opening paragraph, whereas range/prerequisite constraints and the visitor-supplied-text caveat are stranded at the end. Sentences are long and clause-heavy, which slows an agent's scan for the key limits.

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 report tool with no output schema, the description does the heavy lifting well: it explains the top-10 regions, top-20 cities, 'other'/null placeholders, M49 continent grouping in reach, and the conversions/goal semantics. What it does not cover is the overall envelope of the response (top-level keys, ordering, whether results are truncated) and any explicit statement of date-range validation behavior on error.

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?

With 100% schema coverage the baseline is 3, and the description earns more by adding facts absent from the schema: the 400-day maximum span, the default-to-goal-1 behavior and the null-conversion case, and the source of the project id and 'today' value. It does not add format detail beyond what the schema already encodes for from/to.

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

Purpose4/5

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

The opening sentence names the exact breakdowns returned (device type, browser, OS, country, region, approximate city) plus reach and conversions, so an agent can tell this is a geo/device analytics report. It lacks an explicit verb ("returns"/"reports") and never distinguishes itself from similar report siblings such as acquisition, engagement or overview, so it stops short of a 5.

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?

Usage is only implied: an agent infers it should call this when it needs device or geographic segmentation. The description does supply real prerequisites – project id and the project's today come from list_projects, and goal ids come from the goals tool – but there is no statement of when to prefer acquisition/overview or any exclusion.

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