Skip to main content
Glama

duplicate_flow_model

Create a deep copy of a flow model and attach it to the same parent. Returns the new block's data.

Instructions

Duplicate an existing flowPage block/model (deep copy) and automatically attach it to the same parent. Returns the new block's data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uidYesFlow model UID to duplicate

Implementation Reference

  • Handler function for duplicate_flow_model tool. Calls the API to duplicate a flow model by UID, then automatically attaches the new block to the same parent using the attach endpoint. Returns the duplication result.
    async ({ uid }) => {
      // Step 1: duplicate
      const result = await nocoFetch(`/api/flowModels:duplicate?uid=${uid}`, { method: "POST" }) as { data: Record<string, unknown> };
      const model = result?.data;
      const newUid = model?.uid as string;
      const parentId = model?.parentId as string;
      const subKey = model?.subKey as string;
      const subType = model?.subType as string | undefined;
    
      if (!newUid || !parentId || !subKey) {
        return ok(result);
      }
    
      // Step 2: auto-attach to the same parent
      const qs = new URLSearchParams({ uid: newUid, parentId, subKey });
      if (subType) qs.set("subType", subType);
      await nocoFetch(`/api/flowModels:attach?${qs}`, { method: "POST" });
    
      return ok(result);
  • Input schema for duplicate_flow_model: accepts a single 'uid' string parameter describing the flow model UID to duplicate.
    {
      description: "Duplicate an existing flowPage block/model (deep copy) and automatically attach it to the same parent. Returns the new block's data.",
      inputSchema: {
        uid: z.string().describe("Flow model UID to duplicate"),
      },
    },
  • src/index.ts:284-285 (registration)
    Registration of the 'duplicate_flow_model' tool via server.registerTool.
    server.registerTool(
      "duplicate_flow_model",
  • src/index.ts:399-399 (registration)
    Listed in MANUAL_TOOLS set to mark it as a manually registered tool (not auto-generated from OpenAPI).
    "attach_flow_model","move_flow_model","duplicate_flow_model","destroy_flow_model",
Behavior3/5

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

With no annotations, the description adds some value by mentioning 'deep copy' and 'automatically attach to same parent', but it does not cover permissions, reversibility, or what happens to the original. Basic transparency is provided but not exhaustive.

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?

A single sentence that immediately states the action and key behaviors. Every word is functional; no redundancy or filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with one parameter and no output schema, the description covers the action and return value, but does not describe the return structure beyond 'the new block's data'. Additional details about the data format or potential error conditions would improve completeness.

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?

The sole parameter 'uid' is fully covered by the schema (100% coverage). The description merely restates the schema's description ('Flow model UID to duplicate') without adding new meaning or constraints.

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 clearly states the action ('duplicate'), resource ('flowPage block/model'), and scope ('deep copy, attach to same parent'). It distinguishes from sibling tools that do related but different actions (e.g., destroy, move), though not explicitly.

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus alternatives like 'destroy_flow_model' or 'save_flow_model'. It does not mention prerequisites (e.g., existence of the source model) or when not to use.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/puguhsudarma/nocobase-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server