Skip to main content
Glama

Kleap

Get Site Analytics

get_analytics
Read-only

Use this when the user asks about traffic, visitors, or which pages/referrers are performing on their PUBLISHED site. Backed by the same analytics as the Kleap dashboard's Visitors view. Returns zeroed data with configured:false if the app has never been published (analytics is set up automatically on publish). Requires the analytics:read scope — sessions connected BEFORE this tool shipped don't have it: on a 403 INSUFFICIENT_SCOPE error, tell the user to disconnect and reconnect the Kleap integration (re-authorize) to grant the scope.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
app_idYesThe app id to fetch analytics for
periodNoTime window: '7d' (default), '30d', or '90d'
contextYesWhy this call, in one short sentence. Used to improve the connector; never include credentials or personal data.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
app_idNo
periodNo
visitorsNo
pageviewsNo
referrersNo
top_pagesNo
configuredNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare readOnlyHint and destructiveHint, so the safety profile is covered. The description goes well beyond that by revealing that unpublished apps return zeroed data with configured:false, that analytics is set up automatically on publish, that the analytics:read scope is required, and that older sessions may 403 with INSUFFICIENT_SCOPE along with a concrete remediation step.

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 front-loaded with the primary trigger and each subsequent sentence carries distinct value: data provenance, unpublished-app behavior, and scope/error remediation. No sentence is redundant or filler relative to the structured schema and annotations.

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?

For a read-only analytics tool with an output schema and complete input schema, the description covers the key missing context: when to call it, what happens before publication, required scope, and how to recover from auth failures. An agent has everything needed to select and invoke the tool correctly.

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 schema already documents app_id, period, and context thoroughly. The description adds meaningful semantic context: app_id must refer to a published site, and unpublished apps produce configured:false results. It does not need to repeat period details because the schema already provides the enum and default.

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 + resource combination: fetching analytics for traffic, visitors, and page/referrer performance on published sites. It also grounds the tool by referencing the Kleap dashboard's Visitors view, which clearly distinguishes it from siblings like get_search_console or get_form_submissions.

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 explicitly says 'Use this when the user asks about traffic, visitors, or which pages/referrers are performing on their PUBLISHED site,' which gives a clear trigger. It also covers the unpublished-app edge case and the insufficient-scope handling path. It does not explicitly name when-not-to-use alternatives, so it stops just short of a 5.

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