Skip to main content
Glama

Opsphere — DevOps & SRE Intelligence

kubectl use-context

k8s_context_use

Sensitive setup action: switch the default kubeconfig context. Do not use this for health checks or other read-only monitoring; pass profile and context directly to the Kubernetes tool instead.

Input Schema

NameRequiredDescriptionDefault
contextYesContext name, e.g. your-tenant-pre
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. Changed16 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 / count
      Removed value: -{
      -  "type": "number"
      -}
    • 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"
      +}
    • addedOutput schema / properties / data / properties / previous
      Added value: +{
      +  "type": "string"
      +}
    • 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: +[
      +  "context",
      +  "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.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false / destructiveHint=false / openWorldHint=false, so the safety profile is known. The description adds real value by flagging this as a 'Sensitive setup action' that mutates the default context for subsequent calls, which is not in the annotations. It stops short of stating reversibility, required permissions, or how to restore a previous 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?

Two tight sentences with zero filler, front-loading the risk signal ('Sensitive setup action') before the exclusion. Every clause 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?

For a three-parameter mutation with full schema coverage, complete annotations, and an output schema (so return values need no explanation), the description covers purpose, risk, and the correct alternative. Nothing an agent needs in order to call this safely is 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 description coverage is 100%, so all three parameters are already documented. The description only echoes that 'profile and context' can be passed through, adding no meaning beyond the schema; context_id is not mentioned at all. Baseline 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?

States a specific verb and resource — 'switch the default kubeconfig context' — which is unambiguous about the operation and its global scope. It does not name the sibling tools (k8s_contexts, eks_update_kubeconfig) it should be distinguished from, so an agent must infer the distinction.

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?

Explicitly names the when-not case ('Do not use this for health checks or other read-only monitoring') and points to the preferred alternative (pass profile and context directly to the Kubernetes tool). The positive case is only implied by 'Sensitive setup action', and it doesn't say whether the switch persists for the rest of the session.

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