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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/database.ts:19-31 (handler)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, }; },
- src/tools/database.ts:15-18 (schema)The input schema for the 'list_bases' tool, defining it as an empty object (no parameters required).inputSchema: { type: "object", properties: {}, },
- src/tools/database.ts:12-32 (registration)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, }; }, },
- src/nocodb-api.ts:59-62 (helper)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, ];