Skip to main content
Glama

list-tables

Browse all tables in your Xano workspace to manage database structure and understand available data resources.

Instructions

Browse all tables in the Xano workspace

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • src/index.ts:135-177 (registration)
    Registration of the 'list-tables' tool using server.tool, including name, description, empty input schema, and inline handler function.
    server.tool(
      "list-tables",
      "Browse all tables in the Xano workspace",
      {},
      async () => {
        console.error('[Tool] Executing list-tables');
        try {
          const response = await makeXanoRequest<{ items: XanoTable[] }>(`/workspace/${XANO_WORKSPACE}/table`);
          const tables = response.items; // Access the 'items' property
    
          // Format tables into a more readable structure
          const formattedContent = `# Xano Database Tables\n\n${tables.map(table =>
            `## ${table.name}\n` +
            `**ID**: ${table.id}\n` +
            `**Description**: ${table.description || 'No description'}\n` +
            `**Created**: ${new Date(table.created_at).toLocaleString()}\n` +
            `**Updated**: ${new Date(table.updated_at).toLocaleString()}\n` +
            `${table.tags && table.tags.length > 0 ? `**Tags**: ${table.tags.join(', ')}\n` : ''}`
          ).join('\n\n')}`;
    
          console.error(`[Tool] Successfully listed ${tables.length} tables`);
          return {
            content: [
              {
                type: "text",
                text: formattedContent
              }
            ]
          };
        } catch (error) {
          console.error(`[Error] Failed to list tables: ${error instanceof Error ? error.message : String(error)}`);
          return {
            content: [
              {
                type: "text",
                text: `Error listing tables: ${error instanceof Error ? error.message : String(error)}`
              }
            ],
            isError: true
          };
        }
      }
    );
  • Handler function that executes the tool: calls Xano API to list tables, formats response as markdown list with details (ID, name, description, dates, tags), returns as text content block. Includes error handling returning error message.
    async () => {
      console.error('[Tool] Executing list-tables');
      try {
        const response = await makeXanoRequest<{ items: XanoTable[] }>(`/workspace/${XANO_WORKSPACE}/table`);
        const tables = response.items; // Access the 'items' property
    
        // Format tables into a more readable structure
        const formattedContent = `# Xano Database Tables\n\n${tables.map(table =>
          `## ${table.name}\n` +
          `**ID**: ${table.id}\n` +
          `**Description**: ${table.description || 'No description'}\n` +
          `**Created**: ${new Date(table.created_at).toLocaleString()}\n` +
          `**Updated**: ${new Date(table.updated_at).toLocaleString()}\n` +
          `${table.tags && table.tags.length > 0 ? `**Tags**: ${table.tags.join(', ')}\n` : ''}`
        ).join('\n\n')}`;
    
        console.error(`[Tool] Successfully listed ${tables.length} tables`);
        return {
          content: [
            {
              type: "text",
              text: formattedContent
            }
          ]
        };
      } catch (error) {
        console.error(`[Error] Failed to list tables: ${error instanceof Error ? error.message : String(error)}`);
        return {
          content: [
            {
              type: "text",
              text: `Error listing tables: ${error instanceof Error ? error.message : String(error)}`
            }
          ],
          isError: true
        };
      }
    }
  • Empty input schema indicating the tool takes no parameters.
    {},
  • Helper function makeXanoRequest used by the handler to make authenticated API calls to Xano workspace endpoints.
      input?: any[];
    }
    
    // Server configuration
    const SERVER_CONFIG = {
      name: "xano-mcp",
      version: "1.0.0",
      description: "MCP server for interacting with Xano database and APIs",
    };
    
    // Create server instance with better configuration
    console.error(`[Setup] Creating MCP server: ${SERVER_CONFIG.name} v${SERVER_CONFIG.version}`);
    const server = new McpServer({
      name: SERVER_CONFIG.name,
      version: SERVER_CONFIG.version,
    });
    
    // Helper function for making Xano API requests
    async function makeXanoRequest<T>(endpoint: string, method: 'GET' | 'POST' | 'PUT' | 'DELETE' = 'GET', body?: any): Promise<T> {
      try {
        console.error(`[API] Making ${method} request to endpoint: ${endpoint}`);
        if (body) {
          console.error(`[API] Request body: ${JSON.stringify(body, null, 2)}`);
        }
        
        const url = new URL(`${XANO_API_BASE}${endpoint}`);
        const headers = {
          'Content-Type': 'application/json',
          'Authorization': `Bearer ${XANO_API_KEY}`,
          'X-Workspace': String(XANO_WORKSPACE)
        };
    
        const response = await fetch(url.toString(), {
          method,
          headers,
          body: body ? JSON.stringify(body) : undefined,
        });
    
        if (!response.ok) {
          const errorText = await response.text();
          console.error(`[Error] HTTP error! status: ${response.status}, response: ${errorText}`);
          throw new Error(`HTTP error! status: ${response.status}, details: ${errorText}`);
        }
    
        const data = await response.json();
        console.error(`[API] Successfully received response from endpoint: ${endpoint}`);
        return data;
      } catch (error) {
        console.error(`[Error] Failed to make Xano request to ${endpoint}: ${error instanceof Error ? error.message : String(error)}`);
        throw error;
      }
Behavior2/5

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

With no annotations provided, the description carries full burden but only states the action ('browse') without detailing behavior. It doesn't disclose if this is read-only, paginated, returns metadata or full data, requires permissions, or has rate limits—critical for a list operation in a workspace context.

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 ('browse all tables') without wasted words. It's appropriately sized for a simple tool with no parameters, making it easy to parse quickly.

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?

For a tool with no annotations, no output schema, and siblings like 'get-table-schema', the description is incomplete. It doesn't explain what 'browse' entails (e.g., list names, metadata, or full schemas), return format, or how it fits into the broader table management workflow, leaving gaps for agent usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters with 100% schema description coverage, so no parameter documentation is needed. The description appropriately doesn't mention parameters, aligning with the schema. Baseline is 4 for zero parameters, as it avoids unnecessary detail.

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 ('browse') and resource ('all tables in the Xano workspace'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'browse-apis' or 'get-table-schema', which would require more specific language about scope or output format.

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, compare to siblings like 'browse-apis' for APIs versus tables, or specify use cases like initial exploration versus detailed schema inspection with 'get-table-schema'.

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/lowcodelocky2/xano-mcp'

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