Skip to main content
Glama
gyuco
by gyuco

logout

Clear authentication state to securely end your API session. This action removes all stored credentials.

Instructions

Logout and clear authentication state

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler for the logout tool. Checks that the REST client is configured, then delegates to restClient.logout() and returns a success message.
    private async logout() {
      if (!this.restClient) {
        throw new Error(
          "REST client not configured. Use configure_rest_client tool or provide configuration via CLI/environment variables."
        );
      }
    
      await this.restClient.logout();
      return {
        content: [
          {
            type: "text",
            text: "Successfully logged out",
          },
        ],
      };
    }
  • src/index.ts:208-215 (registration)
    Tool registration: defines the 'logout' tool with name, description, and empty inputSchema as part of the tool list.
    {
      name: "logout",
      description: "Logout and clear authentication state",
      inputSchema: {
        type: "object",
        properties: {},
      },
    },
  • src/index.ts:243-244 (registration)
    Case handler in the CallToolRequestSchema switch statement that routes 'logout' to the this.logout() method.
    case "logout":
      return await this.logout();
  • RestClient.logout() method that delegates to authManager.logout() to clear authentication state.
    async logout(): Promise<void> {
      this.authManager.logout();
    }
  • AuthManager.logout() method that resets the authState to { isAuthenticated: false }, performing the actual state clearing.
    logout(): void {
      this.authState = { isAuthenticated: false };
    }
Behavior2/5

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

Lacks detail on side effects (e.g., token invalidation, session termination) beyond the vague 'clear authentication state'. No annotations to compensate.

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—two words—with no extraneous information. Perfectly front-loaded.

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

Completeness4/5

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

Adequate for a simple, parameterless tool. However, it could mention potential side effects or prerequisites (e.g., must be authenticated).

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 exist, so the description cannot add value beyond the schema. Baseline of 4 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 action 'Logout' and the consequence 'clear authentication state', making the purpose unambiguous.

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?

No explicit guidance on when to use this tool versus alternatives like check_authentication, but the use case is straightforward and implied.

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/gyuco/mcp-http-client'

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