Skip to main content
Glama

list_desktop_routes

List all desktop routes including pages, menus, groups, and tabs in NocoBase v2, returning type and schemaUid for each.

Instructions

List all desktop routes (pages and menus) in NocoBase v2. Each route has a type: 'page', 'flowPage', 'group', 'tabs'. Use schemaUid to fetch page content. Works for both classic pages and flowPages.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageSizeNoNumber of routes per page (default 100)

Implementation Reference

  • src/index.ts:184-194 (registration)
    Registration of the 'list_desktop_routes' tool with server.registerTool(), including description, input schema, and handler.
    server.registerTool(
      "list_desktop_routes",
      {
        description: "List all desktop routes (pages and menus) in NocoBase v2. Each route has a type: 'page', 'flowPage', 'group', 'tabs'. Use schemaUid to fetch page content. Works for both classic pages and flowPages.",
        inputSchema: {
          pageSize: z.number().optional().describe("Number of routes per page (default 100)"),
        },
      },
      async ({ pageSize = 100 }) =>
        ok(await nocoFetch(`/api/desktopRoutes?pageSize=${pageSize}`))
    );
  • Handler function for the tool: accepts optional pageSize, calls nocoFetch to GET /api/desktopRoutes, wraps result in ok().
      async ({ pageSize = 100 }) =>
        ok(await nocoFetch(`/api/desktopRoutes?pageSize=${pageSize}`))
    );
  • Input schema definition: pageSize is an optional number (default 100).
    inputSchema: {
      pageSize: z.number().optional().describe("Number of routes per page (default 100)"),
    },
  • nocoFetch helper used by the handler to make authenticated HTTP requests to the NocoBase 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; }
    }
  • ok() helper that wraps data into the MCP content response format.
    const ok = (data: unknown) => ({
      content: [{ type: "text" as const, text: JSON.stringify(data, null, 2) }],
    });
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses the tool is a read operation (list), describes the output includes type and schemaUid, and confirms compatibility with classic pages and flowPages. This provides sufficient behavioral context beyond the parameter schema.

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 sentences. The first sentence immediately states the purpose, and the second adds key details about output and usage. No redundant or unnecessary 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 has one optional parameter, no output schema, and no annotations, the description sufficiently covers its purpose, output shape (types and schemaUid), and scope (classic pages and flowPages). It lacks explicit pagination details, but the schema covers the pageSize parameter.

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?

The input schema already describes the pageSize parameter with default 100. The description adds no additional meaning to the parameter beyond what the schema provides. Schema coverage is 100%, so baseline 3 is appropriate.

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 'List all desktop routes (pages and menus) in NocoBase v2', providing a specific verb and resource. It further distinguishes itself from siblings like list_pages by mentioning route types and that it works for both classic pages and flowPages.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context by stating 'Use schemaUid to fetch page content' and 'Works for both classic pages and flowPages', but it does not explicitly mention when not to use this tool or name alternatives like list_pages for comparison. Guidance is implied rather than explicit.

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