Skip to main content
Glama
apitable

AITable MCP Server

Official

search_nodes

Retrieve specific node types like datasheets, forms, or folders from a workspace using filters such as permissions and search queries. Simplify node management in AITable MCP Server.

Instructions

Retrieve nodes based on specific types, permissions, and queries. Nodes in AITable can be of several types: datasheets (also known as sheets, or spreadsheets), form, dashboard, and folders.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
node_typeYesFilter the node list to only include nodes of the specified type. Common types include: "Datasheet", "Form", "Automation", "Folder", "Mirror"
queryNoA search query to filter nodes by name. If not specified, all nodes will be returned.
space_idYesThe ID of the workspace to fetch nodes from.

Implementation Reference

  • The main handler function for the 'search_nodes' tool. It validates inputs, constructs the API URL using AITable service, fetches nodes from the API, transforms the node data by renaming 'id' to 'node_id', and returns formatted response or error.
    async ({ space_id, node_type, query }) => {
      try {
        // Validate the space_id
        if (!space_id || !node_type) {
          throw new Error("space_id and node_type are required.");
        }
    
        const queryStr = aitableService.buildQueryString({ type: node_type, query });
        const url = `/v2/spaces/${space_id}/nodes${queryStr}`;
    
        const result: ResponseVO<{ nodes: NodeVO[] }> = await aitableService.fetchFromAPI(url, {
          method: "GET",
        });
    
        if (!result.success) {
          throw new Error(result.message || "Failed to search nodes");
        }
    
        const nodes: ToolNodeVO[] = [];
    
        result.data.nodes.forEach(node => {
          const { id, ...restNodeProps } = node;
          nodes.push({
            ...restNodeProps,
            node_id: id,
          })
        })
    
        return formatToolResponse({
          success: true,
          data: nodes
        });
      }
      catch (error) {
        console.error("Error in search_nodes:", error);
        return formatToolResponse({
          success: false,
          message: error instanceof Error ? error.message : "Unknown error occurred"
        }, true);
      }
    }
  • Zod schema defining the input parameters for the search_nodes tool: space_id (required), node_type (required), query (optional).
    {
      space_id: z.string().describe('The ID of the workspace to fetch nodes from.'),
      node_type: z.string().describe('Filter the node list to only include nodes of the specified type. Common types include: "Datasheet", "Form", "Automation", "Folder", "Mirror"'),
      query: z.string().optional().describe('A search query to filter nodes by name. If not specified, all nodes will be returned.'),
    },
  • src/index.ts:82-130 (registration)
    Registration of the search_nodes tool on the MCP server, specifying name, description, input schema, and handler function.
    server.tool("search_nodes",
      "Retrieve nodes based on specific types, permissions, and queries. Nodes in AITable can be of several types: datasheets (also known as sheets, or spreadsheets), form, dashboard, and folders.",
      {
        space_id: z.string().describe('The ID of the workspace to fetch nodes from.'),
        node_type: z.string().describe('Filter the node list to only include nodes of the specified type. Common types include: "Datasheet", "Form", "Automation", "Folder", "Mirror"'),
        query: z.string().optional().describe('A search query to filter nodes by name. If not specified, all nodes will be returned.'),
      },
      async ({ space_id, node_type, query }) => {
        try {
          // Validate the space_id
          if (!space_id || !node_type) {
            throw new Error("space_id and node_type are required.");
          }
    
          const queryStr = aitableService.buildQueryString({ type: node_type, query });
          const url = `/v2/spaces/${space_id}/nodes${queryStr}`;
    
          const result: ResponseVO<{ nodes: NodeVO[] }> = await aitableService.fetchFromAPI(url, {
            method: "GET",
          });
    
          if (!result.success) {
            throw new Error(result.message || "Failed to search nodes");
          }
    
          const nodes: ToolNodeVO[] = [];
    
          result.data.nodes.forEach(node => {
            const { id, ...restNodeProps } = node;
            nodes.push({
              ...restNodeProps,
              node_id: id,
            })
          })
    
          return formatToolResponse({
            success: true,
            data: nodes
          });
        }
        catch (error) {
          console.error("Error in search_nodes:", error);
          return formatToolResponse({
            success: false,
            message: error instanceof Error ? error.message : "Unknown error occurred"
          }, true);
        }
      }
    );
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 mentions retrieving nodes based on types, permissions, and queries, but fails to detail critical behaviors: it doesn't specify if this is a read-only operation, what permissions are required, how results are returned (e.g., pagination, format), or any rate limits. The mention of 'permissions' is vague without elaboration, leaving significant gaps in understanding the tool's behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded, starting with the core purpose in the first sentence. The second sentence adds context about node types without redundancy. There's no wasted text, and it efficiently conveys key information in two sentences, making it easy to scan and understand.

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 search tool with 3 parameters, no annotations, and no output schema, the description is incomplete. It lacks details on behavioral aspects (e.g., read-only nature, permissions, result format), usage guidelines, and output expectations. While it covers basic purpose and parameter context, it doesn't compensate for the missing structured data, leaving the agent with insufficient information for reliable tool invocation.

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 three parameters (node_type, query, space_id) with clear descriptions. The description adds minimal value beyond the schema: it lists node types (datasheets, form, dashboard, folders) which partially overlaps with the schema's 'node_type' description, but doesn't provide additional syntax, format details, or usage examples. This meets the baseline for high schema coverage.

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 tool's purpose: 'Retrieve nodes based on specific types, permissions, and queries' with a specific verb ('Retrieve') and resource ('nodes'). It distinguishes itself from siblings like 'list_spaces' or 'list_records' by focusing on node retrieval with filtering. However, it doesn't explicitly differentiate from 'get_fields_schema' or 'create_record' in terms of search vs. creation operations.

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 mentions filtering by types and queries but doesn't specify scenarios, prerequisites, or exclusions. For example, it doesn't clarify if this should be used over 'list_spaces' for workspace-level operations or how it relates to 'list_records' for data retrieval. This lack of context leaves usage ambiguous.

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

Related 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/apitable/aitable-mcp-server'

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