Skip to main content
Glama

Sergio by Serviche

Create a flow (saved as a draft)

create_flow
Idempotent

Creates a flow (an automation) as the Automations page's New flow does: a name, an optional description, how it classifies an incoming message (trigger_rules: categories, keywords or senders; trigger_direction inbound unless it starts on an outgoing message), and its steps in order, at least one. It is born a DRAFT: it runs nothing until a person turns it on (set_flow_on), and nothing is sent. Each step takes a title and instructions; a step that reaches the client names its channel (sms or email) and message_template, written with Sergio's merge tags, never a hard-coded business or client name; timing is the owner's words in when_phrase. read('flows') returns the company's existing templates to copy from. Pass the same idempotency_key when retrying; a repeat returns the same flow.

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": {
      "name": "<name>",
      "steps": "<steps>",
      "idempotency_key": "<idempotency_key>"
    },
    "name": "create_flow"
  }
}

Input Schema

NameRequiredDescriptionDefault
iconNo
nameYes
colorNo
stepsYes
summaryNoOne line on what the flow is for, shown beside its name.
descriptionNo
trigger_rulesNo
idempotency_keyYesYour id for this operation (8-128 of A-Z a-z 0-9 . _ : -). Reuse it on every retry of the same operation; use a new one for a new operation.
trigger_directionNoinbound (default) starts it on a message the client sends; outbound on one we send.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / steps / items / properties / message_template / description
      Previous value: -"The exact message a text or email step sends; required for those channels. Message text uses Sergio's merge tags, exactly as spelled: {{Client First Name}} (The recipient's own first name); {{User Company}} (Your business name, exactly as it is set on your organization); {{User First Name}} (The first name of the teammate sending the message (your business profile name when Sergio sends it on its own)); {{Offer}} (This campaign's own offer text, exactly as written on the campaign (e.g. \"$29.89 off next booking\")); {{Offer Expiry Date}} (The day this client has to book by. The same date every step of their sequence quotes); {{Company Phone Number}} (Your primary business phone number, set once in Settings); {{Business Website}} (Your business website, set once in Settings under Business); {{Review Link}} (Your Google review link, set once in Settings and shared by every message that asks for a review); {{Last Visit Date}} (The date of the client's most recent visit. A contact with no past visit is held for you to write); {{Address}} (The recipient's address on file. For a message about a booking, that booking's address); {{pleasantries}} (A short opener in your voice that fits the day the text actually goes out (\"Happy Friday!\" on a Friday, \"Hope your week is going well!\" midweek). Updates on its own if the send time moves. Use it in some messages, not every one); {{Goodwill}} (A closing well-wish in your voice that fits when the text actually goes out (\"Have a great weekend!\" on a Friday afternoon). Updates on its own if the send time moves). Never hard-code the business name or a client name, and never write a bracketed placeholder like [first name]. {{Offer}} needs offer_text set; {{Offer Expiry Date}} needs offer_expiry_days set. The first text automatically ends with \"Reply STOP to opt out.\", so do not write it."New value: +"The exact message a text or email step sends; required for those channels. Message text uses Sergio's merge tags, exactly as spelled: {{Client First Name}} (The recipient's own first name); {{User Company}} (Your business name, exactly as it is set on your organization); {{User First Name}} (The first name of the teammate sending the message (your business profile name when Sergio sends it on its own)); {{Offer}} (This campaign's own offer text, exactly as written on the campaign (e.g. \"$29.89 off next booking\")); {{Offer Expiry Date}} (The day this client has to book by. The same date every step of their sequence quotes); {{Company Phone Number}} (Your primary business phone number, set once in Settings); {{Business Website}} (Your business website, set once in Settings under Business); {{Review Link}} (Your Google review link, set once in Settings and shared by every message that asks for a review); {{Last Visit Date}} (The date of the client's most recent visit. A contact with no past visit is held for you to write); {{Address}} (The recipient's address on file. For a message about a booking, that booking's address); {{pleasantries}} (A short opener in your voice that fits the day the text actually goes out (\"Happy Friday!\" on a Friday, \"Hope your week is going well!\" midweek). Updates on its own if the send time moves. Use it in some messages, not every one); {{Goodwill}} (A closing well-wish in your voice that fits when the text actually goes out (\"Have a great weekend!\" on a Friday afternoon). Updates on its own if the send time moves). Never hard-code the business name or a client name, and never write a bracketed placeholder like [first name]. {{Offer}} needs offer_text set; {{Offer Expiry Date}} needs offer_expiry_days set. The first text automatically ends with the campaign's opt-out line (sms_opt_out_line), so do not write one."
  2. Added

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the annotations, the description discloses important behavior: the flow is created as a DRAFT, runs nothing until activated, and sends nothing. It also explains idempotency semantics — reusing the same idempotency_key on retry returns the same flow — which adds concrete retry behavior beyond idempotentHint.

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 description is dense but front-loads the purpose and lifecycle before moving into field-level guidance. It contains little wasted wording, though the long single paragraph and packed clauses make it less scannable than it could be.

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 creation tool with nine top-level parameters, a nested steps array, and no output schema, the description covers the essential lifecycle, required structure, and key semantics. It omits some optional field meanings and does not describe the returned flow object, but the schema carries much of the nested detail.

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?

With only 33% schema description coverage, the description compensates well for core parameters by explaining trigger_rules classification, trigger_direction defaults, ordered steps, step titles/instructions, channel and message_template usage, and when_phrase timing. It does not cover optional fields like icon, color, summary, or several step-level options, and it narrows channel examples to sms/email even though the schema also permits call.

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 description states a specific verb and resource — creates a flow/automation — and explains it behaves like the Automations page's New flow. It distinguishes the operation from activation via set_flow_on and notes that the result is a draft, so an agent can tell it apart from flow-editing or activation siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

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

It provides clear context for creating a new flow and explicitly says the flow remains a draft until a person turns it on with set_flow_on. It also points to read('flows') for existing templates, though it does not explicitly say when to use edit_flow or ai_edit_flow instead of creating a new flow.

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