Skip to main content
Glama

get_flow_model

Retrieve a flowPage block's model by its UID, including component type, parentId, and stepParams. Use this for blocks inside flowPage type pages.

Instructions

Get a flowPage block/model by UID. Use this for blocks inside flowPage type pages (not classic 'page' type). Returns the block's model data including 'use' (component type), 'parentId', 'stepParams', etc.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uidYesFlow model UID (from 'Copy UID' on a block inside a flowPage)
includeAsyncNodeNoWhether to include async node data (default false)

Implementation Reference

  • The handler for 'get_flow_model' — calls server.registerTool with name 'get_flow_model', an input schema requiring 'uid' (string) and optional 'includeAsyncNode' (boolean), and an async handler that fetches from /api/flowModels:findOne with those parameters.
    server.registerTool(
      "get_flow_model",
      {
        description: "Get a flowPage block/model by UID. Use this for blocks inside flowPage type pages (not classic 'page' type). Returns the block's model data including 'use' (component type), 'parentId', 'stepParams', etc.",
        inputSchema: {
          uid: z.string().describe("Flow model UID (from 'Copy UID' on a block inside a flowPage)"),
          includeAsyncNode: z.boolean().optional().describe("Whether to include async node data (default false)"),
        },
      },
      async ({ uid, includeAsyncNode = false }) =>
        ok(await nocoFetch(`/api/flowModels:findOne?uid=${uid}&includeAsyncNode=${includeAsyncNode}`))
    );
  • src/index.ts:199-210 (registration)
    Registration of 'get_flow_model' via server.registerTool(). The tool is also listed in the MANUAL_TOOLS set (line 398) to prevent duplication from dynamic OpenAPI/Swagger tool loading.
    server.registerTool(
      "get_flow_model",
      {
        description: "Get a flowPage block/model by UID. Use this for blocks inside flowPage type pages (not classic 'page' type). Returns the block's model data including 'use' (component type), 'parentId', 'stepParams', etc.",
        inputSchema: {
          uid: z.string().describe("Flow model UID (from 'Copy UID' on a block inside a flowPage)"),
          includeAsyncNode: z.boolean().optional().describe("Whether to include async node data (default false)"),
        },
      },
      async ({ uid, includeAsyncNode = false }) =>
        ok(await nocoFetch(`/api/flowModels:findOne?uid=${uid}&includeAsyncNode=${includeAsyncNode}`))
    );
  • The nocoFetch helper function used by the get_flow_model handler to make HTTP requests to the NocoBase API. It constructs the full URL, adds auth headers, and parses the JSON response.
    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; }
    }
  • The ok helper function that wraps data into the MCP content response format used by the get_flow_model handler.
    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?

No annotations are provided, so the description bears the full burden. It explains that the tool returns model data including specific fields, implying a read operation. However, it does not explicitly state that the operation is read-only or disclose any potential side effects, permissions, or error conditions. The information is adequate but not rich.

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 consists of two concise sentences. The first immediately states the purpose, and the second adds usage guidance and return info. Every sentence is valuable and there is no extraneous text.

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?

Given the tool has only 2 parameters and no output schema, the description covers the main functionality, usage context, and key return fields. However, it does not mention the 'includeAsyncNode' parameter in the text, which is a minor gap. Overall, it is mostly complete for the tool's simplicity.

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 coverage is 100%, so the baseline is 3. The description adds some context for the 'uid' parameter (mentioning 'Copy UID' usage) but does not provide additional meaning for 'includeAsyncNode' beyond what the schema already states. Thus, it does not significantly enhance parameter understanding.

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 ('Get') and resource ('flowPage block/model by UID'), and explicitly distinguishes it from sibling tools like get_flow_model_by_parent by specifying 'use this for blocks inside flowPage type pages (not classic page type)'.

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 provides explicit context by saying 'Use this for blocks inside flowPage type pages (not classic page type)', which tells when to use this tool vs. alternatives. It does not explicitly list when not to use it, but the guidance is clear enough.

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