Skip to main content
Glama

tcp_connect

Establish a TCP connection to an IPv4 or IPv6 address and port, returning a socket ID for further communication.

Instructions

Create a TCP socket and connect to an IP:port. address must be an IPv4 or IPv6 literal (call resolve_dns first for hostnames). Returns socket_id for subsequent send/recv/close operations.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
portYes
addressYes
timeout_secondsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

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 burden. It discloses that it creates a socket and connects, and returns a socket_id. However, it does not describe behavior on connection failure, timeout handling, or error states, which are important for a network tool.

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?

The description is two sentences, front-loaded with the main purpose, and includes key usage guidance and return value. Every sentence is essential and there is no extraneous information.

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?

Given the tool has 3 parameters, no annotations, and an output schema, the description covers the main usage successfully but lacks details on error scenarios, timeout behavior, and lifecycle of the returned socket_id. It is adequate for simple cases but incomplete for robust understanding.

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 0%. The description adds value for the 'address' parameter by requiring literal IPs, but does not explain 'port' or 'timeout_seconds' beyond their existence. The timeout_seconds parameter is mentioned but its semantics (connection timeout, units) are not clarified.

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 creates a TCP socket and connects to an IP:port. It uses specific verbs and resources, and distinguishes from sibling tools like resolve_dns by requiring literal addresses and providing a prerequisite step.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states that address must be an IPv4 or IPv6 literal, and to call resolve_dns for hostnames first. This guides when to use this tool versus alternatives. It also mentions the return value for subsequent operations.

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