Skip to main content
Glama

Tracklution

query_sessions

Note: this tool holds data for a limited timeframe — only the last ~7-14 days are available, depending on the container.

Paginated list of visitor sessions for a date range, with filters (source and 10 has_* click-ID presence flags). Each session record includes UTM params, device info, country, event counts, contact-presence flags (no raw PII), and the full event timeline.

DATA RETENTION: the v2 store currently holds only the last ~7-14 days. Older date_from values pass validation but return empty rows. A "warnings" array is added when date_from is outside the retention window.

USE WHEN:

  • User wants to loop through all sessions for a given date range, inspecting data from each one in detail.

  • User wants to enumerate sessions matching a filter (e.g. "list sessions from organic with adblock this week").

  • User explicitly wants raw session records, not aggregates.

DON'T USE for session counts, top sources, or "how many sessions" / conversion-rate questions — use get_report or get_summary (orders of magnitude faster). For a single session by ID, use list_sessions.

Pagination is cursor-based: pass the returned meta.cursor.next_cursor back as cursor on the next call. Stop when has_more is false. Backend caps date range at 30 days.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cursorNoPagination cursor from a previous response's meta.cursor.next_cursor.
sourceNoFilter by traffic source
date_toYesEnd date (YYYY-MM-DD)
has_epikNoOnly sessions arriving with a Pinterest epik
per_pageNoItems per page (default 50, max 1000 on v2). v2 SQLite reads are fast enough to prefer larger pages over more cursor round-trips.
date_fromYesStart date (YYYY-MM-DD)
has_adfcdNoOnly sessions arriving with an Adform adfcd
has_gclidNoOnly sessions arriving with a Google Ads gclid
has_fbclidNoOnly sessions arriving with a Facebook fbclid
has_lsclidNoOnly sessions arriving with an lsclid
has_scclidNoOnly sessions arriving with a Snapchat scclid
has_ttclidNoOnly sessions arriving with a TikTok ttclid
has_ga4clidNoOnly sessions arriving with a GA4 client ID
has_msclkidNoOnly sessions arriving with a Microsoft msclkid
has_rdt_cidNoOnly sessions arriving with a Reddit rdt_cid
server_nameNoServer name (required when connected to multiple servers).
container_idYesContainer ID (starts with "trc_").
has_li_fat_idNoOnly sessions arriving with a LinkedIn li_fat_id

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
metaYes
sessionsYes
warningsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and does so thoroughly: it discloses retention limits, empty-result behavior for old dates, a warnings array, cursor-based pagination with has_more, a 30-day range cap, and the absence of raw PII. This is exemplary for a tool of this complexity.

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 well-structured with Note, USE WHEN, DON'T USE, and pagination sections, and the most important constraint (retention) is front-loaded. However, the retention warning appears twice in nearly identical form, which is a small redundancy.

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 high parameter count, the presence of an output schema, and no annotations, the description covers everything needed for correct invocation: retention caveats, pagination mechanics, filter semantics, excluded use cases, and data content. Nothing critical is missing.

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 100%, so the baseline is 3, and the description adds cross-parameter meaning beyond individual schema entries: it explains cursor chaining via meta.cursor.next_cursor, the 30-day backend limit on date_from/date_to, and the role of the has_* filters as click-ID presence flags. This is a meaningful supplement to the schema.

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 states a specific verb and resource: a paginated list of visitor sessions for a date range with filters and per-session record details. It also differentiates itself from siblings by naming list_sessions for single-session lookup and get_report/get_summary for aggregated questions.

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 DON'T USE sections give the agent clear decision rules, including concrete alternatives like get_report, get_summary, and list_sessions. This leaves no ambiguity about when the tool is or isn't appropriate.

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