Skip to main content
Glama
oijusti

Kubernetes Port Forward MCP

by oijusti

start_k8s_port_forward

Start port forwarding for Kubernetes services to your local machine. Specify service names and local ports, with optional namespace, remote port, or environment.

Instructions

Starts port forwarding for one or more Kubernetes services. Call list_k8s_services (and optionally list_k8s_namespaces) first to resolve exact service names and namespaces. All port-forwards run in a single session; logs open in separate OS windows when includeLogs is true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
servicesYesArray of service configs; each can use different localPort, remotePort, namespace.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.0.3

TDQS

A3.9/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses that the tool starts a process (mutation), that multiple forwards share a session, and that logs open in separate windows if includeLogs is true. However, it does not describe blocking behavior, failure modes, resource limits, or what the tool returns (no output schema exists). These gaps limit transparency for a potentially long-running operation.

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 three sentences with no wasted words. The main action is in the first sentence, followed by usage guidance and behavioral notes. Every sentence earns its place.

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?

The description covers the prerequisite steps and session behavior, but it omits key details for a tool with no output schema: return value, success/failure signaling, and how to stop the port forwarding (though a sibling tool exists). For a tool that initiates a persistent process, additional context about lifecycle and results would be needed for full completeness.

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?

All parameters are described in the input schema (100% coverage), so the description is not required to add much. The description reinforces that service names and namespaces should be resolved beforehand and that each service config can differ, but it does not add new meaning beyond the schema. Baseline 3 is appropriate.

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 starts with a clear verb 'Starts' and resource 'port forwarding for one or more Kubernetes services'. It distinguishes from sibling tools like list_k8s_services (listing) and stop_k8s_port_forward (stopping), making the tool's core purpose unambiguous.

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 explicitly advises calling list_k8s_services and optionally list_k8s_namespaces first to resolve exact names, establishing a clear prerequisite workflow. It also notes that all port-forwards run in a single session, implying session management context. However, it does not specify when *not* to use this tool or mention alternatives like stop_k8s_port_forward for a different phase.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/oijusti/k8s-port-forward-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server