Skip to main content
Glama

clone_flow

Uses an existing conversation flow as a starting point to create a new adapted flow. Can clone across or within agents, apply find/replace text adaptations, add/update/remove steps, and optionally clone referenced templates so the original flow and its templates remain completely untouched.

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": {
      "sourceFlowIdentifier": "<sourceFlowIdentifier>",
      "newName": "<newName>"
    },
    "name": "clone_flow"
  }
}

Input Schema

NameRequiredDescriptionDefault
agentIdNoTarget agent ID/name where the new flow will be created (defaults to active agent).
newNameYesName for the newly created flow.
folderIdNoOptional target flow folder ID.
autoLayoutNoOptional true to re-layout all nodes cleanly.
folderNameNoOptional target flow folder name (created automatically if it does not exist; cloned templates are also organized into a matching template folder unless templateFolderName is specified).
upsertEdgesNoOptional edges to add or rewire on top of the cloned flow.
upsertNodesNoOptional nodes to add or override on top of the cloned flow.
removeEdgeIdsNo
removeNodeIdsNoOptional node IDs from the source flow to remove in the new flow.
sourceAgentIdNoOptional agent ID/name where the source flow lives (defaults to active agent).
newDescriptionNoOptional description for the new flow.
removeEdgesFromNo
templateFolderIdNoOptional target template folder ID for cloned templates.
textReplacementsNoOptional find/replace rules to adapt copy across both flow nodes and cloned templates.
mediaReplacementsNoOptional media URL replacements to swap images/videos across cloned templates and sendMedia nodes (by nodeId, cardIndex, or findUrl).
templateFolderNameNoOptional target template folder name for cloned templates (created automatically if needed; defaults to folderName when folderName is set).
sourceFlowIdentifierYesName or ID of the existing source flow to copy/adapt.
cloneReferencedTemplatesNoWhen true (or automatically when textReplacements is provided or cloning across agents), creates independent copies of referenced templates for the new flow so the source flow templates are untouched.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / upsertNodes / items / properties / data / properties / triggerConnectionId
      Added value: +{
      +  "description": "Optional calendar connection ID filter ('all' or a specific connectionId).",
      +  "type": "string"
      +}
    • addedInput schema / properties / upsertNodes / items / properties / data / properties / triggerEventSources
      Added value: +{
      +  "description": "Optional list of checked Event Sources for calendar triggers (e.g. ['external_only', 'ai_agent:<aiAgentId>', '<rubiAppId>']). Omit or leave with triggerRubiAppId='all' for all sources.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / upsertNodes / items / properties / data / properties / triggerRubiAppId
      Added value: +{
      +  "description": "Optional event source / Rubi App ID filter for calendar triggers ('all', 'none', 'custom', 'external_only', 'ai_agent:<aiAgentId>', or a specific Rubi App ID).",
      +  "type": "string"
      +}
  2. Changed4 schema fields changed
    • changedInput schema / properties / folderId / description
      Previous value: -"Optional target folder ID."New value: +"Optional target flow folder ID."
    • changedInput schema / properties / folderName / description
      Previous value: -"Optional target folder name (created automatically if it does not exist)."New value: +"Optional target flow folder name (created automatically if it does not exist; cloned templates are also organized into a matching template folder unless templateFolderName is specified)."
    • addedInput schema / properties / templateFolderId
      Added value: +{
      +  "description": "Optional target template folder ID for cloned templates.",
      +  "type": "string"
      +}
    • addedInput schema / properties / templateFolderName
      Added value: +{
      +  "description": "Optional target template folder name for cloned templates (created automatically if needed; defaults to folderName when folderName is set).",
      +  "type": "string"
      +}
  3. Changed3 schema fields changed
    • addedInput schema / properties / mediaReplacements
      Added value: +{
      +  "description": "Optional media URL replacements to swap images/videos across cloned templates and sendMedia nodes (by nodeId, cardIndex, or findUrl).",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "cardIndex": {
      +        "description": "Optional 0-based card index when updating a specific card in a carousel template.",
      +        "type": "number"
      +      },
      +      "findUrl": {
      +        "description": "Optional source media/file URL to replace across cloned templates and sendMedia nodes.",
      +        "type": "string"
      +      },
      +      "newMediaUrl": {
      +        "description": "New HTTPS or proxied media URL (e.g. returned by search_images).",
      +        "type": "string"
      +      },
      +      "nodeId": {
      +        "description": "Optional flow node ID whose referenced template or media image should be updated.",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "newMediaUrl"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • changedInput schema / properties / textReplacements / items / properties / find / description
      Previous value: -"Text or phrase to search for (case-insensitive)."New value: +"Text or phrase (or exact source media URL) to search for."
    • changedInput schema / properties / textReplacements / items / properties / replace / description
      Previous value: -"Replacement text."New value: +"Replacement text (or replacement media URL)."
  4. Added

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden and does disclose important traits: cross-agent cloning, text adaptations, node/edge edits, optional template cloning, and that the source flow and templates remain untouched. It stops short of covering permissions, validation behavior, name-collision handling, or what the call returns.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded in the first sentence, and the second sentence efficiently enumerates the main adaptation capabilities and non-destructive behavior. There is no wasted language.

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 an 18-parameter mutation tool with no annotations and no output schema, the description covers the main operational intent and key safety-related behavior. It is still missing return-value expectations and permission/validation context, but the rich input schema carries most parameter detail.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is high at 89%, so parameter-level semantics are mostly handled by the schema. The description usefully groups capabilities such as cross-agent cloning, text replacements, step edits, and template cloning, but it adds no detailed parameter syntax or defaults beyond that.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb and resource: cloning an existing conversation flow into a new adapted flow. It clearly distinguishes cloning from creating a flow from scratch conceptually, but it does not explicitly name sibling tools such as create_flow for contrast.

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

Usage Guidelines3/5

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

It implies the tool should be used when adapting or duplicating an existing flow, including across agents. However, it gives no explicit when-to-use versus create_flow/update_flow guidance, no prerequisites, and no exclusions.

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