Skip to main content
Glama

issue_tkc_kubeconfig

Idempotent

Issue a kubeconfig for a Tanzu Kubernetes Cluster (TKC) using its name and namespace, and optionally write it to a file path to keep credentials out of agent context.

Instructions

[WRITE] Credential access: issue a kubeconfig for one TKC cluster.

Call only when the user explicitly asks for this kubeconfig; never as a side step. Returns {cluster, kubeconfig}, or {cluster, written_to} when output_path is given. The kubeconfig embeds a Supervisor bearer token (JWT from /wcp/login) that acts as the configured vCenter account until the JWT expires (typically hours; not tied to this process) — always pass output_path so the token never enters agent context, and report only the path. Nothing in the managed cluster changes, but output_path creates parent directories and truncates the named file (owner-only, 0600), so output_path='~/.kube/config' replaces the user's own kubeconfig. Run list_tkc_clusters first for name and namespace; use issue_supervisor_kubeconfig instead for Supervisor-level access. On one reported VCF 9.1 deployment, the guest cluster API rejects this Supervisor JWT with 401. A generated file does not prove guest access; verify it against the guest API before relying on it (issue #27).

Input Schema

NameRequiredDescriptionDefault
nameYesTKC cluster name.
targetNovCenter in config.yaml; omit for the default.
namespaceYesNamespace holding it.
output_pathNoFile to write, e.g. '~/.kube/my.yaml'. Omit to return the kubeconfig inline.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv3.2.0

TDQS

A4.8/5.0
Behavior5/5

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

Far beyond annotations: it discloses that the returned kubeconfig embeds a Supervisor JWT that acts as the vCenter account until expiry, that output_path creates parent directories and truncates the target file at 0600, that output_path='~/.kube/config' will replace the user's own kubeconfig, and that a known VCF 9.1 deployment rejects the token with 401. The one nuance is a mild tension with destructiveHint=false, since truncating a user file is a local destructive side effect, but the description explicitly scopes the claim ("nothing in the managed cluster changes") and does not misrepresent it, so this is not a contradiction.

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?

Front-loaded with the tag, verb, and resource, then ordered into restriction, return shape, hazard, prerequisite, and caveat. Every sentence carries information, though the JWT-expiry parenthetical and the issue #27 aside are dense and could be tightened without losing meaning.

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?

Return shapes are stated inline ({cluster, kubeconfig} or {cluster, written_to}) and there is no output schema, so descriptions of both return modes plus the token caveat make the tool callable without surprises. Minor gap: it does not say what happens on failure or which error surfaces when the guest API returns 401.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds decisive meaning the schema lacks: output_path is effectively mandatory for security (keeps the bearer token out of agent context) and carries file-system side effects and a data-loss hazard. It also ties name/namespace to the list_tkc_clusters prerequisite, which the schema does not.

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?

"[WRITE] Credential access: issue a kubeconfig for one TKC cluster" gives a specific verb (issue), a specific resource (kubeconfig), and a scope (one TKC cluster). It also explicitly names the sibling it is not (issue_supervisor_kubeconfig), so the agent can disambiguate without opening either 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?

Explicit when: only when the user explicitly asks for this kubeconfig, and never as a side step. Explicit prerequisites: run list_tkc_clusters first to get name and namespace. Explicit alternative: use issue_supervisor_kubeconfig for Supervisor-level access. When-to-use, when-not-to-use, and alternatives are all stated.

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