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).
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. 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"
      +}
  2. 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"
      +}
  3. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already cover safety (readOnlyHint=true, destructiveHint=false, idempotentHint=true). The description adds useful behavioral details beyond that, such as the effect of filters ('narrow every figure to matching posts'), the behavior of 'compare' (adds equal-length previous window under `previous`), and the 30-day statistics-retention cap for windows of 15 days or fewer. This adds context that helps the agent anticipate constraints and return shapes without contradicting annotations.

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 core purpose and return contents in the first sentence, then efficiently explains filters, compare behavior, and the usage trigger in a few dense sentences. Every clause carries meaning; there is no filler or redundancy. It strikes a good balance between detail and brevity for an 8-parameter tool.

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?

Given the tool's complexity (8 parameters, several optional filters) and that an output schema exists, the description covers the essential aspects: what it returns, how filters affect results, the compare feature with its constraints (15-day limit, 30-day retention), and when to use it. Combined with the annotations and output schema, an agent has sufficient context to call the tool correctly without further documentation.

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?

The schema descriptions cover 100% of parameters, so the baseline is 3. However, the description adds semantic value by explaining the collective effect of optional filters ('narrow every figure to matching posts') and the specific behavior of the `compare` flag, including the retention cap constraint. This goes beyond the schema's individual parameter definitions and clarifies the aggregate impact, so a 4 is justified.

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 ('Get'), resource ('an analytics summary'), and the exact contents returned ('total posts, status breakdown... per-platform stats, and daily post counts'). The final sentence clarifies the intended use case ('how their content performed overall, across channels and over a date range'), which together with the specificity differentiates it from siblings like get_post_metrics or view_analytics even without naming them.

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?

The description provides an explicit usage condition: 'Use this when the user asks how their content performed overall, across channels and over a date range.' This clearly describes when to use the tool, but it does not explicitly mention alternative tools or describe when not to use it, so it doesn't earn 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