Skip to main content
Glama

Switch flow / update flow config

set_flow
Destructive

Switch the tenant's daily flow and/or patch its configuration. Switching flows reseeds a starter config and clears TODAY'S pending drafts (approved/published drafts are preserved) so the inbox reflects the new flow. Config fields are per-flow: recycle → source_post_indices + slots_per_day (1-4); daily-products → product_pool_ids; daily-generative → reference_image_urls (≤10) + brand_prompt (≤2000 chars); campaign → campaign_name (≤80) /start/end dates (YYYY-MM-DD, end ≥ start) + campaign_asset_ids (≤60, must exist) + campaign_posts_per_day (1-3). post_mix is the OWNER's call and applies to every flow: 'stories' (the default for an owner who has never been asked), 'both' (a story daily plus a feed post on the feed_days rhythm) or 'feed' (grid only — every draft is a post). Never set it on your own initiative: ask the user which they want. It survives a flow switch. feed_days is read only under 'both': tenant-local weekdays (0=Sun..6=Sat) that draft a FEED POST next to the day's story (unset = the flow's suggested rhythm — daily-products Mon+Thu, daily-generative Tue, recycle Mon; [] = no feed day). Campaign derives its feed days from the range (first + last day) instead.

Input Schema

NameRequiredDescriptionDefault
flowNoOmit to keep the current flow and only patch config.
configNo
handleNoInstagram handle (with or without @). Omit for your default account.
contextYesExplain why you are calling this tool and how it fits into the business owner's goal for their Instagram presence. This parameter is used for analytics and user intent tracking. YOU MUST provide 15-25 words (count carefully). NEVER use first person ('I', 'we', 'you') - maintain third-person perspective. NEVER include personal data, credentials, or the text of a draft. Example (20 words): "Reviewing the pending drafts before approving today's story, checking the caption matches the photo the owner expects."

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / config / properties / reel_days
      Added value: +{
      +  "description": "daily-products only: weekdays (0=Sun..6=Sat, tenant-local) that also draft a short reel of the day's story. The user's decision — ask before setting it. [] = no reels.",
      +  "items": {
      +    "maximum": 6,
      +    "minimum": 0,
      +    "type": "integer"
      +  },
      +  "maxItems": 7,
      +  "type": "array"
      +}
  2. Changed2 schema fields changed
    • changedInput schema / properties / config / properties / feed_days / description
      Previous value: -"Weekdays (0=Sun..6=Sat, tenant-local) that draft a feed post alongside the story. [] = stories only. Ignored by campaign."New value: +"Weekdays (0=Sun..6=Sat, tenant-local) that draft a feed post alongside the story, under post_mix 'both'. [] = no feed day. Ignored by campaign."
    • addedInput schema / properties / config / properties / post_mix
      Added value: +{
      +  "description": "What the daily loop drafts. The user's decision, not yours — ask before setting it.",
      +  "enum": [
      +    "stories",
      +    "both",
      +    "feed"
      +  ],
      +  "type": "string"
      +}
  3. Changed1 schema field changed
    • addedInput schema / properties / config / properties / feed_days
      Added value: +{
      +  "description": "Weekdays (0=Sun..6=Sat, tenant-local) that draft a feed post alongside the story. [] = stories only. Ignored by campaign.",
      +  "items": {
      +    "maximum": 6,
      +    "minimum": 0,
      +    "type": "integer"
      +  },
      +  "maxItems": 7,
      +  "type": "array"
      +}
  4. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only flag destructiveHint=true; the description supplies the specifics an agent actually needs: switching reseeds a starter config and clears TODAY'S pending drafts while preserving approved/published ones. That is exactly the beyond-annotation context this dimension rewards, and it is consistent with the destructive hint.

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?

Front-loaded with the action and its destructive side effects before the dense field-by-field rules, so nothing is buried. The single long paragraph is information-dense but would scan faster with light structuring; still, every clause carries real instruction.

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 mutation tool with a nested config object and no output schema, it covers destruction semantics, per-flow field rules, and the ownership constraint on post_mix. It omits anything about error conditions or what the call returns, but with no output schema that omission is minor.

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 covers ~75% of fields, and the description compensates heavily by mapping config fields to flows and giving constraints absent from the schema (≤10 reference images, ≤2000 brand prompt, end ≥ start, ≤60 assets that must exist, 1-3 posts/day). It leaves some fields like source_post_indices and show_prices unelaborated, so not a full 5.

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 specific verb+resource: 'Switch the tenant's daily flow and/or patch its configuration.' It also separates the two modes (switch vs patch), which lets an agent distinguish it from the read-only sibling get_flow without opening either schema.

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?

Gives explicit conditional guidance for the post_mix field ('Never set it on your own initiative: ask the user which they want') and states that omitting flow only patches config. It never names an alternative tool or a when-not-to-use-this condition, so it falls short of a 5.

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