Skip to main content
Glama
mendeel

Mixpanel MCP

by mendeel

list_saved_funnels

Retrieve saved funnel analyses from Mixpanel projects to discover existing funnel metrics and obtain funnel IDs for detailed examination.

Instructions

List available saved funnels in the project. Useful for discovering existing funnel analyses and getting funnel IDs for further analysis.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idNoThe Mixpanel project ID. Optional since it has a default.

Implementation Reference

  • Handler function that executes the list_saved_funnels tool: authenticates with Mixpanel using service account credentials, performs a GET request to /funnels/list endpoint, returns JSON data or error message.
    async function handleListSavedFunnels(args: any, config: any) {
      const { project_id = config.DEFAULT_PROJECT_ID } = args;
      
      try {
        const credentials = `${config.SERVICE_ACCOUNT_USER_NAME}:${config.SERVICE_ACCOUNT_PASSWORD}`;
        const encodedCredentials = Buffer.from(credentials).toString('base64');
        
        const url = `${config.MIXPANEL_BASE_URL}/funnels/list?project_id=${project_id}`;
        
        const options = {
          method: 'GET',
          headers: {
            'accept': 'application/json',
            'authorization': `Basic ${encodedCredentials}`
          }
        };
        
        const response = await fetch(url, options);
        
        if (!response.ok) {
          const errorText = await response.text();
          throw new Error(`HTTP error! status: ${response.status} - ${errorText}`);
        }
        
        const data = await response.json();
        
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(data)
            }
          ]
        };
      } catch (error: unknown) {
        console.error("Error listing saved funnels:", error);
        const errorMessage = error instanceof Error ? error.message : String(error);
        return {
          content: [
            {
              type: "text",
              text: `Error listing saved funnels: ${errorMessage}`
            }
          ],
          isError: true
        };
      }
    }
  • Tool schema definition including inputSchema for project_id (optional), used when listing available tools.
    {
      name: "list_saved_funnels",
      description: "List available saved funnels in the project. Useful for discovering existing funnel analyses and getting funnel IDs for further analysis.",
      inputSchema: {
        type: "object",
        properties: {
          project_id: {
            type: "string",
            description: "The Mixpanel project ID. Optional since it has a default."
          }
        }
      }
    },
  • src/index.ts:632-634 (registration)
    Registration in the tool dispatch switch case: maps tool name to the handleListSavedFunnels handler.
    case "list_saved_funnels":
      return await handleListSavedFunnels(args, { SERVICE_ACCOUNT_USER_NAME, SERVICE_ACCOUNT_PASSWORD, DEFAULT_PROJECT_ID, MIXPANEL_BASE_URL });
  • src/index.ts:596-597 (registration)
    The tools array where list_saved_funnels is registered for the ListTools endpoint.
      ]
    };
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 the tool lists funnels and is useful for discovery and ID retrieval, but it doesn't disclose key behavioral traits such as whether it returns all funnels or is paginated, what the output format is, or any permissions or rate limits. For a listing tool with zero annotation coverage, this leaves significant gaps in understanding how it behaves.

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 appropriately sized and front-loaded: it starts with the core purpose ('List available saved funnels in the project.'), followed by a concise usage note. Both sentences earn their place by providing essential information without waste, making it easy to scan and understand quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (one optional parameter, no output schema, no annotations), the description is somewhat complete but has gaps. It explains the purpose and usage but lacks details on output behavior, which is critical for a listing tool. Without annotations or an output schema, the description should ideally cover more about what is returned, but it only partially meets the needs for contextual understanding.

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, with one parameter ('project_id') documented as 'The Mixpanel project ID. Optional since it has a default.' The description adds no additional parameter semantics beyond what the schema provides. According to the rules, with high schema coverage (>80%), the baseline score is 3, as the schema does the heavy lifting and the description doesn't compensate with extra details.

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: 'List available saved funnels in the project.' It specifies the verb ('List') and resource ('saved funnels'), and distinguishes it from siblings by focusing on funnels rather than events, cohorts, or other reports. However, it doesn't explicitly differentiate from similar listing tools like 'list_saved_cohorts' beyond the resource name.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides implied usage guidelines: it's 'useful for discovering existing funnel analyses and getting funnel IDs for further analysis.' This suggests when to use it (for discovery and ID retrieval), but it doesn't explicitly state when not to use it or name alternatives (e.g., 'query_funnel_report' for detailed analysis). The guidance is helpful but not comprehensive.

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/mendeel/mixpanel-mcp'

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