Skip to main content
Glama
VapiAI

Vapi MCP Server

Official
by VapiAI

get_assistant

Retrieve a Vapi assistant by its unique ID. This tool returns the assistant's configuration and details for management or integration with Vapi APIs.

Instructions

Gets a Vapi assistant by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
assistantIdYesID of the assistant to get

Implementation Reference

  • The get_assistant tool handler function. It receives an assistantId from the input data, calls vapiClient.assistants.get(assistantId) to fetch the assistant, throws an error if not found, and returns the transformed assistant output.
    server.tool(
      'get_assistant',
      'Gets a Vapi assistant by ID',
      GetAssistantInputSchema.shape,
      createToolHandler(async (data) => {
        //   console.log('get_assistant', data);
        const assistantId = data.assistantId;
        try {
          const assistant = await vapiClient.assistants.get(assistantId);
          if (!assistant) {
            throw new Error(`Assistant with ID ${assistantId} not found`);
          }
          return transformAssistantOutput(assistant);
        } catch (error: any) {
          console.error(`Error getting assistant: ${error.message}`);
          throw error;
        }
      })
  • The input schema for get_assistant. Defines a 'assistantId' string field that describes the ID of the assistant to get.
    export const GetAssistantInputSchema = z.object({
      assistantId: z.string().describe('ID of the assistant to get'),
    });
  • The registration entry point. registerAllTools calls registerAssistantTools which registers the 'get_assistant' tool on the MCP server via server.tool().
    export const registerAllTools = (server: McpServer, vapiClient: VapiClient) => {
      registerAssistantTools(server, vapiClient);
      registerCallTools(server, vapiClient);
      registerPhoneNumberTools(server, vapiClient);
      registerToolTools(server, vapiClient);
    };
  • createToolHandler is the helper wrapper used by get_assistant. It wraps the handler with authentication checks (hasValidToken) and error handling, returning success or error responses.
    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);
        }
      };
    }
Behavior2/5

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

With no annotations, the description must fully disclose behavioral traits, but it only states a simple retrieval. It omits whether the operation is read-only, requires authentication, or has any side effects. The minimal description does not compensate for missing annotations.

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?

One short, direct sentence conveys the core purpose efficiently. While it lacks detail, for a simple get operation, the conciseness is acceptable.

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 simple tool (1 parameter, no output schema, no annotations), the description is minimally adequate but lacks completeness regarding return value, error conditions, or behavioral traits. Could be improved.

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 already describes the only parameter ('assistantId') with 100% coverage, so the description adds no extra meaning. Baseline of 3 is appropriate.

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 verb 'Gets' and the resource 'Vapi assistant by ID,' making the purpose unambiguous. It naturally distinguishes itself from sibling tools like 'create_assistant' or 'list_assistants'.

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., 'list_assistants' for multiple, 'update_assistant' for modifications). No context about prerequisites or when not to use it.

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