Skip to main content
Glama

close_port

Close an idle serial port to free it for other sessions. Refuses ports with active Telnet clients or execute calls, so confirm no capture is needed first.

Instructions

Explicitly close idle unused port. Refuses Telnet clients or active execute calls.

Passive MCP readers are not tracked as subscriptions: confirm nobody still needs capture first.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "port": "<port>"
    },
    "name": "close_port"
  }
}

Input Schema

NameRequiredDescriptionDefault
portYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

B3.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 full burden and does disclose non-obvious behavior: refusal conditions for Telnet clients and active execute calls, and the caveat that passive MCP readers are not tracked as subscriptions. It omits what happens on failure, whether the close is reversible, and any permission requirements, but the disclosure of refusal rules and the subscription-tracking blind spot is substantive.

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?

Two short sentences, front-loaded with the action and the constraints following. The second sentence is slightly cryptic in phrasing but every clause carries actionable information with no filler.

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?

For a state-changing tool with no annotations, no output schema, and an undocumented parameter, the description covers preconditions and one important caveat but leaves error behavior, reversibility, and the port value format unexplained. Adequate but with clear gaps given the zero structured backing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% and the single parameter is just named 'port' with no description in the schema. The description never clarifies whether port is a name, number, or string identifier, or what a valid value looks like, so it adds no parameter meaning at all despite being the only place that could compensate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('close ... port') with a qualifying scope ('idle unused'), which is enough to distinguish it from siblings like open_port and list_ports. It stops short of naming an alternative explicitly, but the action is unambiguous.

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?

Gives implicit when-not conditions ('refuses Telnet clients or active execute calls') and a pre-check ('confirm nobody still needs capture first'), which help an agent decide whether the call will succeed. It never says when to prefer this over siblings such as port_status or list_ports, or what the correct prerequisite check sequence is.

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