Skip to main content
Glama
nayakprashant

Selenium MCP Server

close_tab

Close a browser tab by its index and automatically shift focus to an active remaining tab.

Instructions

Close a specific browser tab using its index.

Purpose

Allows the agent to close tabs that are no longer needed. After closing, focus automatically shifts to a valid remaining tab.

Parameters

session_id : str Active browser session identifier. index : int Index of the tab to close.

Returns

dict { "session_id": str, "status": str, "message": str }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexYes
session_idYes
Behavior4/5

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

Discloses that focus shifts to valid remaining tab after closing, and provides return structure. No annotations present, so description carries full burden, but could detail edge cases like closing last tab.

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?

Well-structured with clear sections (Purpose, Parameters, Returns), front-loaded, no unnecessary text.

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 purpose, parameters, behavior, and return format. No output schema, so the return dict is helpful. Could include more on error handling or status values.

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?

Provides basic definitions for session_id ('Active browser session identifier') and index ('Index of the tab to close'), but lacks constraints or format details. Schema coverage 0% means description must compensate more.

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?

Clearly states it closes a specific browser tab using its index, distinguishing it from sibling tools like close_browser.

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?

States when to use (close unneeded tabs) but lacks explicit when-not-to-use or comparison with alternatives like open_new_tab or close_browser.

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/nayakprashant/selenium-mcp-server'

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