Skip to main content
Glama

aps_logout

Clears the cached 3-legged OAuth token, reverting API calls to the 2-legged app-context token for authentication.

Instructions

Clear the cached 3‑legged OAuth token. After this, API calls fall back to the 2‑legged (app‑context) token.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler for 'aps_logout' tool. Calls clear3loLogin() to clear cached 3LO tokens in memory and on disk, then returns a confirmation message.
    // ── aps_logout (clear 3LO) ─────────────────────────────────
    if (name === "aps_logout") {
      clear3loLogin();
      return ok(
        "3-legged session cleared. API calls will now use the 2-legged (app) token.",
      );
    }
  • src/index.ts:158-165 (registration)
    Tool definition/registration for aps_logout in the TOOLS array. Describes the tool and declares an empty input schema (no parameters).
    // 0b ── aps_logout (clear 3LO session)
    {
      name: "aps_logout",
      description:
        "Clear the cached 3‑legged OAuth token. " +
        "After this, API calls fall back to the 2‑legged (app‑context) token.",
      inputSchema: { type: "object" as const, properties: {} },
    },
  • Core helper function clear3loLogin() that deletes the cached token file on disk and clears the in-memory cache, effectively logging out the 3-legged session.
    /** Clear any cached 3LO tokens (in‑memory + on disk). */
    export function clear3loLogin(): void {
      deleteCacheFile();
      cached3lo = null;
    }
  • Helper function deleteCacheFile() that removes the 3LO token file (~/.aps-mcp/3lo-tokens.json) from disk.
    function deleteCacheFile(): void {
      try {
        if (existsSync(TOKEN_FILE)) unlinkSync(TOKEN_FILE);
      } catch {
        /* ignore */
      }
    }
Behavior4/5

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

Without annotations, the description effectively discloses the behavior: it clears the cached token and causes a fallback. It does not mention return value or irreversibility, but is adequate for a logout operation.

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 sentences, front-loaded with the action, no unnecessary words. Every sentence adds value.

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, no output schema, and a straightforward action, the description completely covers the tool's purpose and effect.

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?

There are no parameters, so the baseline is 4. The description need not add parameter information.

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 specifies the action ('Clear the cached 3-legged OAuth token') and the consequence ('API calls fall back to the 2-legged token'). It distinguishes from the sibling aps_login tool.

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?

The description implies usage after authentication with a 3-legged token to revert to app-context, but does not explicitly state when not to use or mention alternatives. The context of login/logout pair makes it clear.

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/EverseDevelopment/APS.MCP'

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