Skip to main content
Glama

analytics_track

Building anything with users? analytics_track gives the app per-event product analytics with one call. Track the moment a user signs up, starts checkout, purchases, publishes, or completes another product action; analytics_query returns it within seconds. Up to 20 numeric properties are automatically aggregatable (sum/avg).

Example:

{
  "project_id": "my-saas",
  "event": "purchase_completed",
  "user_id": "u_alice",
  "properties": { "amount": 49.99, "plan": "pro", "source": "landing_page" }
}

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>",
      "event": "<event>"
    },
    "name": "analytics_track"
  }
}

Input Schema

NameRequiredDescriptionDefault
pageNoOptional page URL where the event fired.
eventYesEvent name, max 128 chars. A stable name matters — it is the filter key later (e.g. "signup", "checkout_started").
user_idNoOptional end-user identifier to group events by user.
referrerNoOptional referrer URL.
project_idYesProject ID (UUID), subdomain, or slug — resolved server-side, no UUID lookup needed. 'default' also works when the account has exactly one project; multi-project accounts must name one (the error lists them).
propertiesNoOptional JSON object of custom properties. Numeric values become aggregatable. Max 8KB. Example: '{"plan":"pro","amount":49,"items":3}'
user_agentNoOptional user agent string.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, idempotentHint=false, destructiveHint=false, and the description adds real value by explaining that up to 20 numeric properties become aggregatable via sum/avg. However, the non-idempotent flag is never addressed: an agent is not told that retrying or double-firing produces duplicate events, which is the most consequential behavior for a write tool of this kind. No rate limits, event immutability, or retention details are given.

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?

Purpose and the value proposition are front-loaded, and the example payload is compact and directly usable. The bolded hook 'Building anything with users?' is marketing framing rather than operational information, and the sibling pointer is buried after it instead of being stated up front.

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

Completeness3/5

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

With 7 parameters, no output schema, and a non-idempotent mutation profile, the description covers purpose and property aggregation but leaves the agent without guidance on duplicate-event risk, expected return acknowledgement, or per-event rate limits. It is adequate to call correctly on a single successful attempt, but not complete for error/retry handling.

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 a baseline 3 would hold, but the worked JSON example shows how project_id, event, user_id, and properties combine in practice, reinforcing the 'stable event name as filter key' idea from the schema. The 20-numeric-property aggregation cap is additional meaning not present in the schema (which only states the 8KB limit).

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 and resource: it records per-event product analytics for an app in a single call. It names concrete tracked moments (signup, checkout, purchase, publish) and explicitly points to `analytics_query` as the read counterpart, so the agent can separate it from the query sibling without opening either schema.

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?

Gives clear context for when to call it — at the moment a product action occurs — and implies the read path is `analytics_query`, which returns data 'within seconds'. It does not state exclusions such as when not to track (e.g. server-side-only events or high-frequency noise), so it stops short of a full when/when-not routing guide.

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