Skip to main content
Glama
gridhra

port-keeper-mcp

resolve_port

Read-only

Get the bare port number for a service in your project manifest. Use when you need the numeric port for TCP connections or config values instead of a URL.

Instructions

Bare port number of one service. Prefer resolve_url unless the caller needs the number itself (a tcp service, a config value).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNodirectory to resolve the current project from; defaults to where the server was started
slotNoslot name; defaults to the current slot
projectNoanother project's name; requires slot
serviceYesservice name from the manifest

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
hostYes
portYes
slotYes
projectYes
serviceYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, so the read-only nature is covered by structured data. The description adds 'bare port number' and scopes to 'one service,' but it doesn't describe any further behavioral traits such as error conditions or dependencies on project/slot. With annotations carrying the safety profile, this is adequate but not particularly rich.

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 short sentences with no waste. The core purpose is front-loaded first, and the routing guidance follows immediately. Every word earns its place.

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?

The tool has an output schema, so return values are already documented. All parameters are documented in the input schema. The description clearly explains the tool's purpose and when to use an alternative, which is sufficient for correct selection and invocation.

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 every parameter is described in the input schema. The description does not add parameter-level meaning beyond the schema—it implies service is the primary input but offers no additional format or interaction details. The baseline of 3 applies because the schema handles the semantic load.

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 states clearly what the tool does: 'Bare port number of one service.' It is specific about the verb and resource, and it differentiates from resolve_url by noting the return type (number vs URL). This distinguishes it from the sibling tool at a glance.

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 gives explicit routing guidance: 'Prefer resolve_url unless the caller needs the number itself (a tcp service, a config value).' It names the alternative tool and specifies the exact conditions that would make this tool the right choice, leaving no ambiguity.

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