Skip to main content
Glama
TylerFlar

claude-fidelity-mcp

by TylerFlar

fidelity_save_session

Save the current browser session state to maintain login and account access across restarts, avoiding repeated authentication.

Instructions

Manually save the current browser session state (cookies/localStorage) for persistence across restarts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The async handler for the 'fidelity_save_session' tool. Calls saveSession() from the browser module and returns a success or error message.
    async () => {
      try {
        await saveSession();
  • src/index.ts:459-486 (registration)
    Registers the 'fidelity_save_session' tool on the MCP server with a description, empty schema (no params), and the handler function.
    server.tool(
      "fidelity_save_session",
      "Manually save the current browser session state (cookies/localStorage) for persistence across restarts.",
      {},
      async () => {
        try {
          await saveSession();
          return {
            content: [
              {
                type: "text",
                text: "Session state saved successfully.",
              },
            ],
          };
        } catch (e) {
          return {
            content: [
              {
                type: "text",
                text: `Failed to save session: ${e instanceof Error ? e.message : String(e)}`,
              },
            ],
            isError: true,
          };
        }
      }
    );
  • Empty input schema for fidelity_save_session — the tool accepts no parameters.
    {},
  • Core helper function saveSession() that persists the browser context's storage state (cookies/localStorage) to a JSON file on disk.
    export async function saveSession(): Promise<void> {
      if (!context || !currentConfig) return;
      const sessionPath = getSessionPath(currentConfig);
      try {
        const state = await context.storageState();
        fs.writeFileSync(sessionPath, JSON.stringify(state, null, 2));
      } catch {
        // Silently fail if context is already closed
      }
    }
Behavior3/5

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

No annotations are present, so the description carries full burden. It discloses the manual save action and persistence across restarts, but lacks details on side effects, rate limits, or prerequisites.

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?

Single clear sentence with no unnecessary words. Perfectly concise.

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?

Given no output schema and no parameters, the description covers the essential purpose and effect. Minor missing details about expected outcomes or post-save state, but sufficient for a simple action.

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?

With zero parameters, baseline is 4. The description adds no parameter-level details, which is acceptable since there are no parameters to document.

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 explicitly states it saves browser session state (cookies/localStorage) for persistence, a specific verb+resource that clearly distinguishes from sibling tools like fidelity_login or fidelity_logout.

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 when-to-use or when-not-to-use guidance is provided. Usage is implied as after login or before restart, but no alternatives like auto-save are discussed.

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/TylerFlar/claude-fidelity-mcp'

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