Skip to main content
Glama

close_port

Terminate an open serial port session started with open_port and stop capturing its output, releasing the port for other uses.

Instructions

Close a port opened with open_port and stop capturing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
portYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. It does disclose the key side effect ('stop capturing'), which is genuine value beyond the schema, but it never covers permissions, reversibility, or error behavior when the port is not open or already closed.

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?

One short, front-loaded sentence with no filler; the action and its prerequisite are both stated immediately. It is arguably too terse rather than padded, which is a completeness issue rather than a conciseness flaw.

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?

An output schema exists, so return values need no explanation, and the one-parameter surface is small. What remains missing is the port identifier's expected form and failure behavior when no port is open; otherwise the definition is sufficient for correct invocation.

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% for the single 'port' parameter, so the description must compensate. It implicitly establishes that the value is the identifier/handle returned by open_port, but adds no format, casing, or example detail, leaving the compensation partial.

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 (close) and resource (port) and ties it to its counterpart by name ('a port opened with open_port'), which lets an agent place it precisely in the port-lifecycle family without opening any schema. It is unambiguous against siblings like list_ports, read_lines, or reset_stm32.

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?

The phrase 'opened with open_port' gives clear context for when this tool applies, i.e. after a successful open_port. It does not state exclusions (e.g. behavior when no port is open, or whether auto-closing on exit exists), so it stops short of the explicit when/when-not guidance needed for a 5.

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