Skip to main content
Glama

lantern_free

Reclaims an occupied TCP port by identifying whether a Docker container or host process holds it, then terminating that process cleanly without breaking Docker networking.

Instructions

Safely reclaims an occupied TCP port. Checks whether the port is held by a Docker container or host process and terminates it cleanly without breaking Docker networking.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "port": "<port>"
    },
    "name": "lantern_free"
  }
}

Input Schema

NameRequiredDescriptionDefault
portYesTCP port number to free (1-65535)
forceNoForce kill if graceful shutdown fails

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It does disclose useful behavior: it first identifies the holder as a Docker container or host process, shuts down gracefully, and escalates to force only as a fallback, while claiming it won't break Docker networking. It omits whether the kill is irreversible, what privileges are required (Docker access typically needs elevated rights), and how the caller learns which process was killed.

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, front-loaded with the action and immediately followed by the mechanism and its safety claim. Every clause adds information; nothing is repetitive or padded.

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 two-parameter tool with no annotations and no output schema, the description covers what it does and how it decides between Docker and host targets, but leaves the agent without permission requirements, irreversibility framing, or any notion of what is returned. Adequate but with clear gaps for a kill operation.

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 100%, with both port (1-65535) and force ("force kill if graceful shutdown fails") documented in the schema itself. The description only reinforces the graceful-then-force ordering and adds no format or constraint detail beyond that, so the schema-baseline 3 applies.

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?

Names a specific verb and resource ("reclaims an occupied TCP port") plus the mechanism (terminating the Docker container or host process holding it). That mechanism also separates it from the diagnostic siblings lantern_doctor, lantern_scan, and lantern_why, which inspect rather than act.

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 precondition is implied by "occupied TCP port," so an agent can infer it is for a port that is already in use. There is no explicit when-not guidance (e.g., production services, ports held by system daemons) and no named alternative for a read-only diagnosis before killing something.

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

Deploy Server

Other Tools