Skip to main content
Glama
helmif

semantic-dom-mcp

by helmif

session_close

Idempotent

Close an open browser session and release its context when a flow finishes. Safe to call again: unknown or already-closed IDs succeed with was_open false.

Instructions

Close an open session and release its browser context. Always call this when the flow is done. Idempotent: closing an unknown or already-closed id succeeds with was_open: false.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.8.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare idempotentHint=true and destructiveHint=false, so the description's idempotency claim is partly redundant. However it adds real detail beyond the annotations: that closing an unknown/already-closed id succeeds and returns was_open: false — a behavioral guarantee that matters when no output schema exists.

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?

Three short sentences, front-loaded with the action and effect, then the usage rule, then the edge-case guarantee. No 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?

Covers the action, the resource released, the usage trigger, and idempotent edge-case behavior including the was_open field, which compensates for the absent output schema. It stops short of explaining where session_id comes from or what errors (other than unknown ids) can occur.

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 coverage is 0% and the single parameter session_id has no description in either the schema or the description. The description implies session_id identifies a live session but gives no format, source, or example. With one parameter and no schema help, this is the minimum viable level.

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 ('Close an open session') plus the concrete effect ('release its browser context'), which clearly separates it from session_open, session_act, and session_list. An agent can identify the tool without opening the 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?

'Always call this when the flow is done' gives an explicit trigger condition for use, which is stronger than most sibling definitions. It does not name an alternative or a when-not case, but for a lifecycle terminator there is no plausible alternative to route to.

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