Skip to main content
Glama
mendeel
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.
    ] };

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