Skip to main content
Glama

Create DM automation

create_dm_automation

Create a DM automation on an Instagram account (or a Facebook Page, Messenger): when the trigger fires, Breakreach answers in the DM and walks the steps for that person. It only ever replies to something the person did, within Meta's 24-hour window; one flow per person at a time, and a person on the team answering by hand stops it. Example, follow to get the link: trigger {type:"keyword",keywords:["GUIDE"]}, steps [{type:"condition",check:"follows",yes:[{type:"message",text:"Here it is {username}!",button:{title:"Open the guide",url:"https://..."}}],no:[{type:"message",text:"Follow me first, then tap below",choices:[{label:"I followed",steps:[...]}]}]}].

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoA name for the automation (default: from the trigger)
stepsYesSteps run in order; each is one of: - {"type":"message","text":"...","button":{"title":"Get the guide","url":"https://..."}}: text up to 1000 bytes (640 characters with a button). {username} becomes their @handle on Instagram (first name on Messenger), {first_name} their first name. Optional link button (title up to 20 characters); clicks are counted. - {"type":"message","text":"Which one?","choices":[{"label":"Pricing","steps":[...]},{"label":"Demo","steps":[...]}],"otherwise":{"afterMinutes":60,"steps":[...]}}: up to 13 quick-reply choices (labels up to 20 characters), each with its own steps; otherwise = a typed answer that isn't a choice, or no answer within afterMinutes. A message has a button or choices, not both. - {"type":"wait","minutes":30}: up to 1380 (23 h). - {"type":"condition","check":"replied|keyword|clicked|follows","keywords":["yes"],"withinMinutes":60,"yes":[...],"no":[...]}: waits up to withinMinutes for a reply, a reply containing a keyword, or a click on an earlier link button; follows (Instagram only) checks at once whether they follow the account ("follow to get the link"). - {"type":"handoff","note":"Wants a quote"}: flags the conversation in the Breakreach Inbox for a person on the team and ends the flow. A message with choices, a condition and a handoff must be the last step of their list: put what comes next inside their branches. Up to 40 steps, branches 6 levels deep. Meta only allows replies within 24 hours of the person's last message: a message due later is not sent and the run ends.
activeNofalse pauses it (people in the flow stop)
reentryNoonce (default) = a person goes through it once; always = every time they trigger it, at most once per cooldownHours
triggerYes
accountIdYesInstagram account or Facebook Page id from list_accounts
workspaceNoWorkspace slug (optional)
cooldownHoursNoWith reentry always: hours before the same person can start it again (default 24)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior5/5

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

The annotations only say readOnlyHint=false, openWorldHint=true, destructiveHint=false, and the description adds substantial behavioral context beyond that: the 24-hour Meta reply window, one flow per person at a time, manual team replies halting the flow, and messages due after the window silently not sending. It also discloses hard limits (40 steps, 6 branch levels, 23h max wait) and the destructive-ish consequence of pausing with active=false.

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?

Purpose and constraints are front-loaded in the first paragraph, and every prose sentence (24-hour window, one flow per person, handoff stops it) earns its place. The trailing example is a large inline JSON blob with elided `[...]` segments that duplicates much of the steps schema, which is the main drag on size.

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 complex, nested, write tool with no output schema, the description covers runtime behavior, limits, and trigger semantics well. It does not say what the call returns (e.g. the created automation id) or what permissions the account needs, which is a modest gap given no output schema exists.

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 already 88% and the nested trigger/steps schemas are exhaustively documented in the schema itself. The long inline JSON example mostly restates the per-step semantics the schema already gives, adding only marginal value in showing how trigger and steps compose. Baseline 3 is appropriate when the schema carries the parameter burden.

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 ('Create a DM automation on an Instagram account (or a Facebook Page, Messenger)') and even summarizes the runtime behavior of the artifact it creates. However, it never names or contrasts with the close siblings create_comment_dm_rule and update_dm_automation, so an agent must infer the boundary from the name alone.

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 only implied through the trigger types and the note that it 'only ever replies to something the person did, within Meta's 24-hour window' — useful scoping, but not stated as when-to-use guidance. There is no explicit when-not or 'use X instead' routing against update_dm_automation or create_comment_dm_rule.

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.