Skip to main content
Glama

chase_auth_check

Verifies Chase login status and provides authentication instructions if needed. Use this before any other Chase operations to ensure access.

Instructions

Check if user is logged in to Chase. Returns login status and instructions if not authenticated. Call this before any other Chase operations.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • src/index.ts:49-58 (registration)
    Tool registration for chase_auth_check in the ListTools handler: defines the tool name, description, and empty input schema (no params).
    tools: [
      {
        name: "chase_auth_check",
        description:
          "Check if user is logged in to Chase. Returns login status and instructions if not authenticated. Call this before any other Chase operations.",
        inputSchema: {
          type: "object",
          properties: {},
        },
      },
  • Handler case for 'chase_auth_check' in CallToolRequestSchema. Calls hasStoredCookies() from auth.ts and checkAuth()/getLoginUrl() from browser.ts to return login status, URL, and instructions.
    case "chase_auth_check": {
      const hasCookies = hasStoredCookies();
      
      if (!hasCookies) {
        const loginInfo = await getLoginUrl();
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify({
                success: true,
                isLoggedIn: false,
                message: "Not logged in to Chase.",
                loginUrl: loginInfo.url,
                instructions: loginInfo.instructions,
                cookiesPath: getCookiesPath(),
              }),
            },
          ],
        };
      }
      
      const authState = await checkAuth();
      
      if (!authState.isLoggedIn) {
        const loginInfo = await getLoginUrl();
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify({
                success: true,
                isLoggedIn: false,
                message: "Session expired. Please log in again.",
                loginUrl: loginInfo.url,
                instructions: loginInfo.instructions,
              }),
            },
          ],
        };
      }
      
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify({
              success: true,
              isLoggedIn: true,
              message: "Logged in to Chase.",
              accountHolder: authState.accountHolder,
            }),
          },
        ],
      };
    }
  • hasStoredCookies() helper: checks if the cookies file exists at ~/.strider/chase/cookies.json.
    export function hasStoredCookies(): boolean {
      return fs.existsSync(COOKIES_PATH);
  • getLoginUrl() helper: returns the Chase login URL and instructions for cookie export.
    export async function getLoginUrl(): Promise<{ url: string; instructions: string }> {
      return {
        url: "https://secure.chase.com/web/auth/dashboard",
        instructions:
          "Please log in to Chase in a browser, then export your cookies to ~/.strider/chase/cookies.json. Use a browser extension like 'Cookie-Editor' to export cookies in JSON format. Note: Chase uses MFA, so you may need to re-export cookies after each session.",
      };
    }
  • checkAuth() helper: navigates to Chase dashboard, checks if redirected to login, and returns AuthState with isLoggedIn flag and accountHolder name.
    export async function checkAuth(): Promise<AuthState> {
      try {
        const p = await getPage();
        await p.goto(`${CHASE_BASE_URL}/web/auth/dashboard`, { waitUntil: "networkidle" });
        
        // Check if we're on the dashboard or redirected to login
        const currentUrl = p.url();
        
        if (currentUrl.includes("/auth/logon") || currentUrl.includes("/login")) {
          return { isLoggedIn: false };
        }
        
        // Try to get account holder name
        const holderName = await p.$eval(
          '.mds-header-user-name, .account-holder-name, [data-testid="user-greeting"]',
          (el) => el.textContent?.trim() || "",
        ).catch(() => "");
        
        return {
          isLoggedIn: true,
          accountHolder: holderName || undefined,
        };
      } catch (error) {
        return { isLoggedIn: false };
      }
    }
Behavior4/5

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

No annotations provided, so description carries full burden. It discloses that the tool returns login status and instructions if not authenticated. For a read-only check without side effects, this is adequate. Could optionally mention that it does not modify state.

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 purpose, no wasted words. Essential information is presented efficiently.

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?

For a simple check tool with no parameters and no output schema, the description explains return value and context of use. Given sibling tools include auth_clear, the description is complete and sufficient.

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 schema coverage is 100%. Description adds meaning by explaining the tool's purpose and output. Baseline for 0 params is 4, and this description meets it.

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 tool checks login status and returns instructions if not authenticated. The verb 'check' is specific and resource 'user login status' is well-defined. It distinguishes from sibling 'chase_auth_clear' which likely clears authentication.

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?

Explicitly says 'Call this before any other Chase operations,' providing clear usage context. Does not mention when not to use or alternatives, but the context of an auth check makes the guidance sufficient.

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/markswendsen-code/mcp-chase'

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