Skip to main content
Glama
mikusnuz

umami-mcp

delete_team

Delete a team by providing its UUID to permanently remove it from Umami Analytics.

Instructions

Delete a team

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
teamIdYesTeam UUID to delete

Implementation Reference

  • The 'delete_team' tool handler that takes a teamId, calls DELETE /api/teams/{teamId} via the UmamiClient, and returns a success text message.
    server.tool(
      "delete_team",
      "Delete a team",
      {
        teamId: z.string().describe("Team UUID to delete"),
      },
      async ({ teamId }) => {
        await client.call("DELETE", `/api/teams/${teamId}`);
        return { content: [{ type: "text", text: `Team ${teamId} deleted successfully.` }] };
      }
    );
  • The input schema for 'delete_team' defines a required 'teamId' (string, described as Team UUID). No return schema is defined separately; the handler always returns text content.
    server.tool(
      "delete_team",
      "Delete a team",
      {
        teamId: z.string().describe("Team UUID to delete"),
      },
      async ({ teamId }) => {
        await client.call("DELETE", `/api/teams/${teamId}`);
        return { content: [{ type: "text", text: `Team ${teamId} deleted successfully.` }] };
      }
    );
  • src/tools/teams.ts:5-5 (registration)
    The 'delete_team' tool is registered via server.tool() inside the registerTeamTools function (line 5), which is called from src/index.ts:35.
    export function registerTeamTools(server: McpServer, client: UmamiClient) {
  • src/index.ts:35-35 (registration)
    Registration call: registerTeamTools(server, client) is invoked in the main index.ts to register all team tools including 'delete_team'.
    registerTeamTools(server, client);
  • The UmamiClient.call() method used by the handler to make the HTTP DELETE request 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,
Behavior2/5

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

With no annotations, the description should disclose behavioral traits. It only states the action without indicating irreversibility, required permissions, or cascading effects.

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 extremely concise with no wasted words. However, it is perhaps too brief and could include more context without harming conciseness.

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 delete operation, the description lacks essential context such as irreversibility, required permissions, side effects, or return value. It is insufficient for an agent to use confidently.

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 single parameter 'teamId' is fully described in the schema as 'Team UUID to delete'. The description adds no extra meaning beyond the schema, so it meets the baseline expectation.

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 'Delete a team' uses a specific verb and resource, clearly distinguishing it from siblings like create_team, update_team, and list_teams.

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 is provided on when to use this tool, prerequisites, or potential consequences of deletion. The description does not mention alternatives or when not to use.

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