Skip to main content
Glama

get_view_data

Retrieve records from a specific NocoDB view by providing base ID, table name, and view ID. Supports pagination with limit and offset parameters for efficient data access.

Instructions

Get records from a specific view

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
base_idYesThe ID of the base/project
table_nameYesThe name of the table
view_idYesThe ID of the view
limitNoNumber of records to return
offsetNoNumber of records to skip

Implementation Reference

  • The handler function that implements the core logic of the 'get_view_data' tool, fetching records from a specific view using the NocoDBClient's listRecords method with viewId, limit, and offset parameters.
    handler: async ( client: NocoDBClient, args: { base_id: string; table_name: string; view_id: string; limit?: number; offset?: number; }, ) => { const result = await client.listRecords(args.base_id, args.table_name, { viewId: args.view_id, limit: args.limit, offset: args.offset, }); return { records: result.list, pageInfo: result.pageInfo, count: result.list.length, view_id: args.view_id, }; },
  • Input schema defining the parameters for the 'get_view_data' tool: base_id, table_name, view_id (required), and optional limit and offset.
    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", }, view_id: { type: "string", description: "The ID of the view", }, limit: { type: "number", description: "Number of records to return", }, offset: { type: "number", description: "Number of records to skip", }, }, required: ["base_id", "table_name", "view_id"], },
  • src/index.ts:55-62 (registration)
    Registers the 'get_view_data' tool by including the viewTools array (containing it) in the allTools array, which is used for listing and calling tools in the MCP server 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