Skip to main content
Glama

update_ui_schema

Perform partial updates to a UI schema node using its UID. Specify the schema UID and a JSON object with the fields to change.

Instructions

Patch an existing UI schema node by UID (partial update)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uidYesUI schema UID
patchYesPartial schema fields to update (JSON)

Implementation Reference

  • src/index.ts:127-138 (registration)
    Registration of the 'update_ui_schema' tool via server.registerTool, including its input schema (uid, patch) and handler logic.
    server.registerTool(
      "update_ui_schema",
      {
        description: "Patch an existing UI schema node by UID (partial update)",
        inputSchema: {
          uid: z.string().describe("UI schema UID"),
          patch: JsonObject.describe("Partial schema fields to update (JSON)"),
        },
      },
      async ({ uid, patch }) =>
        ok(await nocoFetch(`/api/uiSchemas:patch`, { method: "POST", body: JSON.stringify({ ...patch, "x-uid": uid }) }))
    );
  • Handler function for update_ui_schema that calls nocoFetch('POST /api/uiSchemas:patch') with the patch data including x-uid.
    async ({ uid, patch }) =>
      ok(await nocoFetch(`/api/uiSchemas:patch`, { method: "POST", body: JSON.stringify({ ...patch, "x-uid": uid }) }))
  • Input schema for update_ui_schema requiring a uid (string) and patch (JSON object) for partial updates.
    {
      description: "Patch an existing UI schema node by UID (partial update)",
      inputSchema: {
        uid: z.string().describe("UI schema UID"),
        patch: JsonObject.describe("Partial schema fields to update (JSON)"),
      },
  • Helper function 'ok' that wraps data into MCP content response format (used by the handler).
    const ok = (data: unknown) => ({
      content: [{ type: "text" as const, text: JSON.stringify(data, null, 2) }],
    });
  • Helper function 'nocoFetch' that makes HTTP requests to the NocoBase API (used by the handler).
    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; }
    }
Behavior2/5

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

No annotations provided. Description only mentions 'partial update' but lacks details on idempotency, error behavior, required permissions, or what happens on invalid UID/patch.

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, to the point, no redundant words. Efficient and front-loaded.

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

Completeness3/5

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

No output schema, no annotations. For a mutation tool, more detail on success/failure behavior and patch structure would improve completeness. Sibling tools exist but no distinction provided.

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 description coverage is 100%, so baseline is 3. Description adds no extra meaning beyond schema; does not clarify patch format or constraints.

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 verb 'Patch', resource 'UI schema node', and key detail 'partial update'. It distinguishes from siblings like 'batch_patch_ui_schema' which implies batch operation.

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 guidance on when to use this tool vs alternatives (e.g., batch_patch_ui_schema). No prerequisites or context provided for when partial update is appropriate.

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