Skip to main content
Glama

Opsphere — DevOps & SRE Intelligence

kubectl contexts

k8s_contexts
Read-only

List available EKS clusters/contexts in kubeconfig. PREFERRED tool when the user asks "what clusters do I have?" or "which EKS cluster?" — use this INSTEAD of eks_update_kubeconfig.

Input Schema

NameRequiredDescriptionDefault
profileNoAWS_PROFILE opcional
context_idNoOptional explicit Connection Hub work context (ctx_*). Omit to use the conversation's active workspace; global Hub tools ignore it.

Output Schema

NameRequiredDescriptionDefault
okYes
dataYes
contractVersionYes
dataSchemaVersionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed18 schema fields changed
    • changedOutput schema / properties / data / additionalProperties
      Previous value: -trueNew value: +false
    • removedOutput schema / properties / data / properties / apiVersion
      Removed value: -{
      -  "type": "string"
      -}
    • removedOutput schema / properties / data / properties / context
      Removed value: -{
      -  "type": "string"
      -}
    • addedOutput schema / properties / data / properties / contexts
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "cluster": {
      +        "type": "string"
      +      },
      +      "current": {
      +        "type": "boolean"
      +      },
      +      "name": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "name"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • removedOutput schema / properties / data / properties / count
      Removed value: -{
      -  "type": "number"
      -}
    • addedOutput schema / properties / data / properties / current
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / data / properties / gaps
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • removedOutput schema / properties / data / properties / items
      Removed value: -{
      -  "items": {
      -    "additionalProperties": true,
      -    "properties": {},
      -    "type": "object"
      -  },
      -  "type": "array"
      -}
    • removedOutput schema / properties / data / properties / kind
      Removed value: -{
      -  "type": "string"
      -}
    • removedOutput schema / properties / data / properties / metadata
      Removed value: -{
      -  "$ref": "#/properties/data/properties/items/items"
      -}
    • removedOutput schema / properties / data / properties / namespace
      Removed value: -{
      -  "type": "string"
      -}
    • addedOutput schema / properties / data / properties / partial
      Added value: +{
      +  "type": "boolean"
      +}
    • removedOutput schema / properties / data / properties / status
      Removed value: -{
      -  "$ref": "#/properties/data/properties/items/items"
      -}
    • addedOutput schema / properties / data / properties / truncated
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / data / properties / warnings
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / data / required
      Added value: +[
      +  "contexts",
      +  "partial",
      +  "truncated",
      +  "warnings",
      +  "gaps"
      +]
    • addedOutput schema / properties / dataSchemaVersion
      Added value: +{
      +  "const": 2,
      +  "type": "number"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "contractVersion",
      -  "ok",
      -  "data"
      -]New value: +[
      +  "contractVersion",
      +  "dataSchemaVersion",
      +  "ok",
      +  "data"
      +]
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, non-destructive, closed-world), and the description adds that the source is the local kubeconfig, which explains why results are environment-scoped. It does not discuss pagination or auth prerequisites, but with annotations plus an output schema present, that gap is minor.

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?

Two short sentences with zero filler: the purpose leads, and the routing rule follows. Nothing is repeated from the title or annotations.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema, full parameter documentation, and read-only annotations, the description covers what an agent needs to select and call it. A slight gap remains around whether it lists all kubeconfig contexts or only EKS ones, which the first sentence leaves ambiguous.

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% for both optional parameters (profile, context_id), so the schema already carries the semantics. The description adds nothing about how profile affects which contexts appear, so the baseline 3 applies.

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?

States a specific verb (List) and resource (available EKS clusters/contexts in kubeconfig), which distinguishes it from the sibling k8s_context_use (switch context) and eks_update_kubeconfig. An agent can tell exactly what this returns without opening the schema.

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?

Explicitly names the trigger phrasings ("what clusters do I have?", "which EKS cluster?") and the alternative to use instead (eks_update_kubeconfig). This is precisely the routing guidance an agent needs to pick between the related kubectl tools.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources