Skip to main content
Glama

remove_ui_schema

Delete a UI schema node and all its descendants by providing its UID. Irreversible.

Instructions

Remove a UI schema node and all its descendants by UID. DESTRUCTIVE — cannot be undone.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uidYesUI schema UID to remove

Implementation Reference

  • src/index.ts:153-162 (registration)
    Registration of the 'remove_ui_schema' tool with server.registerTool, including its description, input schema (uid: z.string()), and handler that makes a DELETE request to /api/uiSchemas:remove/{uid}.
    // 12. remove_ui_schema
    server.registerTool(
      "remove_ui_schema",
      {
        description: "Remove a UI schema node and all its descendants by UID. DESTRUCTIVE — cannot be undone.",
        inputSchema: { uid: z.string().describe("UI schema UID to remove") },
      },
      async ({ uid }) =>
        ok(await nocoFetch(`/api/uiSchemas:remove/${uid}`, { method: "DELETE" }))
    );
  • The inline async handler for remove_ui_schema: calls nocoFetch with DELETE method on the uiSchemas:remove endpoint.
    async ({ uid }) =>
      ok(await nocoFetch(`/api/uiSchemas:remove/${uid}`, { method: "DELETE" }))
  • Input schema for remove_ui_schema: a single required 'uid' string field.
    inputSchema: { uid: z.string().describe("UI schema UID to remove") },
  • The nocoFetch helper used by the handler to make the HTTP DELETE request to the backend API.
    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; }
    }
Behavior3/5

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

No annotations are provided, so the description carries full burden. It explicitly states the action is destructive and cannot be undone, adding behavioral context. However, it does not disclose additional details such as required permissions, side effects beyond removing descendants, or return behavior.

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 extremely concise with two sentences, front-loading the purpose and adding a critical warning. No redundant information is present.

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's simplicity (single required parameter, no output schema, well-defined behavior), the description is largely complete. It explains the destructive nature and the scope of removal, which is sufficient for an agent to understand its effect.

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 the baseline is 3. The description adds minimal extra meaning beyond the schema's parameter description ('UI schema UID to remove') by stating 'by UID'. This does not significantly enhance semantics.

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 ('Remove'), the target ('UI schema node'), the scope ('and all its descendants'), and the identifier ('by UID'). It effectively distinguishes from siblings like update_ui_schema (which modifies) and insert_adjacent_schema (which adds).

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 communicates when to use this tool (for removal) and includes a explicit warning about its destructive nature. However, it does not explicitly state when not to use it or provide alternative tools for related operations.

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