Skip to main content
Glama
mikusnuz

umami-mcp

list_websites

List all websites tracked in Umami, with pagination, search query, and ordering by name or domain.

Instructions

List all websites tracked in Umami

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoPage number (1-based)
pageSizeNoResults per page (default 10)
queryNoSearch query to filter websites
orderByNoField to order by (e.g. 'name', 'domain')

Implementation Reference

  • Handler function for the 'list_websites' tool. Makes a GET request to /api/websites with optional query params (page, pageSize, query, orderBy) and returns JSON-formatted results.
    async ({ page, pageSize, query, orderBy }) => {
      const data = await client.call("GET", "/api/websites", undefined, {
        page: page,
        pageSize: pageSize,
        query,
        orderBy,
      });
      return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
    }
  • Zod schema defining the optional input parameters for the 'list_websites' tool: page (number), pageSize (number), query (string), orderBy (string).
    {
      page: z.number().optional().describe("Page number (1-based)"),
      pageSize: z.number().optional().describe("Results per page (default 10)"),
      query: z.string().optional().describe("Search query to filter websites"),
      orderBy: z.string().optional().describe("Field to order by (e.g. 'name', 'domain')"),
    },
  • Registration of the 'list_websites' tool on the McpServer via server.tool(), with description, Zod input schema, and the async handler function.
    server.tool(
      "list_websites",
      "List all websites tracked in Umami",
      {
        page: z.number().optional().describe("Page number (1-based)"),
        pageSize: z.number().optional().describe("Results per page (default 10)"),
        query: z.string().optional().describe("Search query to filter websites"),
        orderBy: z.string().optional().describe("Field to order by (e.g. 'name', 'domain')"),
      },
      async ({ page, pageSize, query, orderBy }) => {
        const data = await client.call("GET", "/api/websites", undefined, {
          page: page,
          pageSize: pageSize,
          query,
          orderBy,
        });
        return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
      }
    );
  • UmamiClient.call() helper method used by the handler to make authenticated HTTP requests to the Umami API.
      async call(
        method: string,
        path: string,
        body?: Record<string, unknown>,
        query?: Record<string, string | number | boolean | undefined>
      ): Promise<unknown> {
        this.ensureConfigured();
    
        const token = await this.getToken();
    
        let url = `${this.config.baseUrl}${path}`;
        if (query) {
          const params = new URLSearchParams();
          for (const [k, v] of Object.entries(query)) {
            if (v !== undefined && v !== null && v !== "") {
              params.set(k, String(v));
            }
          }
          const qs = params.toString();
          if (qs) url += `?${qs}`;
        }
    
        const headers: Record<string, string> = {
          Authorization: `Bearer ${token}`,
        };
        if (body) {
          headers["Content-Type"] = "application/json";
        }
    
        const res = await fetch(url, {
          method,
          headers,
          body: body ? JSON.stringify(body) : undefined,
          signal: AbortSignal.timeout(30_000),
        });
    
        if (!res.ok) {
          const text = await res.text().catch(() => "");
          throw new Error(`Umami API error ${method} ${path} (${res.status}): ${text}`);
        }
    
        // Some endpoints return 200 with no body (e.g. DELETE)
        const contentType = res.headers.get("content-type") || "";
        if (contentType.includes("application/json")) {
          return res.json();
        }
        const text = await res.text();
        return text || { success: true };
      }
    }
Behavior2/5

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

No annotations provided. The description does not disclose pagination behavior, default page size, rate limits, or read-only nature. Lacks information beyond input schema.

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?

Single sentence, no redundancy. However, it sacrifices necessary detail for brevity, resulting in incompleteness.

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?

No output schema and minimal description. Given 4 parameters (pagination, filtering, ordering), the description should explain default behavior and return value structure.

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% (all 4 parameters documented). Description adds no additional meaning beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('List') and resource ('all websites tracked in Umami'), distinguishing it from sibling list tools like list_reports or list_team_websites.

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?

No guidance on when to use this tool versus alternatives (e.g., get_website for a single website). Does not mention prerequisites or context.

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/mikusnuz/umami-mcp'

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