Skip to main content
Glama

Post metric history

get_post_metrics_history
Read-only

Get one post's metric trajectory over time — views, likes, comments, shares, saves, reach as a time series across window_days (default 90, up to 365). Use it to see how a video accelerated after posting or whether an older post is re-surging. Works for an owned post or any post you've analyzed (use the platform + post_id from list_videos / analyze_post). granularity buckets server-side ('daily' default, 'weekly', or 'raw' for every scrape).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
post_idYesThe post's native post_id (from list_videos / analyze_post).
platformYesTarget platform — instagram, tiktok, or youtube (case-insensitive).
granularityNoTime-series bucketing: 'daily' (default), 'weekly', or 'raw' (every scrape).daily
window_daysNoTrailing window in days (1–365, default 90; out-of-range values are clamped).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
reasonNoPresent only when series is empty.
seriesYes
post_idYes
platformYes
granularityYes
window_daysYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • removedOutput schema / additionalProperties
      Removed value: -true
    • addedOutput schema / description
      Added value: +"Output of `get_post_metrics_history`. `reason`='no_metrics_history'\nappears only when `series` is empty."
    • addedOutput schema / properties
      Added value: +{
      +  "granularity": {
      +    "enum": [
      +      "daily",
      +      "weekly",
      +      "raw"
      +    ],
      +    "type": "string"
      +  },
      +  "platform": {
      +    "anyOf": [
      +      {
      +        "type": "string"
      +      },
      +      {
      +        "type": "null"
      +      }
      +    ]
      +  },
      +  "post_id": {
      +    "type": "string"
      +  },
      +  "reason": {
      +    "anyOf": [
      +      {
      +        "const": "no_metrics_history",
      +        "type": "string"
      +      },
      +      {
      +        "type": "null"
      +      }
      +    ],
      +    "default": null,
      +    "description": "Present only when series is empty."
      +  },
      +  "series": {
      +    "items": {
      +      "additionalProperties": true,
      +      "description": "One time-series point. Metric columns (views, like_count,\nfollower_count, ...) are carried as additional properties; `bucket` is\npresent only for 'daily'/'weekly' granularity.",
      +      "properties": {
      +        "bucket": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "default": null,
      +          "description": "Bucket label (ISO date or ISO year-week); absent for granularity='raw'."
      +        },
      +        "timestamp": {
      +          "anyOf": [
      +            {
      +              "format": "date-time",
      +              "type": "string"
      +            },
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "default": null,
      +          "description": "Snapshot time of this point."
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "type": "array"
      +  },
      +  "window_days": {
      +    "type": "integer"
      +  }
      +}
    • addedOutput schema / required
      Added value: +[
      +  "platform",
      +  "post_id",
      +  "window_days",
      +  "granularity",
      +  "series"
      +]
  2. Changed4 schema fields changed
    • addedInput schema / properties / granularity / description
      Added value: +"Time-series bucketing: 'daily' (default), 'weekly', or 'raw' (every scrape)."
    • addedInput schema / properties / platform / description
      Added value: +"Target platform — instagram, tiktok, or youtube (case-insensitive)."
    • addedInput schema / properties / post_id / description
      Added value: +"The post's native post_id (from list_videos / analyze_post)."
    • addedInput schema / properties / window_days / description
      Added value: +"Trailing window in days (1–365, default 90; out-of-range values are clamped)."
  3. Added

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already indicate readOnlyHint and openWorldHint. The description adds behavioral details: granularity is bucketed server-side, window_days default and maximum, and out-of-range values are clamped. These details go beyond what annotations provide.

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 three sentences, front-loading the main purpose. It uses a compact listing of metrics and parameters without unnecessary words. Every sentence adds value.

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 presence of an output schema, the description does not need to explain return values. It covers purpose, usage, parameters, constraints, and behavior. The tool is fully documented for an AI agent to use correctly.

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%. The description adds context: post_id source (list_videos/analyze_post), platform listing, granularity server-side behavior, and window_days clamping. This enhances understanding beyond the schema alone.

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 clearly states the tool's purpose: retrieving a single post's metric trajectory over time, listing specific metrics (views, likes, comments, shares, saves, reach). It distinguishes itself from sibling tools like get_follower_history or get_account_metrics by focusing on one post's time-series data.

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 clear usage scenarios ('see how a video accelerated after posting or whether an older post is re-surging') and explains prerequisites (works for owned posts or posts analyzed via list_videos/analyze_post). It does not explicitly exclude alternatives but the context is sufficient.

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.