Skip to main content
Glama

Explain post analytics

explain_post_analytics_state

Diagnostic — returns one of eight concrete states explaining why a post's analytics look the way they do. Use this instead of inferring from raw zeros / nulls in get_post_analytics; it collapses the (platform supports analytics?) × (connection healthy?) × (sync ran?) × (metrics zero?) matrix into a single state plus a human-readable explanation.

Possible states:

  • platform_not_supported: no analytics exist for this platform (Telegram, Discord). The zero row is a permanent placeholder.

  • account_not_supported: the platform reports nothing for this post and explanation carries the reason: a personal account where only business accounts or pages have analytics (LinkedIn personal profile, personal Pinterest account), an X post when the workspace hasn't added its own X API key, or a Google Business Profile post (Google only has profile-level stats; get_workspace_analytics returns them).

  • connection_needs_reconnect — the token that published this post is expired / revoked; the sync cannot refresh it until the user reconnects.

  • sync_never_ran — no post_analytics row, OR the row is still the publish-time placeholder. No sync has run since the post was published; check the sync field for whether this call started one.

  • sync_failed — the fetch ran and errored out; fetch_error carries the upstream message.

  • synced_zero — real fetch, real zeros. The platform genuinely reports no engagement yet.

  • synced_populated — real fetch, at least one non-zero metric.

  • post_not_published — the post is still a draft or scheduled; no analytics can accrue yet.

Returns actionable: true when there's a user-facing next step (usually reconnect or wait), plus a next_step string spelling it out.

Freshness: if the workspace's analytics were last synced over an hour ago (or never), this call also starts a background sync and reports it in the response's sync field (status started or in_progress, plus last_synced_at). The numbers in that response are from the previous sync; call again in a few minutes for fresh ones. sync.status of free_plan_limit or daily_limit means no sync could run, so the numbers may not be current.

Input Schema

NameRequiredDescriptionDefault
video_post_idYesThe video_posts.id to diagnose. Get it from list_video_uploads or the return value of other analytics tools.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations alone (readOnlyHint=false, openWorldHint=true) would leave the agent confused about why a read-looking diagnostic isn't read-only; the description resolves this by disclosing that the call may kick off a background sync when data is stale, and reports that in a `sync` field. It also surfaces failure modes ('sync_never_ran', 'sync_failed' with fetch_error, token expiry) and plan limits beyond what annotations cover.

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?

Front-loaded with the one-line purpose, then a scannable state list — the length is largely justified because there is no output schema and these enum values must be documented somewhere. A few sentences (e.g., restating actionable/next_step after already explaining each state) are mildly redundant.

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?

With no output schema, the description carries the full burden and does so: it enumerates all eight `state` values, names the accompanying fields (explanation, fetch_error, actionable, next_step, sync, last_synced_at), and explains the side effect and staleness caveat. Nothing an agent needs to interpret the response is missing.

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

Parameters3/5

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

Only one parameter and the schema already documents it at 100% coverage, including where to obtain video_post_id. The description adds no additional meaning about the parameter's format or constraints, so the baseline 3 for high schema coverage applies.

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?

States a specific verb and resource ('Diagnostic — returns one of eight concrete states explaining why a post's analytics look the way they do') and immediately distinguishes itself from the sibling that produces the raw numbers, get_post_analytics. An agent can tell exactly what this returns without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit routing rule: 'Use this instead of inferring from raw zeros / nulls in get_post_analytics.' It also gives follow-up guidance ('call again in a few minutes for fresh ones') and explains what a sync.status of free_plan_limit or daily_limit implies about the data's currency.

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.