Skip to main content
Glama
gridhra

port-keeper-mcp

render_env

Idempotent

Renders environment variables for the current project slot in dotenv, export, JSON, or other formats, and leases ports for services without one. Outputs ready-to-use env files for local development.

Instructions

Every environment variable of the current slot (service ports, derived values, PORT_KEEPER_PROJECT/SLOT) in a format: dotenv, export, json, mise, direnv or claude-env. Leases ports for services that have none yet. For your own use: to write .env.local run the port-keeper env command instead of writing the file by hand, and do not echo these numbers to the user.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNodirectory to resolve the project from; defaults to where the server was started
formatNodotenv, export, json, mise, direnv or claude-env (default export)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
envYes
slotYes
textYesthe rendered snippet
formatYes
projectYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

The description discloses an important side effect not obvious from the annotations: it leases ports for services that have none yet. It also warns agents not to echo the values to the user. This goes well beyond the annotation hints and provides meaningful behavioral context.

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 compact: it front-loads the tool's output, then notes the lease side effect, then gives a direct instruction about the correct way for the agent to handle .env.local. Every sentence earns its place without unnecessary detail.

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?

Given the output schema and 100% schema coverage, the description supplies the missing behavioral context: side effects, supported formats, and the instruction not to expose the values to the user. Nothing essential for correct invocation appears to be missing.

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%, so the schema already documents cwd and format. The description restates the allowed formats but adds little parameter meaning beyond that baseline. This is acceptable but not additive.

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 what the tool produces — every environment variable of the current slot, including service ports and derived values — and lists the accepted output formats. This distinguishes it from sibling tools like resolve_port or current_context, which deal with narrower or different concerns.

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 gives an explicit agent-facing directive: write .env.local by running the `port-keeper env` command rather than by hand, and do not echo these numbers to the user. It does not explicitly contrast this tool with its sibling tools, but the context for the main intended use is clear.

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