Skip to main content
Glama

Get analytics

get_analytics
Read-onlyIdempotent

Get an analytics summary for a date range. Returns total posts, status breakdown (published, failed, scheduled), per-platform stats, and daily post counts. Optional filters narrow every figure to matching posts; compare adds the equal-length previous window under previous (available for windows of 15 days or fewer — the 30-day statistics-retention cap applies). Use this when the user asks how their content performed overall, across channels and over a date range.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYesEnd date in ISO format (e.g. 2025-01-31).
tzNoIANA timezone (e.g. "Asia/Karachi") that sets where each day starts and ends and how daily counts are grouped. Defaults to UTC; pass the user's zone so 'today' and daily figures match their calendar.
fromYesStart date in ISO format (e.g. 2025-01-01).
compareNoAlso return the previous equal-length window as `previous` / `previousWindow`.
labelIdsNoComma-separated label ids; a post matches when it carries ANY of them.
mediaTypeNoBy the post's first media file: text (no media), image or video.
platformsNoComma-separated platform keys to include, e.g. "x,linkedin".
channelIdsNoComma-separated channel ids to include, e.g. "12,15".
postFormatNoOnly single posts or only threads.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
toNo
fromNo
byDayNo
failedNo
partialNo
previousNo
publishedNo
scheduledNo
byPlatformNo
totalPostsNo
previousWindowNo
publishedTimesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / tz
      Added value: +{
      +  "description": "IANA timezone (e.g. \"Asia/Karachi\") that sets where each day starts and ends and how daily counts are grouped. Defaults to UTC; pass the user's zone so 'today' and daily figures match their calendar.",
      +  "type": "string"
      +}
  2. Changed6 schema fields changed
    • addedInput schema / properties / channelIds
      Added value: +{
      +  "description": "Comma-separated channel ids to include, e.g. \"12,15\".",
      +  "type": "string"
      +}
    • addedInput schema / properties / compare
      Added value: +{
      +  "description": "Also return the previous equal-length window as `previous` / `previousWindow`.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / labelIds
      Added value: +{
      +  "description": "Comma-separated label ids; a post matches when it carries ANY of them.",
      +  "type": "string"
      +}
    • addedInput schema / properties / mediaType
      Added value: +{
      +  "description": "By the post's first media file: text (no media), image or video.",
      +  "enum": [
      +    "text",
      +    "image",
      +    "video"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / platforms
      Added value: +{
      +  "description": "Comma-separated platform keys to include, e.g. \"x,linkedin\".",
      +  "type": "string"
      +}
    • addedInput schema / properties / postFormat
      Added value: +{
      +  "description": "Only single posts or only threads.",
      +  "enum": [
      +    "post",
      +    "thread"
      +  ],
      +  "type": "string"
      +}
  3. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "byDay": {
      +      "anyOf": [
      +        {
      +          "items": {
      +            "additionalProperties": {},
      +            "properties": {},
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "byPlatform": {
      +      "anyOf": [
      +        {
      +          "additionalProperties": {},
      +          "properties": {},
      +          "type": "object"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "failed": {
      +      "anyOf": [
      +        {
      +          "anyOf": [
      +            {
      +              "type": "number"
      +            },
      +            {
      +              "type": "string"
      +            }
      +          ]
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "from": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "partial": {
      +      "anyOf": [
      +        {
      +          "anyOf": [
      +            {
      +              "type": "number"
      +            },
      +            {
      +              "type": "string"
      +            }
      +          ]
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "previous": {
      +      "anyOf": [
      +        {
      +          "additionalProperties": {},
      +          "properties": {},
      +          "type": "object"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "previousWindow": {
      +      "anyOf": [
      +        {
      +          "additionalProperties": {},
      +          "properties": {},
      +          "type": "object"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "published": {
      +      "anyOf": [
      +        {
      +          "anyOf": [
      +            {
      +              "type": "number"
      +            },
      +            {
      +              "type": "string"
      +            }
      +          ]
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "publishedTimes": {
      +      "anyOf": [
      +        {
      +          "items": {},
      +          "type": "array"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "scheduled": {
      +      "anyOf": [
      +        {
      +          "anyOf": [
      +            {
      +              "type": "number"
      +            },
      +            {
      +              "type": "string"
      +            }
      +          ]
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "to": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "totalPosts": {
      +      "anyOf": [
      +        {
      +          "anyOf": [
      +            {
      +              "type": "number"
      +            },
      +            {
      +              "type": "string"
      +            }
      +          ]
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    }
      +  },
      +  "type": "object"
      +}
  4. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so safety is covered. The description adds genuinely new behavior: optional filters narrow every figure, compare returns the previous equal-length window, and it is only available for windows of 15 days or fewer under a 30-day retention cap. That constraint disclosure is exactly what annotations cannot carry.

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?

Three sentences, no filler, with the output shape and the compare caveat front-loaded before the usage cue. Slightly dense in the parenthetical, but every clause carries information an agent needs.

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?

Nine parameters, two enums, and an output schema are all covered; the description explains scope, filter interaction, and the compare window limit without re-documenting return fields that the output schema already defines. Nothing required to call it correctly is missing.

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 description coverage is 100%, so a 3 would be the floor; the description earns above that by explaining that filters apply to every returned figure rather than just the list, and by restating the 15-day ceiling on compare that the schema itself does not mention.

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?

States a specific verb and resource (analytics summary for a date range) and enumerates what comes back: totals, status breakdown, per-platform stats, daily counts. It is clear on its own, but with siblings named view_analytics and get_post_metrics the description never draws the boundary between this tool and those, leaving the agent to infer which analytics endpoint applies.

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?

"Use this when the user asks how their content performed overall, across channels and over a date range" gives a concrete triggering condition. It stops short of explicit exclusions or naming alternatives, so an agent comparing it against view_analytics or get_post_metrics still has to guess.

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