get_table_info
Retrieve table schema details from NocoDB databases to understand structure and fields for data operations.
Instructions
Get detailed information about a table including its schema
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table_id | Yes | The ID of the table |
Implementation Reference
- src/tools/table.ts:47-76 (handler)The handler function for the 'get_table_info' tool. It fetches the table details and list of columns using the NocoDB client and returns structured information.handler: async (client: NocoDBClient, args: { table_id: string }) => { const [table, columns] = await Promise.all([ client.getTable(args.table_id), client.listColumns(args.table_id), ]); return { table: { id: table.id, table_name: table.table_name, title: table.title, type: table.type, enabled: table.enabled, created_at: table.created_at, updated_at: table.updated_at, }, columns: columns.map((col) => ({ id: col.id, title: col.title, column_name: col.column_name, uidt: col.uidt, dt: col.dt, pk: col.pk, pv: col.pv, rqd: col.rqd, unique: col.unique, ai: col.ai, })), }; },
- src/tools/table.ts:37-46 (schema)The input schema definition for the 'get_table_info' tool, specifying the required 'table_id' parameter.inputSchema: { type: "object", properties: { table_id: { type: "string", description: "The ID of the table", }, }, required: ["table_id"], },
- src/index.ts:55-62 (registration)Registration of the tableTools array (which includes 'get_table_info') into the combined allTools list used by the MCP server's tool handlers.const allTools = [ ...databaseTools, ...tableTools, ...recordTools, ...viewTools, ...queryTools, ...attachmentTools, ];