Skip to main content
Glama
VapiAI

Vapi MCP Server

Official
by VapiAI

vapi_logout

Log out of Vapi and clear stored credentials to handle stale auth tokens or switch accounts.

Instructions

Log out of Vapi and clear stored credentials. Use this if your auth token is stale or you want to switch accounts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The vapi_logout tool handler: clears stored credentials via clearConfig() and resets the vapiClient to null, then returns a success message.
    // Register logout tool
    mcpServer.tool(
      'vapi_logout',
      'Log out of Vapi and clear stored credentials. Use this if your auth token is stale or you want to switch accounts.',
      {},
      async () => {
        clearConfig();
        vapiClient = null;
        return {
          content: [
            {
              type: 'text' as const,
              text: 'Logged out of Vapi. Use vapi_login to sign in again.',
            },
          ],
        };
      }
    );
  • src/index.ts:98-115 (registration)
    The tool is registered via mcpServer.tool() with the name 'vapi_logout', description, empty schema, and an async handler callback.
    // Register logout tool
    mcpServer.tool(
      'vapi_logout',
      'Log out of Vapi and clear stored credentials. Use this if your auth token is stale or you want to switch accounts.',
      {},
      async () => {
        clearConfig();
        vapiClient = null;
        return {
          content: [
            {
              type: 'text' as const,
              text: 'Logged out of Vapi. Use vapi_login to sign in again.',
            },
          ],
        };
      }
    );
  • The vapi_logout tool uses an empty schema {} since it accepts no input parameters.
    {},
  • The clearConfig() helper function deletes the config file at ~/.vapi/config.json and resets the in-memory cachedConfig to null.
    export function clearConfig(): void {
      try {
        if (fs.existsSync(CONFIG_FILE)) {
          fs.unlinkSync(CONFIG_FILE);
        }
      } catch (error) {
        // Ignore errors
      }
      cachedConfig = null;
    }
Behavior4/5

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

Discloses key behavioral trait: 'clear stored credentials', indicating mutation/destruction. No annotations exist, so description carries full burden; it adequately covers the logout side effect.

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?

Two concise sentences, front-loaded with core action, then usage. No wasted words.

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

Completeness5/5

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

Given zero parameters and no output schema, the description fully covers all needed context: action and when to use.

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?

No parameters in schema; schema description coverage is 100%. Baseline score of 4 is appropriate as description adds no param info but none needed.

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?

Description clearly states 'Log out of Vapi and clear stored credentials', specifying verb and resource. Differentiates from sibling vapi_login as the inverse action.

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

Usage Guidelines4/5

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

Explicit usage guidance: 'Use this if your auth token is stale or you want to switch accounts.' Provides clear context, though no explicit when-not conditions.

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