get_page
Retrieves the complete nested UI schema tree for a given node UID, including all descendant properties.
Instructions
Get the full nested UI schema tree for a node by UID (uses :getProperties to include all descendants)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uid | Yes | UI schema UID |
Implementation Reference
- src/index.ts:67-74 (registration)Registration of the 'get_page' tool on the MCP server with its schema (uid input string) and handler function.
server.registerTool( "get_page", { description: "Get the full nested UI schema tree for a node by UID (uses :getProperties to include all descendants)", inputSchema: { uid: z.string().describe("UI schema UID") }, }, async ({ uid }) => ok(await nocoFetch(`/api/uiSchemas:getProperties/${uid}`)) ); - src/index.ts:73-73 (handler)Handler function for 'get_page': calls the NocoBase API endpoint /api/uiSchemas:getProperties/{uid} to retrieve the full nested UI schema tree.
async ({ uid }) => ok(await nocoFetch(`/api/uiSchemas:getProperties/${uid}`)) - src/index.ts:71-71 (schema)Input schema for 'get_page': expects a single required string parameter 'uid' representing the UI schema UID.
inputSchema: { uid: z.string().describe("UI schema UID") }, - src/index.ts:18-27 (helper)The nocoFetch helper function and ok response wrapper used by the get_page 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; } }