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:[...]}]}]}]. Needs a Pro or Agency plan on the workspace.

Input 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

A4/5.0
Behavior5/5

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

Beyond the annotations (write, open-world, non-destructive), the description discloses substantial behavior: only replies within Meta's 24-hour window, one flow per person at a time, a manual human reply stops the flow, plan gating, and hard limits (40 steps, 6 branch levels, wait caps). This is exactly the extra 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?

The purpose and constraints are front-loaded before the example, and almost every sentence carries load-bearing information. The inline example is dense and partly restates the schema, but it earns its place by showing the nested structure in use.

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, deeply nested tool with 8 parameters, the description covers triggers, step types, limits, plan requirements, and runtime behavior thoroughly. The only gap is that with no output schema present, the description says nothing about what is returned (e.g. the new automation's id).

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 88%, so the schema already documents the parameters in depth, establishing a baseline of 3. The description adds value beyond that with a concrete end-to-end example of how trigger and steps compose, plus interpolation details ('{username}', '{first_name}'), nudging it to a 4.

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?

The description gives a specific verb+resource ('Create a DM automation on an Instagram account (or a Facebook Page, Messenger)') and enumerates the trigger types (keyword, any_message, story_mention, story_reply, ref), which implicitly separates it from the comment-triggered sibling create_comment_dm_rule. It never names a sibling explicitly, so it falls just short of a 5.

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 rather than stated: the description explains what the automation does and the plan requirement ('Needs a Pro or Agency plan'), so the agent can infer this is the tool for setting up DM flows. However, it never says when to choose this over create_comment_dm_rule or update_dm_automation, nor when not to use it.

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.