Skip to main content
Glama

destroy_flow_model

Delete a flow model and all its child blocks by specifying the model's UID.

Instructions

Delete a flowPage block/model by UID. DESTRUCTIVE — also removes child blocks.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uidYesFlow model UID to delete

Implementation Reference

  • Handler for destroy_flow_model tool. Deletes a flowPage block/model by UID via POST to /api/flowModels:destroy?filterByTk=${uid}.
    // 21. destroy_flow_model
    server.registerTool(
      "destroy_flow_model",
      {
        description: "Delete a flowPage block/model by UID. DESTRUCTIVE — also removes child blocks.",
        inputSchema: {
          uid: z.string().describe("Flow model UID to delete"),
        },
      },
      async ({ uid }) =>
        ok(await nocoFetch(`/api/flowModels:destroy?filterByTk=${uid}`, { method: "DELETE" }))
    );
  • Input schema for destroy_flow_model: requires a uid (string) describing the flow model UID to delete.
    inputSchema: {
      uid: z.string().describe("Flow model UID to delete"),
    },
  • src/index.ts:394-399 (registration)
    Registration: destroy_flow_model is listed in the MANUAL_TOOLS set to explicitly exclude it from dynamic OpenAPI-based tool generation.
    const MANUAL_TOOLS = new Set([
      "list_collections","get_collection","list_pages","get_page",
      "get_parent_schema","create_page","insert_new_schema","insert_adjacent_schema",
      "update_ui_schema","batch_patch_ui_schema","remove_ui_schema","save_as_template",
      "list_desktop_routes","get_flow_model","get_flow_model_by_parent","save_flow_model",
      "attach_flow_model","move_flow_model","duplicate_flow_model","destroy_flow_model",
  • The nocoFetch helper function is used by destroy_flow_model to make the DELETE API call.
    async function nocoFetch(path: string, options: RequestInit = {}): Promise<unknown> {
      const url = `${NOCOBASE_URL}${path}`;
      const res = await fetch(url, {
        ...options,
        headers: { ...reqHeaders, ...(options.headers as Record<string, string> | undefined) },
      });
      const text = await res.text();
      if (!res.ok) throw new Error(`HTTP ${res.status} ${res.statusText}: ${text}`);
      try { return JSON.parse(text); } catch { return text; }
    }
Behavior4/5

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

With no annotations provided, the description carries the full burden. It explicitly states the tool is destructive and that it also removes child blocks, which are important behavioral traits. It does not detail irreversibility or system-side effects, but for a delete tool this is adequate.

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 description is a single, efficient sentence that wastes no words. It front-loads the action ('Delete') and immediately provides critical context (DESTRUCTIVE and child removal).

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 simple one-parameter delete tool without an output schema, the description sufficiently covers what the tool does and its destructive scope. It could mention the return value (e.g., success indicator), but this is a minor omission.

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 input schema already describes the parameter as 'Flow model UID to delete' with 100% coverage. The description adds no further meaning beyond what is in the schema, so it meets the baseline of 3.

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 action ('Delete'), the target object ('a flowPage block/model'), and the method of identification ('by UID'). It distinguishes itself from siblings like 'duplicate_flow_model' and 'save_flow_model' by explicitly noting its destructive nature and scope (removes child blocks).

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?

The description implicitly conveys when to use the tool: when you need to delete a flow model and its children. No alternative deletion tool exists among siblings, so explicit when-not guidance is unnecessary. The warning 'DESTRUCTIVE — also removes child blocks' provides sufficient context.

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