Skip to main content
Glama
andrewlwn77
by andrewlwn77

list_bases

Retrieve all available NocoDB projects and databases to manage tables, records, views, and file attachments for operational data storage.

Instructions

List all available NocoDB bases/projects

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'list_bases' MCP tool. It calls the NocoDB client's listBases method and formats the response with base details and count.
    handler: async (client: NocoDBClient) => {
      const bases = await client.listBases();
      return {
        bases: bases.map((base) => ({
          id: base.id,
          title: base.title,
          status: base.status,
          created_at: base.created_at,
          updated_at: base.updated_at,
        })),
        count: bases.length,
      };
    },
  • The input schema for the 'list_bases' tool, defining it as an empty object (no parameters required).
    inputSchema: {
      type: "object",
      properties: {},
    },
  • The 'list_bases' tool definition and registration within the databaseTools array.
    {
      name: "list_bases",
      description: "List all available NocoDB bases/projects",
      inputSchema: {
        type: "object",
        properties: {},
      },
      handler: async (client: NocoDBClient) => {
        const bases = await client.listBases();
        return {
          bases: bases.map((base) => ({
            id: base.id,
            title: base.title,
            status: base.status,
            created_at: base.created_at,
            updated_at: base.updated_at,
          })),
          count: bases.length,
        };
      },
    },
  • Helper method in NocoDBClient that performs the actual API call to list bases/projects from the NocoDB server.
    async listBases(): Promise<NocoDBBase[]> {
      const response = await this.client.get("/api/v1/db/meta/projects");
      return response.data.list;
    }
  • src/index.ts:55-62 (registration)
    Registration of databaseTools (including list_bases) into the combined allTools list used by the MCP server for tool handling.
    const allTools = [
      ...databaseTools,
      ...tableTools,
      ...recordTools,
      ...viewTools,
      ...queryTools,
      ...attachmentTools,
    ];

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/andrewlwn77/nocodb-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server