Skip to main content
Glama

device_sessions

Manage console sessions by listing active sessions, closing a session by port, or closing all sessions. Idle connections are automatically cleaned up.

Instructions

查看或关闭 console 会话。action 为 list/close/close_all。

close 时 target 为端口号。后台每 30 秒回收空闲超过 5 分钟的连接; 服务退出时关闭所有连接。关闭操作等待该连接正在执行的命令结束。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hostNo127.0.0.1
actionNolist
targetNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries full responsibility. It discloses background behavior (idle connections reclaimed every 30 seconds, closure on service exit) and that close operations wait for running commands to finish. This is valuable beyond the schema, though it omits potential error conditions or side effects on list operations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact and well-structured: a clear purpose sentence, then action details, target explanation, and background behavior. It is not overly verbose and each sentence adds value, though it could benefit from a line about host or a clearer action-target mapping.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the core usage for list and close actions and explains the background lifecycle, which is helpful. However, it omits the host parameter, does not specify the behavior of close_all beyond its name, and relies on the output schema for return details. There are minor gaps that could confuse an agent when dealing with host-specific sessions or close_all semantics.

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 compensate. It explains 'action' values and clarifies that 'target' is the port number for close, but it does not explain the 'host' parameter at all. It also leaves ambiguity about whether close_all requires a target. Partial coverage of the three parameters, with the most critical ones addressed.

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 clearly states the tool's purpose: to view or close console sessions, listing the specific actions (list/close/close_all). It names the resource (console sessions) and distinguishes this from sibling tools focused on topology or device configuration, so an agent can identify it accurately.

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?

The description implies usage for managing sessions but does not explicitly state when to choose this tool over alternatives like device_exec or topo_* tools. It provides action semantics but lacks explicit 'when not to use' guidance or conditions that would route the agent to a sibling. This is adequate but not explicit.

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