Skip to main content
Glama

Map secret to service account

k8s_map_secret_to_service_account

Map a Kubernetes Secret to a ServiceAccount in a namespace to associate credentials with that account for workloads that rely on it.

Instructions

Map a secret to a ServiceAccount.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "secret_name": "<secret_name>",
      "sa_name": "<sa_name>",
      "namespace": "<namespace>"
    },
    "name": "k8s_map_secret_to_service_account"
  }
}

Input Schema

NameRequiredDescriptionDefault
contextNoNamed context of the multi-context pool to run against (see cm_multi_context list_contexts); the default context if omitted.
sa_nameYes
namespaceYes
secret_nameYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.4.2

TDQS

C2.4/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=false, openWorldHint=true and destructiveHint=false, so the safety profile is partly covered, but the description adds nothing beyond them. For a mutating cluster operation it should disclose whether the call is idempotent, what happens if the mapping already exists, and whether it requires cluster permissions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is a single short sentence with no filler, so it is not bloated, but it is effectively a duplication of the title and carries no front-loaded operational information. Brevity here comes at the cost of substance rather than from efficiency.

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

Completeness2/5

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

For a non-read-only, open-world cluster mutation with a required 3-parameter compound target and no output schema, the definition is too thin. An agent cannot tell from this text what state changes, what errors to expect (missing secret, missing SA, conflicting mapping), or what the call returns.

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

Parameters2/5

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

Schema description coverage is only 25% — only the optional 'context' parameter is documented in the schema. The three required parameters (secret_name, sa_name, namespace) have no descriptions anywhere, and the description does not compensate by explaining their roles or constraints.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description restates the title almost verbatim: 'Map a secret to a ServiceAccount' gives a verb and a resource, but 'map' is a Kubernetes-specific operation whose meaning (adding the secret to the ServiceAccount's secrets/imagePullSecrets list) is never explained. It does not name the obvious inverse sibling k8s_unmap_secret_from_service_account or say how the result differs from it.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to use this tool, what prerequisites must hold (does the secret and ServiceAccount need to already exist in the given namespace?), or which alternatives apply. The presence of a dedicated unmapping sibling makes the omission of any directional guidance a real gap.

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

Deploy Server

Other Tools