Skip to main content
Glama

get_available_port

Finds the next open port in a configured range so you can start a new dev server without conflicts. Use it to check availability before registering a port.

Instructions

Yardmaster port registry: get the next available/free port in the configured range. Use when asked to find an open port for a new dev server. Useful for checking port availability before registration.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_available_port"
  }
}

Input Schema

NameRequiredDescriptionDefault
range_endNoOptional custom range end (overrides config)
range_startNoOptional custom range start (overrides config)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3/5.0
Behavior2/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 and falls short. It never says whether the port is merely observed or actually allocated/reserved in the registry, what happens when the range is exhausted, or whether concurrent calls can return the same port — exactly the traits an agent needs before handing out a port.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences, front-loaded with the core action, but the third sentence largely restates the second ('checking port availability' vs. 'find an open port') and muddies the boundary with query_ports rather than adding 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?

With no output schema and no annotations, the description should say what is returned (a bare port number, an object, null on failure) and what the registry state change is. Neither is covered, leaving a simple tool that an agent still cannot invoke confidently.

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 100% and both parameters are optional, so the schema already explains range_start/range_end as config overrides. The description only reinforces the notion of a 'configured range' and adds no boundary, ordering, or default semantics beyond the schema.

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?

States a specific verb and resource: 'get the next available/free port in the configured range', which is clearly distinct from register_port/release_port. It stops short of distinguishing itself from query_ports, which the phrase 'useful for checking port availability' arguably also describes.

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?

Gives a usage context ('when asked to find an open port for a new dev server') and a pre-step use case ('before registration'), so intent is implied. But it names no alternative tool and gives no when-not guidance, leaving unclear why an agent would pick this over query_ports.

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