Skip to main content
Glama

Visits

visits
Read-onlyIdempotent

Query and filter browser-tab records by date range and dimensions, returning newest-first, paginated details and the total matching records for analytics.

Instructions

The visits of a range, newest first, 50 a page, each with its entry page, page views, first named events, failed requests, source, campaign, country, region and approximate city (null unless the project keeps the city), plus the total of matching visits. A visit is one browser tab; nothing links two of them unless the site identified the person. Each visit also has its visitor kind: first_visit, first_this_month, first_today or again_today, null when the project does not count unique visitors or the visit carried none; the first three count as a unique visitor of their day, first_visit and first_this_month as one of their month, and again_today in neither. Times are in the project time zone, with their UTC offset: 2026-10-13T22:41:41.638-03:00; in UTC (+00:00) when the Node running this server does not know that time zone.

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": "visits"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYesLast day of the range, inclusive (YYYY-MM-DD), at most the project's today.
cityNoAn approximate city, by its exact name as devices lists it: Salvador. Needs region, since the same name exists in several regions.
fromYesFirst day of the range, inclusive (YYYY-MM-DD).
eventNoA named event the visit sent.
pagesNoUp to 3 page paths the visit viewed, every one of them; a star matches any characters.
routeNoA request the visit made: POST /orders/:id.
cursorNoThe next_cursor of the previous page.
deviceNo
failedNotrue: the visit had a failed request; with route, on that route.
regionNoISO 3166-2 region code: BR-SP.
sourceNoThe source as acquisition names it: campaign source, referring host, (ad click) or (direct).
channelNo
countryNoTwo-letter country code: BR.
campaignNoThe utm_campaign.
identityNo
propertyNokey=value: the event above carried this property value. Needs event.
visitorsNoOnly the visits that counted as unique visitors: day keeps first_visit, first_this_month and first_today, so each browser shows once per day and total is the unique visitors of the day (the sum of the days over a longer range); month keeps first_visit and first_this_month, once per calendar month; new keeps first_visit. An empty list when the project does not count unique visitors.
project_idYesThe project id, from list_projects.
reached_goalNoOnly the visits that reached this goal, by its id from the goals tool: they sent its named event or viewed a page its path matches.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.11.0
    • addedInput schema / properties / reached_goal
      Added value: +{
      +  "description": "Only the visits that reached this goal, by its id from the goals tool: they sent its named event or viewed a page its path matches.",
      +  "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. Changed1 schema field changedv0.8.0
    • addedInput schema / properties / visitors
      Added value: +{
      +  "description": "Only the visits that counted as unique visitors: day keeps first_visit, first_this_month and first_today, so each browser shows once per day and total is the unique visitors of the day (the sum of the days over a longer range); month keeps first_visit and first_this_month, once per calendar month; new keeps first_visit. An empty list when the project does not count unique visitors.",
      +  "enum": [
      +    "day",
      +    "month",
      +    "new"
      +  ],
      +  "type": "string"
      +}
  3. Changed1 schema field changedv0.6.1
    • addedInput schema / properties / city
      Added value: +{
      +  "description": "An approximate city, by its exact name as devices lists it: Salvador. Needs region, since the same name exists in several regions.",
      +  "maxLength": 100,
      +  "minLength": 1,
      +  "type": "string"
      +}
  4. First observedv0.4.0

TDQS

A4.2/5.0
Behavior5/5

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

Annotations already declare readOnly, idempotent, non-destructive behavior, but the description adds substantial extra context: 50-per-page pagination with cursor, newest-first ordering, timezone and UTC offset handling, null city conditions, visitor-kind counting semantics, and that report text is raw visitor-supplied data. This is unusually rich disclosure beyond the annotations.

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?

The description is dense but front-loads the primary purpose and then layers important semantics. The sentences are long, especially the field list and visitor-kind explanation, but each generally earns its place for a complex 19-parameter reporting tool.

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?

There is no output schema, so the description carries the burden of explaining returned values, and it does so by naming the included fields, pagination behavior, total count, and timezone format. For a complex reporting tool with 19 parameters, it is largely complete, though it could do more to route agents among sibling report tools.

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 description coverage is already 84%, so the baseline is 3. The description adds real meaning for key parameters: visitors explains unique-visitor counting across day/month/new, cursor points to the previous page's next_cursor, dates explain range limits, and project_id points to list_projects. It does not explain every filter such as device, channel, or identity, but it compensates for much of the remaining gap.

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 description clearly states it returns visits for a date range, newest first, 50 per page, and enumerates the included fields. It defines a visit as one browser tab. It does not explicitly contrast with sibling tools such as visit_timeline or requests, 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 Guidelines4/5

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

It gives clear operational context: project_id and today come from list_projects, dates are YYYY-MM-DD in project time, to is capped at today, and ranges are limited to 400 days. Cursor pagination is explained. It lacks explicit when-to-use versus sibling alternatives or when-not guidance, so it is not a 5.

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