Skip to main content
Glama

PostHog query trends

posthog_query_trends
Read-onlyIdempotent

Query event trends from PostHog (pageviews, signups, DAU, etc. over time). Returns time-series data. Only works if PostHog is connected.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
eventsNoEvents to query. Each: { id: "$pageview", name: "Page Views", math: "total" }. Defaults to $pageview.
date_toNoEnd date (default: now)
intervalNoGrouping interval (default: day)
companyIdYesFreedomOS company id to act within (you must be a member). Required for company-scoped tools.
date_fromNoStart date: "-7d", "-30d", "-90d", "2024-01-01" (default: -7d)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / events / items / properties / id / description
      Previous value: -"Event name (e.g., \"$pageview\", \"sign_up_completed\")"New value: +"Event name (e.g., \"$pageview\", \"sign_up_completed\", \"$autocapture\")"
  2. First observed

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already convey read-only, idempotent, and non-destructive behavior. The description adds useful context beyond those annotations: it clarifies the return type ('time-series data') and a dependency ('Only works if PostHog is connected'), which helps an agent reason about expected results and failure conditions.

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

Conciseness5/5

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

Two short sentences with no filler. The core purpose is front-loaded, the return type is stated immediately after, and the prerequisite is included without bloating the description.

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 read-only query tool with well-documented parameters and strong annotations, the description is nearly complete. The only notable gap is the absence of any detail about the time-series output shape, since no output schema exists and the description stops at 'time-series data.'

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all parameters thoroughly, including defaults and examples. The description adds no parameter-level detail beyond the schema, so the baseline 3 is appropriate.

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 states a specific action and resource: 'Query event trends from PostHog' with concrete examples (pageviews, signups, DAU) and explicitly says it returns time-series data. This is clear, but it does not differentiate from sibling tools like posthog_query_funnel or get_monthly_trends, so it falls 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 Guidelines2/5

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

The only usage guidance is 'Only works if PostHog is connected,' which is a prerequisite rather than guidance on when to choose this tool over alternatives. There is no mention of when to prefer this over posthog_query_funnel, posthog_hogql, or other analytics tools, and no exclusions are stated.

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