Skip to main content
Glama

reserve_port

Lease a port for a project or worktree so parallel agents avoid collisions. The default lease lasts 8 hours, preventing port conflicts during concurrent work.

Instructions

Lease a port for a project or worktree so parallel agents do not collide. Default lease is 8 hours.

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>",
      "project": "<project>"
    },
    "name": "reserve_port"
  }
}

Input Schema

NameRequiredDescriptionDefault
noteNo
portYes
projectYes
worktreeNo
ttlMinutesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations establish this is a non-destructive, non-read-only, closed-world mutation, and the description usefully adds the default lease duration of 8 hours. It omits important behavioral details: what happens if the port is already leased, whether the lease is exclusive or advisory, and whether it auto-expires and becomes reusable.

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?

Two short, front-loaded sentences with no wasted wording. Slightly more could be said about lease behavior, but nothing present is superfluous.

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 five-parameter mutation tool with no output schema, the definition is minimal: it doesn't say what a successful reservation returns (lease handle, expiry timestamp) or how conflicts are reported, leaving the agent to guess on failure modes.

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?

With 0% schema description coverage, the description has to carry parameter meaning. It covers port, project, worktree, and indirectly ttlMinutes (default 8 hours), but never explains the free-form 'note' field or clarifies that port must be a valid unprivileged number and that project is the ownership key.

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?

The description states a specific verb and resource ('Lease a port') plus the scoping dimension ('for a project or worktree') and the motivation (parallel agents colliding). It does not distinguish itself from siblings such as find_free_port or suggest_port, so it stops short of a 5.

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 rationale ('so parallel agents do not collide') implies when to use it, but the description never states exclusions or points to alternatives like find_free_port for discovery or release_port when done. Usage must be inferred.

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