Skip to main content
Glama
mcp-server-kubernetes
by Flux159

kubectl_context

Idempotent

List, inspect, and set the active Kubernetes context to target the correct cluster before running cluster operations.

Instructions

Manage Kubernetes contexts - list, get, or set the current context

Input Schema

NameRequiredDescriptionDefault
nameNoName of the context to set as current (required for set operation)
outputNoOutput formatjson
detailedNoInclude detailed information about the context
operationYesOperation to perform: list contexts, get current context, or set current contextlist
showCurrentNoWhen listing contexts, highlight which one is currently active

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.0

TDQS

B3.2/5.0
Behavior2/5

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

Annotations already flag this as non-read-only but idempotent and non-destructive, so the description's remaining job is to explain the consequence of 'set' — that it rewrites the current-context in the local kubeconfig and affects all subsequent kubectl operations. None of that is stated, nor is whether the change is scoped locally vs. affecting any cluster. For the one mutating path in this tool, the description adds no behavioral context beyond the annotations.

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?

A single front-loaded sentence naming the resource and the three operations, with zero filler or repetition. It is efficient, though the terseness borders on under-specification rather than ideal economy.

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?

With five parameters, two enums, no output schema, and sparse annotations, the definition is minimally viable: an agent knows enough to call list/get, and the schema covers the rest. What is missing is the effect of the mutating 'set' path and any hint of the return shape for list/get, which matters for a tool whose primary use is inspection.

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 description coverage is 100%, so every parameter including 'name', 'output', 'detailed', and 'showCurrent' is already documented at the field level. The description contributes nothing further about parameter behavior (e.g., how 'detailed' interacts with 'output', or what 'custom' output implies), so the baseline of 3 applies.

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 pairs a specific verb ('Manage') with a specific resource ('Kubernetes contexts') and enumerates the three supported operations (list/get/set), which maps cleanly to the operation enum. That clearly separates it from resource-oriented siblings like kubectl_get or kubectl_describe. It stops short of explicitly naming a sibling to differentiate against, so a 4 rather than 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?

Usage is only implied through the operation enum: an agent can infer that 'set' is for switching context and 'list'/'get' for inspection, but the description never states when to prefer this over inspecting kubeconfig another way, nor any prerequisites (e.g., a valid kubeconfig must exist). No when-not guidance or alternatives are given.

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