fidelity_status
Check whether your Fidelity browser session is active and logged in. Verifies authentication status to ensure secure access to account management.
Instructions
Check whether the Fidelity browser session is active and logged in.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:400-424 (handler)Handler for the 'fidelity_status' tool. Checks if the Fidelity browser session is active and logged in by calling isBrowserReady(), then returns a JSON response with browserActive and a contextual message.
server.tool( "fidelity_status", "Check whether the Fidelity browser session is active and logged in.", {}, async () => { const ready = isBrowserReady(); return { content: [ { type: "text", text: JSON.stringify( { browserActive: ready, message: ready ? "Browser session is active. You can use Fidelity tools." : "No active session. Use fidelity_login to start.", }, null, 2 ), }, ], }; } ); - src/index.ts:398-424 (registration)Registration of the 'fidelity_status' tool on the MCP server via server.tool(). Includes a description and an empty schema object (no parameters).
// ─── Status ───────────────────────────────────────────────────────────────────── server.tool( "fidelity_status", "Check whether the Fidelity browser session is active and logged in.", {}, async () => { const ready = isBrowserReady(); return { content: [ { type: "text", text: JSON.stringify( { browserActive: ready, message: ready ? "Browser session is active. You can use Fidelity tools." : "No active session. Use fidelity_login to start.", }, null, 2 ), }, ], }; } ); - src/browser.ts:144-146 (helper)Helper function isBrowserReady() that returns true if a Page object exists and is not closed. Used by the fidelity_status handler to determine session status.
export function isBrowserReady(): boolean { return page !== null && !page.isClosed(); }