Skip to main content
Glama
andrewlwn77
by andrewlwn77

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,
    ];
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves information, implying a read-only operation, but doesn't specify permissions required, rate limits, error conditions, or what 'detailed information' includes beyond schema. This leaves significant gaps for a tool with no annotation coverage.

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 is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It is appropriately sized and front-loaded, making it easy to understand quickly. Every part of the sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a tool that retrieves 'detailed information' about tables, the description is incomplete. There are no annotations, no output schema, and it doesn't specify what 'detailed information' includes (e.g., column types, constraints, metadata). This leaves the agent guessing about the return format and scope, which is inadequate for effective use.

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 has 100% description coverage, with 'table_id' clearly documented. The description adds no additional parameter semantics beyond what the schema provides, such as format examples or constraints. With high schema coverage, the baseline score of 3 is appropriate, as the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Get') and resource ('detailed information about a table including its schema'), making the purpose specific and understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_base_info' or 'list_tables', which might provide related but different information.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. For example, it doesn't clarify if this is for schema details only versus data retrieval (compared to 'get_record' or 'query'), or how it differs from 'list_tables' which might provide summary information. No exclusions or prerequisites are mentioned.

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

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