Skip to main content
Glama

close_socket

Close a network socket by ID with optional TCP reset. Remove the socket from the registry after closure.

Instructions

Close a socket and remove it from the registry. For TCP, reset=false performs a graceful FIN shutdown; reset=true attempts an abortive close (TCP RST). For UDP, reset is ignored.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
resetNo
socket_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

Since no annotations are provided, the description fully discloses behavioral traits: graceful FIN shutdown vs abortive close (TCP RST) and that reset is ignored for UDP. It also mentions removal from the registry, ensuring transparency.

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?

Two sentences with no wasted words: first sentence states the purpose, second explains parameter variations. Front-loaded and efficient.

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

Completeness5/5

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

For a simple close operation with 2 parameters and an output schema, the description covers the core behavior and parameter nuances fully. No additional context is needed.

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

Parameters4/5

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

The input schema has 0% description coverage, but the description adds meaning by explaining the reset parameter's behavior (TCP vs UDP) and implicitly defines socket_id's role. This compensates for the lack of schema descriptions.

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 'Close a socket and remove it from the registry,' specifying the verb and resource. It distinguishes from sibling tools like tcp_connect or udp_send, which have different purposes.

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 explains the reset parameter's effect for TCP versus UDP, providing context for when to use different settings. However, it lacks explicit guidance on when to use this tool versus alternatives, such as prerequisites or exclusions.

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/cinit/mcp-socket'

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