Skip to main content
Glama

list-api-groups

Browse and filter all API groups in your Xano workspace to manage endpoints, with pagination, search, and sorting options for organized access.

Instructions

Browse all API groups in the Xano workspace

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoPage number for pagination
per_pageNoNumber of items per page
searchNoSearch term to filter API groups
sortNoField to sort by
orderNoSort order

Implementation Reference

  • The asynchronous handler function for the 'list-api-groups' tool. It builds query parameters, fetches API groups from Xano, formats them as markdown, and returns the content or error.
    async ({ page, per_page, search, sort, order }) => {
      console.error('[Tool] Executing list-api-groups');
      try {
        // Build query parameters
        const queryParams = new URLSearchParams();
        if (page !== undefined) queryParams.append("page", page.toString());
        if (per_page !== undefined) queryParams.append("per_page", per_page.toString());
        if (search) queryParams.append("search", search);
        if (sort) queryParams.append("sort", sort);
        if (order) queryParams.append("order", order);
        
        const queryString = queryParams.toString() ? `?${queryParams.toString()}` : '';
        
        const response = await makeXanoRequest<{ items: XanoApiGroup[], curPage: number, nextPage?: number, prevPage?: number }>(
          `/workspace/${XANO_WORKSPACE}/apigroup${queryString}`
        );
        
        const apiGroups = response.items;
        
        // Format API groups into a readable structure
        const formattedContent = `# Xano API Groups\n\n` +
          `Page ${response.curPage}${response.nextPage ? ` (Next: ${response.nextPage})` : ''}${response.prevPage ? ` (Prev: ${response.prevPage})` : ''}\n\n` +
          `${apiGroups.map(group =>
            `## ${group.name}\n` +
            `**ID**: ${group.id}\n` +
            `**Description**: ${group.description || 'No description'}\n` +
            `**Created**: ${new Date(group.created_at).toLocaleString()}\n` +
            `**Updated**: ${new Date(group.updated_at).toLocaleString()}\n` +
            `${group.guid ? `**GUID**: ${group.guid}\n` : ''}`
          ).join('\n\n')}`;
    
        console.error(`[Tool] Successfully listed ${apiGroups.length} API groups`);
        return {
          content: [
            {
              type: "text",
              text: formattedContent
            }
          ]
        };
      } catch (error) {
        console.error(`[Error] Failed to list API groups: ${error instanceof Error ? error.message : String(error)}`);
        return {
          content: [
            {
              type: "text",
              text: `Error listing API groups: ${error instanceof Error ? error.message : String(error)}`
            }
          ],
          isError: true
        };
      }
    }
  • Input schema using Zod for the 'list-api-groups' tool parameters: optional pagination, search, sort, and order fields.
    {
      page: z.number().optional().describe("Page number for pagination"),
      per_page: z.number().optional().describe("Number of items per page"),
      search: z.string().optional().describe("Search term to filter API groups"),
      sort: z.enum(["created_at", "updated_at", "name"]).optional().describe("Field to sort by"),
      order: z.enum(["asc", "desc"]).optional().describe("Sort order")
    },
  • src/index.ts:787-849 (registration)
    Registration of the 'list-api-groups' tool using server.tool, including name, description, schema, and handler.
      "list-api-groups",
      "Browse all API groups in the Xano workspace",
      {
        page: z.number().optional().describe("Page number for pagination"),
        per_page: z.number().optional().describe("Number of items per page"),
        search: z.string().optional().describe("Search term to filter API groups"),
        sort: z.enum(["created_at", "updated_at", "name"]).optional().describe("Field to sort by"),
        order: z.enum(["asc", "desc"]).optional().describe("Sort order")
      },
      async ({ page, per_page, search, sort, order }) => {
        console.error('[Tool] Executing list-api-groups');
        try {
          // Build query parameters
          const queryParams = new URLSearchParams();
          if (page !== undefined) queryParams.append("page", page.toString());
          if (per_page !== undefined) queryParams.append("per_page", per_page.toString());
          if (search) queryParams.append("search", search);
          if (sort) queryParams.append("sort", sort);
          if (order) queryParams.append("order", order);
          
          const queryString = queryParams.toString() ? `?${queryParams.toString()}` : '';
          
          const response = await makeXanoRequest<{ items: XanoApiGroup[], curPage: number, nextPage?: number, prevPage?: number }>(
            `/workspace/${XANO_WORKSPACE}/apigroup${queryString}`
          );
          
          const apiGroups = response.items;
          
          // Format API groups into a readable structure
          const formattedContent = `# Xano API Groups\n\n` +
            `Page ${response.curPage}${response.nextPage ? ` (Next: ${response.nextPage})` : ''}${response.prevPage ? ` (Prev: ${response.prevPage})` : ''}\n\n` +
            `${apiGroups.map(group =>
              `## ${group.name}\n` +
              `**ID**: ${group.id}\n` +
              `**Description**: ${group.description || 'No description'}\n` +
              `**Created**: ${new Date(group.created_at).toLocaleString()}\n` +
              `**Updated**: ${new Date(group.updated_at).toLocaleString()}\n` +
              `${group.guid ? `**GUID**: ${group.guid}\n` : ''}`
            ).join('\n\n')}`;
    
          console.error(`[Tool] Successfully listed ${apiGroups.length} API groups`);
          return {
            content: [
              {
                type: "text",
                text: formattedContent
              }
            ]
          };
        } catch (error) {
          console.error(`[Error] Failed to list API groups: ${error instanceof Error ? error.message : String(error)}`);
          return {
            content: [
              {
                type: "text",
                text: `Error listing API groups: ${error instanceof Error ? error.message : String(error)}`
              }
            ],
            isError: true
          };
        }
      }
    );
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. It only states 'browse all API groups' without mentioning pagination behavior, rate limits, authentication requirements, or what happens when no results are found. For a listing tool with 5 parameters, this leaves significant behavioral aspects unexplained.

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 states the core purpose without any wasted words. It's appropriately sized and front-loaded, making it easy to understand at a glance.

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 listing tool with 5 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain what the tool returns, how results are structured, or provide any context about the API groups being listed. The agent would need to guess about the response format and behavior.

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 input schema has 100% description coverage, providing clear documentation for all 5 parameters. The description doesn't add any meaningful parameter semantics beyond what's already in the schema, so it meets the baseline for high schema coverage without compensating 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 verb ('browse') and resource ('all API groups in the Xano workspace'), making the purpose immediately understandable. It doesn't explicitly differentiate from sibling tools like 'browse-apis' or 'list-tables', which would be needed for 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 like 'browse-apis' or 'list-tables'. It lacks any context about prerequisites, when it's appropriate, or what distinguishes it from similar listing tools in the sibling set.

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