Skip to main content
Glama

end_session

Closes the browser window opened for your session—or all session windows if none is specified—and can stop using a shared tab while leaving it open for the user.

Instructions

Finish a session you started: closes the window start_session opened for you (all of them if you don't name one). With tab, stops using that shared tab instead, leaving it open for the user.

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": "end_session"
  }
}

Input Schema

NameRequiredDescriptionDefault
tabNoStop using this tab rather than closing your window.
windowIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the burden and discloses the most consequential trait: with no windowId it closes all of the session's windows, and with tab it leaves the tab open for the user. It does not cover whether closed windows/tabs are recoverable or what is returned, but the destructive scope and its default are made explicit.

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 tight sentences with the primary action front-loaded and the alternative branch second. Every clause carries information; no restatement of the tool name or filler.

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?

For a two-optional-parameter tool with no output schema and no annotations, the definition covers purpose, default behavior when no window is named, and both parameter effects. Minor gaps remain around error conditions or whether session state is discarded, but an agent has enough to invoke it correctly.

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 only 50%, and windowId has no schema description, but the description compensates by explaining that omitting it closes all of the session's windows while naming one closes just that window. The tab parameter is documented in the schema and reinforced in prose as 'stop using this shared tab instead.'

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?

States a specific verb and resource ('Finish a session you started') and immediately clarifies the mechanism ('closes the window start_session opened for you'). It also distinguishes the tab-mode variant from the default window-closing behavior, so an agent can tell this apart from close_tab and start_session without reading any schema.

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?

Gives clear context for use ('a session you started') and an explicit branching rule: supply tab to release a shared tab instead of closing the window. What's missing is an explicit negative case, e.g. that closing a tab you opened yourself belongs to close_tab rather than this tool.

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