Skip to main content
Glama
andrewlwn77
by andrewlwn77

list_records

Retrieve records from a NocoDB table with filtering, sorting, and pagination options to manage and query database data.

Instructions

List records from a table with optional filtering, sorting, and pagination

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
base_idYesThe ID of the base/project
table_nameYesThe name of the table
whereNoFilter condition (e.g., "(status,eq,active)")
sortNoSort fields (prefix with - for descending, e.g., "-created_at")
fieldsNoComma-separated list of fields to return
limitNoNumber of records to return (default: 25)
offsetNoNumber of records to skip
view_idNoView ID to use for filtering

Implementation Reference

  • The handler function for the 'list_records' MCP tool. It takes the tool arguments and forwards them to the NocoDBClient's listRecords method, returning the records, pageInfo, and count.
    handler: async (
      client: NocoDBClient,
      args: {
        base_id: string;
        table_name: string;
        where?: string;
        sort?: string;
        fields?: string;
        limit?: number;
        offset?: number;
        view_id?: string;
      },
    ) => {
      const result = await client.listRecords(args.base_id, args.table_name, {
        where: args.where,
        sort: args.sort,
        fields: args.fields,
        limit: args.limit,
        offset: args.offset,
        viewId: args.view_id,
      });
      return {
        records: result.list,
        pageInfo: result.pageInfo,
        count: result.list.length,
      };
    },
  • The input schema for the 'list_records' tool, defining required base_id and table_name, and optional filtering, sorting, pagination parameters.
    inputSchema: {
      type: "object",
      properties: {
        base_id: {
          type: "string",
          description: "The ID of the base/project",
        },
        table_name: {
          type: "string",
          description: "The name of the table",
        },
        where: {
          type: "string",
          description: 'Filter condition (e.g., "(status,eq,active)")',
        },
        sort: {
          type: "string",
          description:
            'Sort fields (prefix with - for descending, e.g., "-created_at")',
        },
        fields: {
          type: "string",
          description: "Comma-separated list of fields to return",
        },
        limit: {
          type: "number",
          description: "Number of records to return (default: 25)",
        },
        offset: {
          type: "number",
          description: "Number of records to skip",
        },
        view_id: {
          type: "string",
          description: "View ID to use for filtering",
        },
      },
      required: ["base_id", "table_name"],
    },
  • src/index.ts:55-62 (registration)
    Registration of the recordTools (including list_records) by spreading into the allTools array used for MCP server tool listing and execution.
    const allTools = [
      ...databaseTools,
      ...tableTools,
      ...recordTools,
      ...viewTools,
      ...queryTools,
      ...attachmentTools,
    ];
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions the tool supports filtering, sorting, and pagination but doesn't describe important behaviors like rate limits, authentication requirements, error handling, response format, or whether this is a read-only operation. For a tool with 8 parameters and no annotation coverage, this leaves significant gaps in understanding how the tool actually behaves.

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 front-loads the core purpose ('List records from a table') followed by key capabilities. There's zero wasted language, and every word earns its place by conveying essential information about the tool's functionality.

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 tool's complexity (8 parameters, no annotations, no output schema), the description is inadequate. It doesn't explain what 'records' consist of, what format they're returned in, how errors are handled, or any limitations. For a data retrieval tool with multiple filtering options and no structured output definition, the description should provide more context about the operation's scope and results.

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?

Schema description coverage is 100%, so the schema already documents all 8 parameters thoroughly. The description adds minimal value beyond confirming the existence of filtering, sorting, and pagination capabilities. It doesn't provide additional context about parameter interactions, default behaviors, or practical examples that would help an agent understand how to combine these parameters effectively.

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 ('List') and resource ('records from a table'), making the purpose immediately understandable. It distinguishes from siblings like 'get_record' (singular) and 'search_records' (implied more complex search), though not explicitly. However, it doesn't fully differentiate from 'query' which might overlap in functionality.

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 mentions optional filtering, sorting, and pagination but provides no guidance on when to use this tool versus alternatives like 'search_records' or 'query'. There's no mention of prerequisites, performance considerations, or typical use cases for this specific listing approach versus other retrieval methods available in the sibling tools.

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