Skip to main content
Glama

create_dm_funnel

Create an Instagram comment-to-DM funnel. scope "account" = keyword rule on EVERY post of the account (no postId; for "Comment PIANO and I'll DM you the link" on every video; paid plans; one live rule per keyword per account; one DM per person per keyword). scope "post" = one published or scheduled post (postId required; while creating a post use schedule_post dmFunnel). matchMode "exact" (default for account) fires only when the whole comment is the keyword, ignoring case, punctuation, emoji and a leading @mention; "contains" (default for post) fires on the keyword as a whole word. A post funnel wins over an account rule on its post. Each match gets one official Private Reply with the rendered {{link}} within seconds; publicReplyTemplate is optional (off when omitted). ON by default (active:false saves it paused); switching on needs a publish-capable token, else it saves paused and dm_funnel_activate turns it on. promoCode (active Stripe promotion code) is added as ?promo= on the redirect. trackClicks (default true) sends a click-tracked go short link tagged by linkTags; list_dm_funnels reports hits, sent and clicks. trackClicks false sends leadUrl exactly (stats tracking "off", clicks null). Keywords ignore case, width and apostrophes; duplicates collapse. CAPABILITY: draft: creates content that cannot reach an audience on its own. Safe for a draft-only agent token.

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>",
      "integrationId": "<integrationId>",
      "scope": "<scope>",
      "keywords": "<keywords>",
      "dmTemplate": "<dmTemplate>",
      "leadUrl": "<leadUrl>"
    },
    "name": "create_dm_funnel"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesHuman label for this funnel in dashboards and in the default utm_campaign.
scopeYes"account" = keyword rule on every post of the Instagram account (postId not used). "post" = one post (postId required).
activeNofalse = save paused. Default true (on).
postIdNoPublished or scheduled Instagram post id from list_posts. Required for scope "post", ignored for "account".
leadUrlYesHTTPS destination substituted for {{link}}.
dailyCapNoMost DMs this funnel sends per day, to protect the account.
keywordsYesComment words or phrases that trigger the DM, e.g. ["PIANO"]. Case, width and apostrophes are ignored.
linkTagsNoFarm tags for the tracked go short link (https://go.<product>/<slug>).
matchModeNo"exact" = the whole comment is the keyword (default for scope "account"). "contains" = the keyword appears as a whole word (default for scope "post").
promoCodeNoOptional active Stripe promotion code appended as ?promo= so checkout pre-applies it.
dmTemplateYesPrivate reply text containing exactly one literal {{link}} placeholder.
trackClicksNoTrack link clicks (default true). False sends leadUrl exactly as given: no redirect, no shortener, no added parameters.
utmCampaignNoOptional utm_campaign (slugified). Defaults to the funnel name.
integrationIdYesInstagram integration id from list_integrations.
publicReplyTemplateNoOptional public comment reply. Omit to keep public replies off (recommended default).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • changedInput schema / properties / keywords / description
      Previous value: -"Comment words or phrases that trigger the DM, e.g. [\"CHECKLIST\"]. Case, width and apostrophes are ignored and whole words only are matched."New value: +"Comment words or phrases that trigger the DM, e.g. [\"PIANO\"]. Case, width and apostrophes are ignored."
    • addedInput schema / properties / matchMode
      Added value: +{
      +  "description": "\"exact\" = the whole comment is the keyword (default for scope \"account\"). \"contains\" = the keyword appears as a whole word (default for scope \"post\").",
      +  "enum": [
      +    "exact",
      +    "contains"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / postId / description
      Previous value: -"Published or scheduled Instagram post id from list_posts."New value: +"Published or scheduled Instagram post id from list_posts. Required for scope \"post\", ignored for \"account\"."
    • changedInput schema / properties / scope / description
      Previous value: -"What the funnel listens to. Only a single post is supported today."New value: +"\"account\" = keyword rule on every post of the Instagram account (postId not used). \"post\" = one post (postId required)."
    • changedInput schema / properties / scope / enum
      Previous value: -[
      -  "post"
      -]New value: +[
      +  "post",
      +  "account"
      +]
    • changedInput schema / required
      Previous value: -[
      -  "name",
      -  "integrationId",
      -  "scope",
      -  "postId",
      -  "keywords",
      -  "dmTemplate",
      -  "leadUrl"
      -]New value: +[
      +  "name",
      +  "integrationId",
      +  "scope",
      +  "keywords",
      +  "dmTemplate",
      +  "leadUrl"
      +]
  2. Changed6 schema fields changed
    • addedInput schema / properties / dailyCap / description
      Added value: +"Most DMs this funnel sends per day, to protect the account."
    • addedInput schema / properties / keywords / description
      Added value: +"Comment words or phrases that trigger the DM, e.g. [\"CHECKLIST\"]. Case, width and apostrophes are ignored and whole words only are matched."
    • addedInput schema / properties / linkTags / properties / note / description
      Added value: +"Free-text note stored with the short link."
    • addedInput schema / properties / name / description
      Added value: +"Human label for this funnel in dashboards and in the default utm_campaign."
    • changedInput schema / properties / promoCode / description
      Previous value: -"Optional active Stripe promotion code (3-40 letters/digits/_/-) appended as ?promo= so checkout pre-applies it."New value: +"Optional active Stripe promotion code appended as ?promo= so checkout pre-applies it."
    • changedInput schema / properties / scope / description
      Previous value: -"M1 supports post scope only."New value: +"What the funnel listens to. Only a single post is supported today."
  3. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only say this is a non-read-only, non-destructive, non-idempotent write. The description carries far more: one live rule per keyword per account, one DM per person per keyword, ON by default with active:false saving it paused, the publish-capable token prerequisite and the paused fallback, and the fact that a match sends an official Private Reply within seconds. It also discloses downstream effects (promo= appended, click-tracked short link, stats reporting "off" and clicks null when trackClicks is 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 the two scopes are front-loaded in the first two sentences, which is the right ordering. The remainder is a dense run of semicolon-joined clauses covering matching, activation, tracking and capability that is largely justified but harder to scan than a short bulleted structure would 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 15-parameter tool with a nested object and no output schema, the definition covers triggering, visibility, activation prerequisites and tracking consequences well. The notable gap is what a successful call returns (funnel id, generated short link, any warnings when it saves paused) and the tension between being ON by default and the closing claim that it is safe for a draft-only token.

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 100%, so the baseline is 3; the description earns more by explaining semantics the schema cannot: matchMode defaults are scope-dependent (exact for account, contains for post), matching ignores case/punctuation/emoji/leading @mention, keywords collapse duplicates across case, width and apostrophes, and trackClicks false sends leadUrl verbatim. It does not explain linkTags.trackClicks interaction to slug/defaulting beyond a parenthetical, and dailyCap is left entirely to the schema.

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?

Opens with a precise verb+resource: "Create an Instagram comment-to-DM funnel," then immediately defines the two scopes in operational terms (keyword rule on every post vs. one post). The agent can distinguish this from list_dm_funnels, dm_funnel_activate and schedule_post purely from the text.

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?

States explicitly when to use each scope: account scope for "comment PIANO and I'll DM you the link" on every video, post scope requiring postId. It also routes the agent to alternatives by name — schedule_post dmFunnel while creating a post, dm_funnel_activate when a token lacks publish capability — and notes a post funnel overrides an account rule on its post. No exclusions are left to inference.

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.