Skip to main content
Glama

Postkey: Instagram DM Automation and Comment-to-DM

DM insights over time

postkey_get_dm_insights
Read-onlyIdempotent

Postkey: Reports how the profile's DM automations did over the last 7, 14 or 30 days: starts, DMs sent, link clicks, click rate and emails captured, each against the period before; a day by day series; where starts came from (comments, stories, DM keywords, ref links, ads); how the follow check went; and the posts that drove the most DMs, each with its views and the automations it ran. Use it for DM results over time or by post; for each keyword automation's lifetime counts use postkey_get_automation_stats.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "postkey_get_dm_insights"
  }
}

Input Schema

NameRequiredDescriptionDefault
daysNoThe window, counted back from today in the profile's time zone: 7, 14 or 30 (default) days.

Output Schema

NameRequiredDescriptionDefault
okYesfalse: refused (isError; code, message, guide_topic, url); no change.
toNoIts last day (today).
daysNoThe window: the last 7, 14 or 30 days.
fromNoThe window's first day, YYYY-MM-DD in time_zone.
noteNoHow the numbers are counted.
dailyNoOne per day: day, dms_sent, link_clicks.
postsNoUp to 20 by DMs sent: post_id, title, type, platform, published, views, comments, engagement_rate, starts, dms_sent, link_clicks, click_rate, emails_captured, follow_checks_passed, automations, link.
totalsNostarts, dms_sent, link_clicks, unique_link_clicks, click_rate (0.25 is 25%; null with no DMs), emails_captured, dms_read, dms_failed.
sourcesNoWhere starts came from: source, name, starts, dms_sent, link_clicks.
time_zoneNoThe profile's time zone.
posts_totalNoAll posts that drove DMs in the window.
follow_checkNoasked, passed, failed, skipped.
previous_periodNofrom, to, and the same counts for the period before (null when there were none).
not_tied_to_a_postNostarts, dms_sent, link_clicks, emails_captured from DM keywords, ref links and any-post comments.
automations_runningNoAutomations live now.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already establish readOnlyHint, idempotentHint, destructiveHint=false and closed-world scope, so the safety profile is covered. The description adds substantive context beyond that: each metric is reported against the prior period, there is a day-by-day series, start-source attribution, follow-check outcome, and per-post views with the automations each post ran. It stops short of noting rate limits or response size, which keeps it off a 5.

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 verb and the window, then the metric list, then the sibling redirect — correct ordering. The middle enumeration is dense and long, but each clause names a distinct output section rather than padding, so little is wasted.

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 only one optional enum parameter, a full output schema, and annotations covering the safety profile, the description's job is scope and disambiguation — both done. It tells the agent what the report contains and when to choose the sibling instead, leaving nothing material to inference.

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% and the single `days` parameter already documents the enum, the default of 30, and that the window is counted back in the profile's time zone. The description only restates the three valid values, adding no new semantics, so the baseline 3 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?

Opens with a specific verb and resource ("Reports how the profile's DM automations did") and enumerates the exact metrics returned (starts, DMs sent, link clicks, click rate, emails captured) plus the breakdowns by source, follow check and post. It also names the sibling it is not — postkey_get_automation_stats for per-keyword lifetime counts — so an agent can separate the two without opening either 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: "Use it for DM results over time or by post; for each keyword automation's lifetime counts use postkey_get_automation_stats." A clear when-to-use condition paired with the alternative that covers the remaining case.

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