Skip to main content
Glama

save_flow_model

Create or update a flow page block or model. Provide uid to update, or omit to create a new one. Specify component type with 'use' field.

Instructions

Create or update a flowPage block/model. If 'uid' is provided in values, it updates; otherwise creates a new one. The 'use' field specifies the component type (e.g. 'JSBlockModel', 'TableBlockModel'). NOTE: after creating, call attach_flow_model to make it appear on the page.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
valuesYesFlow model data. Key fields: uid (optional), use (component type), parentId, subKey, subType, stepParams, sortIndex

Implementation Reference

  • src/index.ts:231-242 (registration)
    Registration of the 'save_flow_model' tool via server.registerTool() with name, schema, and handler.
    server.registerTool(
      "save_flow_model",
      {
        description: "Create or update a flowPage block/model. If 'uid' is provided in values, it updates; otherwise creates a new one. The 'use' field specifies the component type (e.g. 'JSBlockModel', 'TableBlockModel'). NOTE: after creating, call attach_flow_model to make it appear on the page.",
        inputSchema: {
          values: JsonObject.describe("Flow model data. Key fields: uid (optional), use (component type), parentId, subKey, subType, stepParams, sortIndex"),
        },
      },
      // NocoBase assigns the entire body as ctx.action.params.values, so send data directly (no { values } wrapper)
      async ({ values }) =>
        ok(await nocoFetch("/api/flowModels:save", { method: "POST", body: JSON.stringify(values) }))
    );
  • Handler function that POSTs to /api/flowModels:save with the provided values.
    async ({ values }) =>
      ok(await nocoFetch("/api/flowModels:save", { method: "POST", body: JSON.stringify(values) }))
  • Input schema: description and inputSchema defining 'values' as a JSON object.
    {
      description: "Create or update a flowPage block/model. If 'uid' is provided in values, it updates; otherwise creates a new one. The 'use' field specifies the component type (e.g. 'JSBlockModel', 'TableBlockModel'). NOTE: after creating, call attach_flow_model to make it appear on the page.",
      inputSchema: {
        values: JsonObject.describe("Flow model data. Key fields: uid (optional), use (component type), parentId, subKey, subType, stepParams, sortIndex"),
      },
  • Helper function 'ok' that wraps data into the MCP content response format.
    const ok = (data: unknown) => ({
      content: [{ type: "text" as const, text: JSON.stringify(data, null, 2) }],
    });
Behavior3/5

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

Describes the core behavior (create/update based on uid) and the need for attach_flow_model, but doesn't detail side effects, return values, or error conditions. With no annotations, more behavior disclosure would improve confidence.

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?

Three tight sentences: purpose, conditional logic, and key usage note. No wasted words, front-loaded with primary action.

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?

Covers the main workflow and crucial post-call. Lacks return value description and any error handling notes. Given the tool's complexity (one parameter, no output schema), it is fairly complete.

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

Parameters4/5

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

The input schema already describes the 'values' parameter with 100% coverage. The description adds meaning by explaining how 'uid' controls update logic and lists key fields, going beyond the schema.

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?

Clearly states it creates or updates a flowPage block/model. Distinguishes from sibling tools like attach_flow_model (which is for making it appear) and destroy_flow_model. Gives concrete examples of component types.

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?

Explicitly tells when to create vs update based on uid. Provides critical guidance to call attach_flow_model after creation. Could have mentioned alternatives like destroy or get, but the note suffices.

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