Skip to main content
Glama

insert_new_schema

Creates and inserts a new UI schema node into NocoBase. Provide a JSON schema to define the node's structure and placement.

Instructions

Create and insert a new UI schema node via NocoBase's insertNewSchema action

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
schemaYesSchema node to create and insert (JSON)

Implementation Reference

  • The handler function for insert_new_schema: sends a POST request to /api/uiSchemas:insertNewSchema with the schema JSON body.
      async ({ schema }) =>
        ok(await nocoFetch("/api/uiSchemas:insertNewSchema", { method: "POST", body: JSON.stringify({ schema }) }))
    );
  • Input schema for insert_new_schema: a single 'schema' parameter of type JsonObject (record of string to unknown).
    {
      description: "Create and insert a new UI schema node via NocoBase's insertNewSchema action",
      inputSchema: { schema: JsonObject.describe("Schema node to create and insert (JSON)") },
    },
  • src/index.ts:98-106 (registration)
    Registration of insert_new_schema tool via server.registerTool() with name, description, input schema, and handler.
    server.registerTool(
      "insert_new_schema",
      {
        description: "Create and insert a new UI schema node via NocoBase's insertNewSchema action",
        inputSchema: { schema: JsonObject.describe("Schema node to create and insert (JSON)") },
      },
      async ({ schema }) =>
        ok(await nocoFetch("/api/uiSchemas:insertNewSchema", { method: "POST", body: JSON.stringify({ schema }) }))
    );
  • src/index.ts:394-400 (registration)
    MANUAL_TOOLS set includes 'insert_new_schema' so it is skipped by dynamic tool registration from Swagger.
    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",
      "get_js_block","update_js_block",
  • Helper function 'ok' used by the handler to format the response as text content.
    const ok = (data: unknown) => ({
      content: [{ type: "text" as const, text: JSON.stringify(data, null, 2) }],
    });
Behavior2/5

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

No annotations provided. Description only states 'create and insert' but does not disclose behavioral traits like conflict handling, permission requirements, or side effects. Minimal transparency.

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?

Single sentence, 14 words, no redundant information. Efficiently communicates the core action.

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

Completeness2/5

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

Given the tool has a complex nested object parameter and no output schema, the description does not explain the schema node structure or return behavior. Insufficient for an agent to confidently invoke the tool.

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% and description adds 'via NocoBase's insertNewSchema action', but does not elaborate on the expected structure of the schema object beyond what the schema already specifies. Adequate but not enhanced.

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?

Description clearly states the verb 'create and insert' and the resource 'UI schema node', and differentiates from siblings like insert_adjacent_schema by specifying it's a new insertion via NocoBase action.

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 explicit guidance on when to use this tool versus alternatives like insert_adjacent_schema or update_ui_schema. Lacks context for selecting this tool over siblings.

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