Skip to main content
Glama

Close the browser

close_session
Idempotent

Close the server's headless browser to free memory after pending calls finish, for one AnkiWeb account or all, while keeping the stored session so later calls can restart it.

Instructions

Close the server's headless browser to free its memory, once any call in progress has finished: the one for account, or without it every one open. The AnkiWeb session stays stored, and the next call that needs the browser starts it again. A browser also closes by itself after five idle minutes.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

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

Input Schema

NameRequiredDescriptionDefault
accountNoOmit unless the user names an AnkiWeb account. Which of the accounts signed in on this machine to act as; a name that is not one is refused with the list.

Output Schema

NameRequiredDescriptionDefault
closedYesfalse when no browser was open.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.0.5
    • addedInput schema / properties / account
      Added value: +{
      +  "description": "Omit unless the user names an AnkiWeb account. Which of the accounts signed in on this machine to act as; a name that is not one is refused with the list.",
      +  "type": "string"
      +}
  2. First observedv0.0.2

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations, the description discloses important lifecycle behavior: it waits for in-progress calls, preserves the stored AnkiWeb session, allows the next browser-dependent call to restart it, and auto-closes after five idle minutes. These details materially help an agent predict side effects.

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?

The definition is short and front-loaded, with the core action stated first. Every sentence contributes either scope, lifecycle, or persistence information without redundant wording.

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 tool with an output schema, annotations, and a fully documented parameter, the description covers the remaining behavioral context: scope, waiting behavior, session persistence, restart behavior, and idle auto-close. Nothing essential is missing.

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?

Schema coverage is 100%, so the schema already carries most parameter meaning. The description still adds useful default semantics: omitting `account` closes every open browser, while supplying it targets that account's browser.

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 gives a precise verb and resource: closing the server's headless browser to free memory. It also clarifies scope, distinguishing between closing the browser for a named account and closing every open browser.

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?

It explains when to call it (to free memory, after any in-progress call finishes) and notes that a browser auto-closes after five idle minutes, which helps an agent decide whether manual closure is needed. It stops short of explicitly naming when not to use it or comparing against alternatives.

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