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
| Name | Required | Description | Default |
|---|---|---|---|
| uid | Yes | Flow model UID to duplicate |
Implementation Reference
- src/index.ts:292-310 (handler)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); - src/index.ts:286-291 (schema)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",