Skip to main content
Glama

Get workspace analytics

get_workspace_analytics

Summarizes published-post analytics for a workspace over a rolling window: total posts, views, likes, comments, and shares, plus the same breakdown per platform. Numbers come from the cached per-post post_analytics table, NOT from live platform API calls. Filter to one platform by passing platform.

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.

Analytics coverage: per-post analytics exist for YouTube, TikTok, Instagram, Facebook, LinkedIn (Company Pages), Threads, Bluesky, Pinterest (business accounts), Snapchat, Mastodon, Pixelfed, Reddit, Tumblr and Dailymotion (views, likes and saves; Pixelfed, Reddit, Tumblr, Bluesky and Mastodon report no view counts). X has analytics only when the workspace has added its own X API key in Settings > Integrations (X bills each post read to the user's X developer account); without one, X posts come back unavailable with that reason. Google Business Profile has profile-level stats only (no per-post numbers). Telegram and Discord have no analytics at all.

Google Business Profile: posts always show 0 (Google has no per-post stats). When the workspace has a Google Business Profile connection, the response adds google_business_profile with profile views (Search + Maps impressions), website_clicks, call_clicks and direction_requests: window for the requested days (Google keeps ~30 days of daily data; window_fully_covered is false when the window starts earlier), last_30_days, and daily points. These profile stats are the Google Business numbers; the post totals stay at 0.

Dashboard parity note: numbers here match the ShortSync Overview dashboard exactly for TikTok, Snapchat, Threads, Mastodon, X, LinkedIn, Pinterest, Bluesky, Reddit, Tumblr and Pixelfed. For Instagram, Facebook, and YouTube the dashboard shows different (usually higher) numbers because it fetches account-level insights live from those three platforms, which count differently (Instagram video views include Reels impressions and reach; Facebook aggregates comments across the whole page; YouTube counts include Shorts feed views). This tool sums per-post cached metrics while the dashboard fetches account-level totals for those three platforms; get_post_analytics returns the numbers for a single post.

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": {
      "workspace_id": "<workspace_id>"
    },
    "name": "get_workspace_analytics"
  }
}

Input Schema

NameRequiredDescriptionDefault
daysNoLookback window in days, counting from now. Default 30, max 365. The window is based on the post's published_at.
platformNoRestrict to one platform (instagram, youtube, tiktok, etc.). Omit to summarize across all.
workspace_idYesWorkspace to summarize. Required — get one from list_workspaces.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

The description explains exactly why the tool is not a pure read despite the 'get' prefix: it may start a background sync, which is consistent with readOnlyHint=false rather than contradicting it. It goes well beyond annotations by disclosing the cached `post_analytics` source, the freshness rule (over an hour or never synced), the semantics of `sync.status` values including `free_plan_limit`/`daily_limit` failure modes, and per-platform coverage limits such as X requiring the workspace's own API key.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose and side effect are front-loaded and the block paragraphs are labeled (Freshness, Analytics coverage, Google Business Profile, Dashboard parity), which aids scanning. However, it runs very long and repeats itself — Google posts returning 0 is stated twice, and the full platform roster is verbose for what is essentially result-interpretation context.

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 burden of explaining returns and does so: it names the aggregate fields, the conditional `sync` object with `last_synced_at`, and the optional `google_business_profile` object with `window`, `window_fully_covered`, `last_30_days` and `daily`. It also preempts the most likely confusion — mismatches with the Overview dashboard for Instagram, Facebook and YouTube.

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?

Schema description coverage is 100%, so the parameters are already fully documented, including the default/max for `days` and the `published_at` basis. The description only restates that passing `platform` restricts to one platform and that omitting it summarizes across all, adding no format or edge-case detail beyond the schema. Baseline 3 is appropriate.

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 opening sentence names a specific verb and resource plus exact scope: 'Summarizes published-post analytics for a workspace over a rolling window,' and enumerates the metrics returned (posts, views, likes, comments, shares, plus per-platform breakdown). It also distinguishes itself from the dashboard and from `get_post_analytics` ('returns the numbers for a single post'), so an agent can route 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 Guidelines4/5

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

Explicit routing exists: use `platform` to narrow to one network, use `get_post_analytics` for a single post, and this call auto-triggers a sync when data is stale. It gives no guidance against the other analytics siblings in the catalog (folder-level or video-level analytics), so the when-not-to-use half is incomplete.

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.