Skip to main content
Glama
luminarylane

GA4 MCP Server

by luminarylane

ga4_get_top_pages

Identify top pages by sessions and analyze key metrics like pageviews, bounce rate, and average session duration in GA4.

Instructions

Get top pages by sessions. Shows page path, sessions, users, pageviews, bounce rate, and average session duration.

Args: property_id: GA4 property ID (numeric). Leave empty to use GA4_PROPERTY_ID env var. days: Lookback period in days (default: 28). row_limit: Max rows to return (default: 20).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
daysNo
row_limitNo
property_idNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations, the description carries the transparency burden. It adds useful behavioral detail by explaining the property_id env var fallback and implying a read-only report via 'Get'. However, it omits potential rate limits, authentication requirements, or data freshness considerations.

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?

The description is concise and well-structured: a clear purpose sentence followed by a bulleted list of arguments. Every sentence contributes value, with no redundancy or filler.

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?

Given that an output schema exists and parameters are well documented, the description is nearly complete for a simple reporting tool. Minor gaps include not mentioning authentication prerequisites or potential caveats like data lag, but these are not critical for basic usage.

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

Parameters5/5

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

The schema provides only types and defaults, but the description fully compensates by giving meaning to each parameter: property_id (numeric GA4 ID with env var fallback), days (lookback period), and row_limit (max rows). This is exactly what is needed when schema description coverage is 0%.

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 clearly states the tool retrieves top pages ranked by sessions and enumerates the specific metrics returned (page path, sessions, users, etc.). This makes its function unambiguous and distinguishes it from sibling tools like ga4_get_traffic_sources or ga4_get_conversions.

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?

There is no explicit guidance on when to use this tool versus alternatives. The description only explains what it does and its parameters, leaving usage context implied rather than providing clear selection criteria or exclusions.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/luminarylane/ga4-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server