Skip to main content
Glama
andrewlwn77
by andrewlwn77

list_views

Retrieve all views for a specified table in NocoDB to manage data presentation and access configurations.

Instructions

List all views for a table

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
table_idYesThe ID of the table

Implementation Reference

  • The main handler function for the 'list_views' MCP tool. It invokes the NocoDB client's listViews method and formats the response with mapped view details and a count.
    handler: async (client: NocoDBClient, args: { table_id: string }) => {
      const views = await client.listViews(args.table_id);
      return {
        views: views.map((view) => ({
          id: view.id,
          title: view.title,
          type: view.type,
          fk_model_id: view.fk_model_id,
          show_system_fields: view.show_system_fields,
          lock_type: view.lock_type,
          created_at: view.created_at,
          updated_at: view.updated_at,
        })),
        count: views.length,
      };
    },
  • Input schema definition for the list_views 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)
    Combines all tool sets including viewTools (containing list_views) into allTools, which is used to register tools with the MCP server for listing and calling.
    const allTools = [
      ...databaseTools,
      ...tableTools,
      ...recordTools,
      ...viewTools,
      ...queryTools,
      ...attachmentTools,
    ];
  • Helper method in NocoDBClient class that performs the API call to retrieve views for a given table ID, used by the list_views handler.
    async listViews(tableId: string): Promise<NocoDBView[]> {
      const response = await this.client.get(
        `/api/v2/meta/tables/${tableId}/views`,
      );
      return response.data.list || [];
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure but offers minimal information. It implies a read-only operation by using 'List', but doesn't cover important aspects like pagination, rate limits, error conditions, or the format of returned data, which are critical for a list operation.

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 extremely concise and front-loaded, consisting of a single, clear sentence that directly states the tool's purpose. There is no wasted language or unnecessary elaboration, making it efficient for quick understanding.

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 lack of annotations and output schema, the description is incomplete for a list operation. It doesn't explain what the output looks like (e.g., list of view objects, metadata), how results are structured, or any behavioral nuances, leaving significant gaps for the agent to handle the tool effectively.

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 schema description coverage is 100%, with the single parameter 'table_id' well-documented in the schema. The description adds no additional parameter semantics beyond what the schema provides, such as format examples or constraints, so it meets the baseline for high schema coverage without adding value.

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 action ('List all views') and resource ('for a table'), making the tool's purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'list_tables' or 'list_bases' beyond specifying the resource type, which prevents a perfect score.

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. It doesn't mention prerequisites, context for usage, or compare it to similar tools like 'list_tables' or 'get_view_data', leaving the agent to infer usage scenarios independently.

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