Skip to main content
Glama
VapiAI

Vapi MCP Server

Official
by VapiAI

list_assistants

Retrieve all Vapi assistants in your account. This action returns each assistant's name, ID, and configuration, enabling you to manage or select assistants for calls.

Instructions

Lists all Vapi assistants

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The tool handler for 'list_assistants' - calls vapiClient.assistants.list() and maps results through transformAssistantOutput.
    ) => {
      server.tool(
        'list_assistants',
        'Lists all Vapi assistants',
        {},
        createToolHandler(async () => {
          //   console.log('list_assistants');
          const assistants = await vapiClient.assistants.list({ limit: 10 });
          //   console.log('assistants', assistants);
          return assistants.map(transformAssistantOutput);
        })
      );
  • createToolHandler wraps the actual handler with auth check and error handling.
    export function createToolHandler<T>(
      handler: (params: T) => Promise<any>
    ): (params: T) => Promise<ToolResponse> {
      return async (params: T) => {
        // Check auth first
        if (!hasValidToken()) {
          // Start auth if not already in progress
          if (!isAuthInProgress()) {
            try {
              await startAuthFlow();
            } catch (error) {
              // Ignore - we'll show the auth URL below
            }
          }
          const url = getAuthUrl();
          if (url) {
            return createAuthRequiredResponse(url);
          }
          return createErrorResponse('Authentication required. Please use vapi_login tool first.');
        }
    
        try {
          const result = await handler(params);
          return createSuccessResponse(result);
        } catch (error) {
          return createErrorResponse(error);
        }
      };
    }
  • Registers all tools including assistant tools (which contains list_assistants).
    export const registerAllTools = (server: McpServer, vapiClient: VapiClient) => {
      registerAssistantTools(server, vapiClient);
      registerCallTools(server, vapiClient);
      registerPhoneNumberTools(server, vapiClient);
      registerToolTools(server, vapiClient);
    };
  • Transforms the raw assistant data from the Vapi API into a structured output.
    export function transformAssistantOutput(
      assistant: Vapi.Assistant
    ): z.infer<typeof AssistantOutputSchema> {
      return {
        id: assistant.id,
        createdAt: assistant.createdAt,
        updatedAt: assistant.updatedAt,
        name: assistant.name || 'Vapi Assistant',
        llm: {
          provider: assistant.model?.provider || 'openai',
          model: assistant.model?.model || 'gpt-4o-mini',
        },
        voice: {
          provider: assistant.voice?.provider || '11labs',
          voiceId: getAssistantVoiceId(assistant.voice),
          model: getAssistantVoiceModel(assistant.voice) || 'eleven_turbo_v2_5',
        },
        transcriber: {
          provider: assistant.transcriber?.provider || 'deepgram',
          model: getAssistantTranscriberModel(assistant.transcriber) || 'nova-3',
        },
        toolIds: assistant.model?.toolIds || [],
      };
    }
  • Zod schema defining the output shape for assistant data (used by transformAssistantOutput).
    export const AssistantOutputSchema = BaseResponseSchema.extend({
      name: z.string(),
      llm: z.object({
        provider: z.string(),
        model: z.string(),
      }),
      voice: z.object({
        provider: z.string(),
        voiceId: z.string(),
        model: z.string().optional(),
      }),
      transcriber: z.object({
        provider: z.string(),
        model: z.string(),
      }),
      toolIds: z.array(z.string()).optional(),
    });
Behavior2/5

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

No annotations provided, so the description must disclose behavior. It says 'lists all' but does not mention pagination, limits, ordering, or any other behavioral traits beyond the action itself.

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?

Extremely concise, one sentence with no unnecessary words. Front-loaded with the core action.

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 has no parameters and no output schema, the description is adequate but lacks contextual depth such as scope (e.g., all assistants for the user) or any behavioral notes. Could be more complete but satisfies basic needs.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Input schema has no parameters (100% coverage), so the description does not need to add parameter details. Baseline is 4 for zero-parameter tools.

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 it lists all Vapi assistants, using a specific verb and resource. It distinguishes from sibling tools like get_assistant (single) and create_assistant (creation).

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_assistant for a single assistant). Does not specify any context or exclusions.

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/VapiAI/mcp-server'

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