Skip to main content
Glama

Analytics

get_analytics
Read-only

Page views, daily visitors, top pages, referrers, and AI-agent traffic (manifest/llms.txt fetches and MCP tool calls, with errors counted apart so you can see where agents stop).

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": {
      "site": "<site>"
    },
    "name": "get_analytics"
  }
}

Input Schema

NameRequiredDescriptionDefault
daysNo
siteYesSite slug (e.g. "kopitiam-muar") or id

Output Schema

NameRequiredDescriptionDefault
agentNo
dailyYes
sinceYes
viewsYes
eventsYes
top_pagesYes
top_referrersYes
daily_visitors_sumYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": {},
      +  "properties": {
      +    "agent": {
      +      "items": {
      +        "additionalProperties": {},
      +        "properties": {
      +          "count": {
      +            "type": "number"
      +          },
      +          "name": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "name",
      +          "count"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "daily": {
      +      "items": {
      +        "additionalProperties": {},
      +        "properties": {
      +          "day": {
      +            "type": "string"
      +          },
      +          "views": {
      +            "type": "number"
      +          },
      +          "visitors": {
      +            "type": "number"
      +          }
      +        },
      +        "required": [
      +          "day",
      +          "views",
      +          "visitors"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "daily_visitors_sum": {
      +      "type": "number"
      +    },
      +    "events": {
      +      "items": {
      +        "additionalProperties": {},
      +        "properties": {
      +          "conversion_rate": {
      +            "type": "number"
      +          },
      +          "count": {
      +            "type": "number"
      +          },
      +          "name": {
      +            "type": "string"
      +          },
      +          "visitors": {
      +            "type": "number"
      +          }
      +        },
      +        "required": [
      +          "name",
      +          "count"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "since": {
      +      "type": "string"
      +    },
      +    "top_pages": {
      +      "items": {
      +        "additionalProperties": {},
      +        "properties": {
      +          "path": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "views": {
      +            "type": "number"
      +          }
      +        },
      +        "required": [
      +          "path",
      +          "views"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "top_referrers": {
      +      "items": {
      +        "additionalProperties": {},
      +        "properties": {
      +          "referrer": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "views": {
      +            "type": "number"
      +          }
      +        },
      +        "required": [
      +          "referrer",
      +          "views"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "views": {
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "since",
      +    "views",
      +    "daily_visitors_sum",
      +    "events",
      +    "daily",
      +    "top_pages",
      +    "top_referrers"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and openWorldHint=false, so the safety profile is covered and the bar is lower. The description does add real semantic context beyond annotations — that agent traffic is broken out and errors are counted separately to reveal drop-off points — which is non-obvious behavior worth stating. It says nothing, however, about the time window, aggregation, or cost/latency characteristics of the call.

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?

A single compact sentence that front-loads the core metrics and reserves the parenthetical for the distinguishing AI-agent detail. No filler or repetition, though the parenthetical is dense enough that it reads as one long clause.

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?

An output schema exists, so the description is not obligated to explain return values — yet nearly all of its text is a return-value list, making it partly redundant with structured data. The genuine gap is the `days` window: nothing in prose explains that results default to 30 days and can be widened to 365, which is the main decision an agent must make when calling this.

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?

Schema description coverage is 50%: no parameters defined.

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 enumerates exactly what the tool returns — page views, daily visitors, top pages, referrers, and AI-agent traffic — which is specific and recognizable. It is a noun-phrase fragment with no verb ('returns'/'fetches'), and it does not distinguish itself from look-alike siblings such as get_insights, so it stops 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?

There is no explicit when-to-use statement, no prerequisite (e.g. site must exist), and no exclusion or alternative named. The only implied usage is 'you want analytics for a site', which the agent must infer from the metric list.

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