Skip to main content
Glama

Get post metrics

get_post_metrics

Get metrics of a published post. Empty/available=false is not an error (see reason, e.g. NOT_PUBLISHED). A WORDPRESS article has views, users and avgEngagementSec only when its site is linked to Google Analytics (nightly snapshot, up to 48 h behind); otherwise reason GA4_NOT_CONNECTED or GA4_NO_ACCESS (never treat as zero). Requires scope ANALYTICS_READ (the key can only be created by the workspace owner).

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": {
      "postId": "<postId>"
    },
    "name": "get_post_metrics"
  }
}

Input Schema

NameRequiredDescriptionDefault
postIdYesPost id.
channelNoChannel of the post target, e.g. INSTAGRAM (UPPERCASE canonical, lowercase accepted).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full behavioral burden, and it does so thoroughly: empty/available=false is not an error, reason codes are given, WordPress GA linkage and 48-hour snapshot lag are explained, missing GA data must not be treated as zero, and ANALYTICS_READ scope plus owner-only key creation are disclosed.

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 purpose and then packs in operational caveats without filler. Parenthetical notes are dense but each carries necessary error, freshness, or authentication information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter metrics getter with no output schema and no annotations, the description covers purpose, availability semantics, GA caveats, and authorization well. It leaves a minor gap by not describing the general returned metric fields outside the WordPress example.

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 baseline is 3. The description adds that the post must be published and explains the WordPress/GA condition tied to the channel, but it does not clarify the optional channel parameter's default behavior or metric differences across other channels beyond what the schema already states.

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: "Get metrics of a published post." It scopes to published posts clearly, but does not explicitly distinguish itself from siblings such as get_post or get_account_analytics.

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

Usage Guidelines3/5

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

Usage is implied for retrieving metrics of a published post, and NOT_PUBLISHED signals unpublished posts are out of scope. However, there is no explicit when-to-use guidance versus get_account_analytics or get_post, nor guidance on when callers should supply the optional channel parameter.

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