Skip to main content
Glama

preview_automation

Read-onlyIdempotent

Dry-run: which automations would fire if someone sent this comment or DM, and what they would send. Nothing is sent and nothing is recorded.

source is "comment" (a comment on a post — pass media_id, the Instagram media id of that post, from get_reel_analytics/list_scheduled_posts's ig_media_id or resolve_reel_by_link), "dm" (a direct message), or "story_reply" (a reply to a story — pass media_id as the story's id, from list_live_stories). text is what the person wrote.

Use it to check a keyword before telling the user "that will work", to see why a particular comment got no DM (each automation that would not fire is listed with the reason), and to catch two automations that would both try to DM the same comment — Instagram allows ONE private reply per comment, so warnings says so.

It applies the same keyword rule the live engine does. It does not check the plan's limits, the commenter's 24-hour messaging window, or an ai_dm automation's inquiry filter and monthly allowance, so "would fire" means "matches", not "is guaranteed to deliver". Without media_id, an automation scoped to specific posts is listed as post_not_given rather than guessed.

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>",
      "ig_account_id": "<ig_account_id>",
      "source": "<source>",
      "text": "<text>"
    },
    "name": "preview_automation"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYes
sourceYes
media_idNo
workspace_idYes
ig_account_idYes

Output Schema

NameRequiredDescriptionDefault
textYes
sourceYes
media_idNo
warningsNo
would_fireYes
would_not_fireYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A5/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description adds materially more: nothing is sent or recorded, the 'would fire' result means 'matches' rather than 'is guaranteed to deliver', and the Instagram one-private-reply-per-comment constraint surfaces as `warnings`. It also documents the fallback behavior when media_id is absent (`post_not_given` instead of guessing), which is a genuine behavioral disclosure an agent could not infer.

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 dry-run guarantee is front-loaded, then parameter sourcing, then diagnostic use cases, then caveats — a logical progression with paragraph breaks. Every sentence carries distinct information; the caveat paragraph in particular prevents false confidence rather than padding the text.

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 an output schema present, the description need not explain return values, yet it still names the salient result keys (`warnings`, `post_not_given`) and their meaning. For a simulation tool whose correctness hinges on knowing which real-world constraints are ignored, the coverage of inputs, outputs, and limitations is complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must carry the load, and it does: it defines the three enumerated values for `source`, explains that `media_id` is the Instagram media id for 'comment' and the story id for 'story_reply', and tells the agent exactly where to obtain that id (ig_media_id from get_reel_analytics/list_scheduled_posts, resolve_reel_by_link, list_live_stories). Only workspace_id/ig_account_id go unaddressed, which is acceptable for standard identifiers.

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 ('Dry-run: which automations would fire...') and immediately scopes the outcome ('what they would send. Nothing is sent and nothing is recorded'). An agent can tell this is a simulation tool distinct from the mutating siblings like create_automation or update_automation without opening 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 Guidelines5/5

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

It enumerates three concrete use cases — validating a keyword before promising 'that will work', diagnosing why a comment got no DM, and detecting two automations competing for the same comment — and then states explicitly what the tool does NOT verify (plan limits, 24-hour window, ai_dm inquiry filter/allowance). Both when-to-use and the boundary of the tool's authority are spelled out.

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