Skip to main content
Glama

close_session

Closes an active browsing session and, by default, saves refreshed login cookies and site storage back to the encrypted vault for later reuse.

Instructions

Close a session. With save=True (default), the refreshed login (cookies and site storage) is written back to the vault.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "session_id": "<session_id>"
    },
    "name": "close_session"
  }
}

Input Schema

NameRequiredDescriptionDefault
saveNo
session_idYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, idempotentHint=false and openWorldHint=true. The description usefully discloses what save=True writes (cookies and site storage to the vault), but leaves the save=False path undefined — it never says whether the browser context is torn down, whether unsaved login state is lost, or whether the session_id becomes invalid afterward.

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 short sentences with zero filler; the action comes first and the consequential default behavior is front-loaded in the second sentence.

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?

An output schema exists so return values need no explanation, and annotations cover the safety profile. For a two-parameter session-lifecycle tool the description covers the one non-obvious behavior — the vault write-back on close — so nothing critical is missing for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must carry parameter meaning. It does this well for 'save' (boolean, default true, writes refreshed login to the vault) but says nothing about 'session_id' — not its origin, lifetime, or whether it must be an open session from open_session.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Close a session') and immediately characterizes the default side effect of persisting login state. It does not, however, distinguish this from the sibling 'save_session', which an agent could reasonably confuse with close_session(save=True).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no explicit when-to-use or when-not guidance, and no mention of the alternative 'save_session' despite the overlapping persistence behavior. The only implied guidance is that the default save=True does the vault write-back, which a reader must infer is the preferred path.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.