Skip to main content
Glama

close_connection

Destructive

Closes a specific IPv4 TCP connection owned by a process without terminating the process, allowing a single connection to reset while the program keeps running.

Instructions

Closes one TCP connection (IPv4) of a process, as TCPView does: the process is not opened; the program usually reconnects if it wants to.

Input Schema

NameRequiredDescriptionDefault
pidYesThe process that owns the connection.
remoteYesThe other end's IPv4 address.
local_portYes
remote_portYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, openWorldHint=true and idempotentHint=false, so the safety profile is covered. The description adds genuinely useful behavior beyond that: only a single connection is affected, the process survives, and the peer will typically re-establish the connection. It omits whether administrative rights are required and what happens when the connection is already gone.

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?

A single front-loaded sentence with no filler; the scope qualifier comes before the caveat. The 'as TCPView does' analogy leans on external knowledge and 'the process is not opened' is slightly awkward phrasing, which keeps it just short of ideal.

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 destructive, non-idempotent mutation with four required parameters and no output schema, the description covers the conceptual behavior well but leaves out permissions, failure modes, and confirmation that the target connection was actually closed. Adequate but with clear gaps an agent would want filled.

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 description coverage is only 50% — pid and remote are documented, while local_port and remote_port carry no descriptions anywhere. The description adds no parameter meaning at all (it doesn't even say the four fields must together identify one unique connection), so it fails to compensate for the coverage gap on a fully-required 4-param schema.

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 ('Closes') and a tightly scoped resource ('one TCP connection (IPv4) of a process'), which no sibling performs — list_connections only enumerates. The parenthetical clarification that the process is not opened/terminated separates it cleanly from end_process.

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?

Usage is only implied: the 'program usually reconnects' note hints that the effect is transient, which nudges an agent away from using it as a durable block. There is no explicit when-to-use vs. end_process/block_program, and no stated prerequisites such as needing the connection to exist or elevated privileges.

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