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

TableJSON 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. 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"
      +}
  2. 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"
      +}
  3. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations declare destructiveHint=true, but the description details the destructive effect: clears TODAY'S pending drafts while preserving approved/published drafts. It also explains flow-switch reseeding and config persistence for post_mix. This adds behavioral context beyond the annotations.

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 appropriately structured, front-loading the core effect (switching clears drafts) then grouping per-flow configs. Every sentence adds value, though a slight restructuring into bullets could improve scannability. Still, it's not verbose given the tool's complexity.

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?

The description covers all parameter meanings, flow-specific constraints, and behavioral side effects. It lacks explicit error-handling or return-value details, but since there is no output schema and the tool is configuration-focused, the description is sufficient for an agent to invoke it correctly.

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?

The description enriches every parameter: it maps config fields to flows (e.g., recycle → source_post_indices + slots_per_day), explains post_mix values and the rule to ask the user, and details feed_days behavior under 'both'. Schema coverage is 75%, but the description compensates fully for the remaining 25% and clarifies semantics.

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 clearly states the tool switches the tenant's daily flow and/or patches its configuration. It enumerates specific flow types and config fields, distinguishing it from get_flow and other sibling tools. The verb 'switch' and resource 'flow' are explicit.

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?

Provides explicit when-to-use guidance: switching flows reseeds starter config and clears pending drafts, while config patching is per-flow. It warns against setting post_mix on the agent's own initiative and explains feed_days conditions. This is beyond basic usage and routes the agent appropriately.

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