Skip to main content
Glama

Get DM analytics

get_dm_analytics
Read-onlyIdempotent

The DM (direct message) analytics dashboard of one brand in one call. sections selects the parts: overview (messages received/sent/automated, new conversations, conversations marked done, each against the previous period of equal length), response_times (time from a customer message to the reply, split into automation, replies sent from replient.ai, and replies sent natively in the platform app), sentiment (by conversation, or by every received message with sentimentBasis "messages"), tags (conversations per tag, AI or manual), channels (per platform), time_saved (estimated seconds saved per action type), top_contacts (most active conversations), top_posts (posts whose comments led to DMs, with read and click rates), hourly (received and sent messages by hour of day in timeZone). Needs the Inbox feature on the brand plan. completionRatePct is done / new conversations and exceeds 100 when the backlog shrank. dataQuality says when a 0 means nothing was recorded and when a figure rests on fewer than 20 items. includeCharts adds ready-to-draw charts. get_account lists the brands and the usage guide.

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": {
      "brand": "<brand>"
    },
    "name": "get_dm_analytics"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNo
fromNo
brandYes
intervalNoauto
sectionsNoWhich parts to compute. Defaults to overview, response_times, sentiment and tags.
timeZoneNo
topLimitNoRows in top_contacts and top_posts (1-25).
tagSourceNoCount AI tags, manually set tags, or both.all
includeChartsNo
sentimentBasisNo"conversations": each conversation once, on the day of its latest customer message, unanalysed ones left out. "messages": every received message with its conversation's sentiment; totals match messages received.conversations

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds genuinely non-obvious behavioral context: completionRatePct can exceed 100 when the backlog shrank, and dataQuality flags when a zero means nothing recorded versus a figure resting on fewer than 20 items. It stops short of describing response envelope or limits, but these metric caveats are exactly the kind of context annotations cannot carry.

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 a one-line purpose before the dense section enumeration, and nearly every clause adds information an agent needs to interpret the output. It is a single undifferentiated block of prose, though, and the section list would read far faster as a structured list.

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?

For a 10-parameter read-only analytics tool with no output schema, the definition covers the expensive-to-discovery parts: metric definitions, the completionRatePct >100 edge case, dataQuality semantics, chart rendering, and the plan prerequisite. Only the date-range parameter behavior is left thin, which is a minor gap rather than a blocking one.

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 coverage is only 40%, so the description has to carry weight, and it does: every one of the nine `sections` values is defined, sentimentBasis is spelled out in both modes ('by conversation' vs 'by every received message'), timeZone is tied to `hourly`, and tagSource/topLimit are implied by the tags and top_contacts/top_posts descriptions. The gap is `from`, `to` and `interval`, which are never explained (notably what 'auto' resolves to or whether the range defaults to something).

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 resource and scope: the DM analytics dashboard of one brand in one call, then enumerates the exact metrics returned per section. This clearly separates it from siblings like get_comment_analytics and get_ai_handover_analytics without the agent needing to open any schema.

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?

Provides a real prerequisite ('Needs the Inbox feature on the brand plan') and a navigation pointer ('get_account lists the brands and the usage guide'), which is useful context. However, it never says when to choose this over adjacent analytics tools such as get_ai_handover_analytics or get_comment_analytics, leaving selection to inference from the resource name.

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