Skip to main content
Glama

mcp-socket

Stateful outbound TCP/UDP MCP server for LLMs.

Sockets stay open across tool calls until you close them or they hit the idle timeout. That makes multi-step protocols practical: HTTP/1.x, SMTP, Redis, DNS (UDP), custom text/binary protocols, and more.

See DESIGN.md for the full design.

Install

python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"

Related MCP server: WireMCP

Run

# stdio (default) — typical for MCP clients
mcp-socket

# or
python -m mcp_socket

# HTTP transport
mcp-socket --transport streamable-http --host 127.0.0.1 --port 8000

CLI options

Option

Default

Description

--transport

stdio

stdio, streamable-http, or sse

--host

127.0.0.1

HTTP bind address

--port

8000

HTTP bind port

--socket-idle-timeout

300

Idle seconds before auto-close

--cleanup-interval

5

Cleanup scan interval

--allow-private-network

off

Allow RFC1918/loopback/ULA/etc.

--max-sockets

128

Max concurrent sockets

--max-send-bytes

1048576

Max send payload

--max-recv-bytes

1048576

Max recv payload

--log-level

INFO

Logging level

Tools

Tool

Purpose

resolve_dns

Hostname → A/AAAA

tcp_connect

Connect TCP to IP:port

udp_open

Create UDP socket

tcp_send / udp_send

Send (utf8 or base64)

tcp_recv / udp_recv

Receive (base64 + optional text)

socket_poll

Check readability

list_sockets

Inspect open sockets

close_socket

Close (optional TCP RST)

tcp_connect / udp_send require IP literals. Call resolve_dns first for hostnames.

Private and local destinations are blocked by default (ADDRESS_BLOCKED). Use --allow-private-network for local testing.

Example (TCP HTTP/1.0)

resolve_dns(hostname="example.com")
→ { "ipv4": ["93.184.216.34"], ... }

tcp_connect(address="93.184.216.34", port=80)
→ { "socket_id": "...", "state": "connected" }

tcp_send(socket_id="...", encoding="utf8",
         data="GET / HTTP/1.0\r\nHost: example.com\r\n\r\n")

tcp_recv(socket_id="...", max_bytes=65536, timeout_seconds=5)
→ { "bytes_received": N, "data_base64": "...", "text": "HTTP/1.0 200 ..." }

close_socket(socket_id="...")

Security

Before every connect() / sendto():

  • Destination must be a valid IP literal

  • Private/local ranges are denied unless --allow-private-network

  • Multicast / unspecified / reserved ranges are always denied

No TLS, no listening sockets, no proxy support — higher-level servers can layer those on top.

Develop

pip install -e ".[dev]"
pytest

License

MIT

Available Tools

10 tools
close_socketA

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
resetNo
socket_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.5/5.0
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.

list_socketsA

List open sockets and their metadata (state, remote/local endpoints, idle time, byte/packet counters). Pass socket_id as a string, list of strings, or omit/null for all sockets.

ParametersJSON Schema
NameRequiredDescriptionDefault
socket_idNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.3/5.0
Behavior3/5

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

No annotations provided, so description must carry full burden. It implies read-only behavior by listing metadata, but does not explicitly state that the tool is safe, non-destructive, or has no side effects. Would benefit from such a statement.

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 redundancy. First sentence states purpose and output contents, second explains parameter usage. Efficient and front-loaded.

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?

Given an output schema exists, the description's mention of metadata fields (state, endpoints, idle time, counters) provides useful context. It is complete for a simple list tool, though could note any special conditions like requiring administrative privileges.

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

Parameters5/5

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

Schema has 0% description coverage, so description fully compensates. It explains the parameter 'socket_id' can be a string, list of strings, or null, and that omitting returns all sockets. This adds critical meaning beyond the 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?

Description clearly states 'List open sockets and their metadata', specifying the verb (list) and resource (sockets) with concrete metadata fields. It distinguishes from sibling tools which are about operations (close, poll, connect) rather than inspection.

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?

Explicitly explains how to use the parameter: pass a string, list, or omit for all. However, it does not mention when to use this tool over siblings or any exclusion criteria.

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

resolve_dnsA

Resolve a hostname into IPv4 (A) and IPv6 (AAAA) addresses. Address ordering follows the OS resolver. Use this before tcp_connect/udp_send because those tools require IP literals, not hostnames.

ParametersJSON Schema
NameRequiredDescriptionDefault
hostnameYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.4/5.0
Behavior4/5

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

No annotations provided, so description carries full burden. It discloses that address ordering follows the OS resolver, but does not mention behavior on resolution failure or timeouts.

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 concise sentences: first states purpose, second gives usage guidance. No unnecessary words.

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?

Tool is simple (1 param, no nested objects) and output schema exists, so return values need not be described. Description covers purpose and usage adequately, but could mention error handling.

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 has 1 parameter with 0% description coverage. The description states it resolves a hostname, matching the schema field, but adds no format or constraints (e.g., FQDN requirement).

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?

Description clearly states the tool resolves a hostname into IPv4 and IPv6 addresses, which distinguishes it from sibling tools like tcp_connect that require IP literals.

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?

Explicitly states when to use ('before tcp_connect/udp_send') and why (those tools require IP literals), providing clear alternatives.

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

socket_pollA

Check whether a socket currently has readable data. If timeout_seconds > 0, wait until readable or timeout. Most clients can rely on timeout support in tcp_recv/udp_recv instead.

ParametersJSON Schema
NameRequiredDescriptionDefault
socket_idYes
timeout_secondsNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description carries full burden. It describes the basic behavior (check readable, optional wait) but lacks details on side effects, return format, or what happens on timeout. Adequate for a simple poll but not comprehensive.

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?

Extremely concise with two sentences. The main purpose is front-loaded. Every sentence adds value without redundancy.

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?

Given the presence of an output schema (not shown), the description does not need to explain return values. It covers the essential behavior, but could mention edge cases like closed sockets or timeouts. Mostly complete.

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%, so the description must add meaning. It mentions timeout_seconds > 0 but does not explain socket_id or provide details on parameter usage beyond the schema titles. Adds some value but incomplete.

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 checks for readable data and explains the timeout behavior. It also distinguishes itself from sibling tools like tcp_recv/udp_recv by suggesting those for receiving.

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 description provides guidance by suggesting that most clients can use tcp_recv/udp_recv instead, implying socket_poll is for cases when you want to check without receiving. It could be more explicit about when to use this tool versus alternatives.

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

tcp_connectA

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
portYes
addressYes
timeout_secondsNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4/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 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.

tcp_recvA

Receive bytes from a TCP socket. timeout_seconds=0 (default) is non-blocking; >0 waits for at least one byte or timeout. Returns base64 (and text if valid UTF-8). bytes_received=0 with empty data indicates timeout or EOF (peer closed).

ParametersJSON Schema
NameRequiredDescriptionDefault
max_bytesNo
socket_idYes
timeout_secondsNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.2/5.0
Behavior4/5

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

No annotations provided; description discloses timeout behavior, return format (base64 and optional text), and EOF/timeout detection (bytes_received=0 with empty data).

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?

Three sentences, front-loaded with main action, no redundant information.

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?

Covers key behaviors for a simple recv tool; output schema likely documents return values, so description is adequate.

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 coverage is 0%; description explains timeout_seconds default and behavior but does not explain max_bytes or add details for socket_id beyond the 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?

Description clearly states 'Receive bytes from a TCP socket' using a specific verb and resource, and distinguishes from sibling tools like tcp_send and udp_recv.

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?

Explains timeout behavior (non-blocking vs blocking) and return format, but does not explicitly state when not to use or mention alternatives.

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

tcp_sendA

Send bytes over a connected TCP socket. encoding=utf8 encodes data as UTF-8; encoding=base64 base64-decodes data first.

ParametersJSON Schema
NameRequiredDescriptionDefault
dataYes
encodingYes
socket_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.7/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 burden. It explains the two encoding modes but lacks other behavioral details such as error handling, blocking behavior, data size limits, or prerequisites like a connected socket.

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 efficient front-loading: purpose first, then encoding options. No wasted words.

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?

The tool has 3 required params and an output schema not described. For a send operation, missing contextual details like error behavior, idempotency, or max data size limit completeness. Output schema existence helps but not explained.

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 coverage is 0%, so the description must compensate. It adds meaning for 'encoding' by explaining utf8 and base64 modes, but 'data' and 'socket_id' lack additional context beyond their names.

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 'Send bytes over a connected TCP socket,' which is a specific verb+resource. This distinguishes it from siblings like tcp_recv, udp_send, etc.

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 provides encoding options but does not explicitly state when to use this tool versus alternatives like udp_send or tcp_recv. Usage context is implied but not clarified.

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

udp_openA

Create an unbound outbound UDP socket. Use udp_send to send datagrams and udp_recv to receive them. Returns socket_id.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4/5.0
Behavior2/5

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

No annotations are provided, so the description bears full responsibility for behavioral disclosure. It only states creation and return, without mentioning permissions, side effects, errors, or lifecycle implications (e.g., need to close socket).

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 core action. Every sentence adds value: creation, usage hint, and return value. No wasted words.

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?

Given the tool's simplicity (no parameters) and presence of an output schema, the description covers creation and usage hints adequately. It could mention cleanup via close_socket, but overall it is largely complete for a creation tool.

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 tool has zero parameters and schema coverage is 100%. The description adds no parameter info since none exist, which is acceptable. Baseline score of 4 is appropriate.

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 verb 'Create' and the resource 'unbound outbound UDP socket', distinguishing it from TCP and other socket operations. It also mentions the return value (socket_id), providing complete purpose clarity.

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 description provides workflow guidance by mentioning udp_send and udp_recv for subsequent operations. It does not explicitly state when not to use or list alternatives, but the sibling tools context makes differentiation clear.

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

udp_recvA

Receive one or more UDP datagrams (up to max_packets). timeout_seconds=0 (default) is non-blocking; >0 waits for at least one packet. Each packet includes source address/port, length, base64 data, and optional text.

ParametersJSON Schema
NameRequiredDescriptionDefault
socket_idYes
max_packetsNo
timeout_secondsNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries full burden. It details blocking/non-blocking behavior via timeout_seconds and describes the packet structure (source address/port, length, base64 data, optional text). However, it omits edge cases like empty results, errors, or buffer limitations.

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-loads the primary action, and avoids redundant information. Every sentence adds value without unnecessary elaboration.

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?

Given the tool's complexity (3 params, output schema exists), the description covers core usage and packet details. It lacks some context like error handling or the need to previously open a socket via udp_open, but is sufficient for correct invocation with the output schema filling return structure.

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 coverage is 0%, so description should explain parameters. It adds meaning for max_packets ('up to max_packets') and timeout_seconds (blocking vs non-blocking), but does not explain socket_id or clarify default behaviors beyond the schema's defaults.

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's action: 'Receive one or more UDP datagrams'. It specifies the resource (UDP datagrams) and scope (up to max_packets). This distinguishes it from sibling tools like tcp_recv which handles TCP, providing clear differentiation.

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 implies usage for receiving UDP datagrams and explains timeout behavior, but it does not explicitly state when to use this tool over alternatives (e.g., socket_poll, tcp_recv). No prerequisites or exclusions are mentioned, leaving the agent to infer context.

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

udp_sendC

Send a UDP datagram to address:port. address must be an IP literal. encoding=utf8 or base64 as with tcp_send.

ParametersJSON Schema
NameRequiredDescriptionDefault
dataYes
portYes
addressYes
encodingYes
socket_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

C2.8/5.0
Behavior2/5

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

Discloses that address must be an IP literal and encoding options, but lacks details on blocking behavior, error handling, datagram size limits, or socket prerequisites. With no annotations, the description carries the full burden and falls short.

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, no superfluous content. Efficiently presents core information.

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

Completeness2/5

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

For a tool with 5 required params, no annotations, and an output schema (not described), the description is too minimal. Lacks context on socket lifecycle, return value, and common usage patterns.

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?

Only addresses address, port, and encoding; does not explain socket_id (source socket) or data (payload). Schema coverage is 0%, so description should compensate but only covers 3 of 5 parameters partially.

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?

Clearly states the action 'send a UDP datagram' to address:port, distinguishing it from TCP siblings via protocol mention. However, it doesn't explicitly differentiate from other UDP tools like udp_open or udp_recv.

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

Usage Guidelines2/5

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

No explicit when-to-use or when-not-to-use guidance. References tcp_send for encoding but does not clarify when UDP is appropriate over TCP or other alternatives.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 10 tool updatesv0.1.0
    • First observedclose_socket
    • First observedlist_sockets
    • First observedresolve_dns
    • First observedsocket_poll
    • First observedtcp_connect
    • First observedtcp_recv
    • First observedtcp_send
    • First observedudp_open
    • First observedudp_recv
    • First observedudp_send

TDQS

A3.9/5.0
Disambiguation5/5

Each tool targets a distinct operation (TCP connect/send/recv/close, UDP open/send/recv, DNS resolution, socket listing, polling). No overlap in functionality.

Naming Consistency5/5

All tools use consistent lowercase snake_case with a verb_noun pattern (e.g., tcp_connect, resolve_dns, close_socket). Adheres to a predictable naming convention.

Tool Count5/5

10 tools is appropriate for a socket utility server. It covers TCP and UDP client operations without being excessive or sparse.

Completeness4/5

Covers essential TCP/UDP client operations and DNS resolution. Missing server-side features (TCP listen, UDP bind) and advanced options, but the scope is clearly client-oriented.

Maintenance

ActivitySlowing
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    F
    maintenance
    A Model Context Protocol server that provides LLMs with real-time network traffic analysis capabilities, enabling tasks like threat hunting, network diagnostics, and anomaly detection through Wireshark's tshark.
    7
    577
    MIT
  • F
    license
    A
    quality
    A
    maintenance
    An MCP server that bridges LLMs with dynamic real-world data by leveraging Chrome DevTools Protocol to intercept and reconstruct network traffic, enabling AI agents to extract high-quality structured data from complex web environments.
    3
    88
    -

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