Skip to main content
Glama

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
NameRequiredDescriptionDefault
table_idYesThe ID of the table

Implementation Reference

  • 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, })), }; },
  • 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, ];

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