Skip to main content
Glama

Set up an automation

sprkly_create_automation_from_template

Set up one ready-made automation on one Instagram account and turn it on. This is the same as Go live in the app. It starts replying to real people right away, so show the user the template, the account, the word and the link first. Pass template_id from sprkly_list_automation_templates and profile_id from sprkly_list_profiles. With one Instagram account that can run automations, profile_id can be left out. With several and no profile_id, it sets up nothing and returns needsAccountChoice with the accounts: ask the user which one, then call again with profile_id. If asks_for has post, pass post_id: the sprkly id of an Instagram post on that account, from sprkly_list_scheduled_posts. It can be posted already or still scheduled: a scheduled one starts answering once it is posted. If it does not, leave post_id out. If asks_for has link, pass a full https link. Links are checked: a link that looks like WhatsApp but is not wa.me, a link with look-alike or accented letters, and a link that hides where it goes with a part before an @ are refused (link_required). Links typed into message, comment_reply, faq answers and fallback get the same checks (link_refused, invalid_faq), and there http is fine too. If asks_for has whatsapp, pass phone (the full number with the country code, like 6591234567), whatsapp_username, or both: the DM gets a Chat on WhatsApp button for each. prefill is optional there: the first message typed in for them when WhatsApp opens, "" for none. WhatsApp usernames are still rolling out, so a phone number is the safe choice. If asks_for has telegram, pass telegram_link: a t.me link to the group or channel, or @name. The DM gets a Join on Telegram button. keyword is optional and defaults to the template's word. message is optional and replaces the DM, or the public reply on a template that only replies in the comments. comment_reply is optional on a template that fires on a comment and also sends a DM: the public reply under their comment. It replaces the reply the template comes with, and "" means no public reply. It is refused on every other template. On first-comment-on-post, message is required: the comment sprkly adds under each new Instagram post it publishes on that account (up to 2,200 characters). That one is on every paid plan, and an account can have one live. The coupon template is refused until message holds the real code instead of YOUR-CODE. If asks_for has faq, pass faq: 1 to 10 { keyword, answer } pairs. Each pair becomes its own automation that answers a DM of that word. fallback is optional there and becomes the account's default reply, for a DM with none of the words. It replaces any default reply already on that account, and turns it on if it was off, so tell the user first. A word another live automation already answers is refused. Calling again with the same list skips the words already live. ends_at is optional: when it switches itself off, as an ISO 8601 time with a time zone. It has to be in the future. With faq, the fallback default reply has no end: it stays on after ends_at. campaign is optional: a label up to 60 characters, to group automations by. name is optional: what it is called in the list, up to 100 characters. Left out, it is named after its word and post. Use sprkly_pause_automation to stop it sooner. One DM per person per post: someone who already got an automated DM on a post gets no second one there, even from another automation or a new comment. That skip is normal, not a fault. The owner gets an email when an automation goes live through here.

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": {
      "template_id": "<template_id>"
    },
    "name": "sprkly_create_automation_from_template"
  }
}

Input Schema

NameRequiredDescriptionDefault
faqNoOnly when asks_for has faq. The words people DM you and the answer each one gets.
linkNoThe https link the DM sends. Only when the template asks for a link. Refused: a link that does not start with https://, a link that looks like WhatsApp but is not wa.me, a link with look-alike or accented letters, and a link that hides where it goes with a part before an @.
nameNoOptional. What the automation is called in the list, like "LINK on my spring reel". Up to 100 characters. Not used with faq.
phoneNoOnly when asks_for has whatsapp. The WhatsApp phone number with the country code, like 6591234567. Spaces, + and dashes are fine.
ends_atNoOptional. When it switches itself off, as an ISO 8601 time in the future with a time zone, like 2026-10-30T21:00:00+08:00. Leave it out for no end. The faq fallback stays on after it.
keywordNoThe word people comment or send. Defaults to the template's word.
messageNoYour own words for the DM, for the public reply on a reply-only template, or for the comment on first-comment-on-post.
post_idNoThe sprkly id of the Instagram post to watch, posted or still scheduled. Only when the template asks for a post.
prefillNoOnly when asks_for has whatsapp. The first message typed in for them when the chat opens. Defaults to "Hi! I saw your post on Instagram." "" means none.
campaignNoOptional. A campaign label, up to 60 characters, like "Spring launch". Shown in sprkly_list_automations.
fallbackNoOnly with faq. The reply to a DM with none of the words. It replaces any default reply on the account and turns it on.
profile_idNoThe Instagram account to set it up on. Needed when more than one account can run automations.
template_idYesThe template id from sprkly_list_automation_templates.
comment_replyNoOptional. The public reply under their comment, on a comment template that also sends a DM. "" means none. Leave it out to keep the reply the template comes with.
telegram_linkNoOnly when asks_for has telegram. The Telegram group or channel: https://t.me/yourgroup, an invite link like https://t.me/+AbC123, or @yourgroup.
whatsapp_usernameNoOnly when asks_for has whatsapp. The WhatsApp username, with or without @. Pass phone, this, or both.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / name
      Added value: +{
      +  "description": "Optional. What the automation is called in the list, like \"LINK on my spring reel\". Up to 100 characters. Not used with faq.",
      +  "type": "string"
      +}
  2. Changed1 schema field changed
    • changedInput schema / properties / link / description
      Previous value: -"The https link the DM sends. Only when the template asks for a link."New value: +"The https link the DM sends. Only when the template asks for a link. Refused: a link that does not start with https://, a link that looks like WhatsApp but is not wa.me, a link with look-alike or accented letters, and a link that hides where it goes with a part before an @."
  3. Changed1 schema field changed
    • addedInput schema / properties / telegram_link
      Added value: +{
      +  "description": "Only when asks_for has telegram. The Telegram group or channel: https://t.me/yourgroup, an invite link like https://t.me/+AbC123, or @yourgroup.",
      +  "type": "string"
      +}
  4. Changed3 schema fields changed
    • addedInput schema / properties / phone
      Added value: +{
      +  "description": "Only when asks_for has whatsapp. The WhatsApp phone number with the country code, like 6591234567. Spaces, + and dashes are fine.",
      +  "type": "string"
      +}
    • addedInput schema / properties / prefill
      Added value: +{
      +  "description": "Only when asks_for has whatsapp. The first message typed in for them when the chat opens. Defaults to \"Hi! I saw your post on Instagram.\" \"\" means none.",
      +  "type": "string"
      +}
    • addedInput schema / properties / whatsapp_username
      Added value: +{
      +  "description": "Only when asks_for has whatsapp. The WhatsApp username, with or without @. Pass phone, this, or both.",
      +  "type": "string"
      +}
  5. Changed6 schema fields changed
    • addedInput schema / properties / campaign
      Added value: +{
      +  "description": "Optional. A campaign label, up to 60 characters, like \"Spring launch\". Shown in sprkly_list_automations.",
      +  "type": "string"
      +}
    • addedInput schema / properties / comment_reply
      Added value: +{
      +  "description": "Optional. The public reply under their comment, on a comment template that also sends a DM. \"\" means none. Leave it out to keep the reply the template comes with.",
      +  "type": "string"
      +}
    • addedInput schema / properties / ends_at
      Added value: +{
      +  "description": "Optional. When it switches itself off, as an ISO 8601 time in the future with a time zone, like 2026-10-30T21:00:00+08:00. Leave it out for no end. The faq fallback stays on after it.",
      +  "type": "string"
      +}
    • changedInput schema / properties / post_id / description
      Previous value: -"The published Instagram post to watch. Only when the template asks for a post."New value: +"The sprkly id of the Instagram post to watch, posted or still scheduled. Only when the template asks for a post."
    • changedInput schema / properties / profile_id / description
      Previous value: -"The Instagram account to set it up on."New value: +"The Instagram account to set it up on. Needed when more than one account can run automations."
    • changedInput schema / required
      Previous value: -[
      -  "template_id",
      -  "profile_id"
      -]New value: +[
      +  "template_id"
      +]
  6. Changed3 schema fields changed
    • addedInput schema / properties / fallback
      Added value: +{
      +  "description": "Only with faq. The reply to a DM with none of the words. It replaces any default reply on the account and turns it on.",
      +  "type": "string"
      +}
    • addedInput schema / properties / faq
      Added value: +{
      +  "description": "Only when asks_for has faq. The words people DM you and the answer each one gets.",
      +  "items": {
      +    "properties": {
      +      "answer": {
      +        "description": "The DM that goes back.",
      +        "type": "string"
      +      },
      +      "keyword": {
      +        "description": "The word they DM you.",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "keyword",
      +      "answer"
      +    ],
      +    "type": "object"
      +  },
      +  "maxItems": 10,
      +  "minItems": 1,
      +  "type": "array"
      +}
    • changedInput schema / properties / message / description
      Previous value: -"Your own words for the DM, or for the public reply on a reply-only template."New value: +"Your own words for the DM, for the public reply on a reply-only template, or for the comment on first-comment-on-post."
  7. Added

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the annotations (readOnly=false, openWorld=true), it discloses that setup goes live immediately and replies to real people, lists concrete refusal outcomes (link_refused, invalid_faq, link_required, coupon template until YOUR-CODE is replaced), and warns that fallback silently replaces and re-enables the account's default reply. It also documents a side effect of 'one DM per person per post' being a normal skip, and that the owner is emailed on activation.

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 opening is front-loaded with purpose and confirmation guidance, and nearly every sentence carries an actionable condition rather than filler. It is, however, one long prose block covering 16 parameters, which makes it harder to scan than a lightly structured version would be.

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?

For a 16-parameter, non-idempotent mutation tool with no output schema, the description covers the prerequisites, per-template branching, failure modes, side effects on existing settings, and the activation notification. An agent has enough to call it correctly on the first attempt or know precisely why it failed.

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?

Although schema coverage is 100%, the description adds conditional meaning not derivable from the schema: which parameters apply per template asks_for value, that post_id accepts published or still-scheduled posts, that whatsapp_username is not a substitute for phone during rollout, and that comment_reply is refused on all but comment templates. It also adds constraints absent from the schema, such as message being required and capped at 2,200 characters on first-comment-on-post.

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 first sentence states a specific verb and resource with scope: 'Set up one ready-made automation on one Instagram account and turn it on,' and anchors it to the in-app equivalent ('same as Go live'). It is clearly distinct from siblings like sprkly_import_automation_template and sprkly_update_automation, which the agent could otherwise confuse it with.

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 states explicit prerequisites ('show the user the template, the account, the word and the link first'), tells the agent where template_id and profile_id come from and which sibling supplies each, and spells out the branching rule when profile_id is omitted ('returns needsAccountChoice ... ask the user which one, then call again with profile_id'). It also names sprkly_pause_automation as the way to stop it early.

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