Skip to main content
Glama

List serviceaccounts

k8s_list_serviceaccounts
Read-onlyIdempotent

List Kubernetes ServiceAccounts in a specified namespace to inspect identities available to workloads, with optional targeting of a named multi-context pool context.

Instructions

List ServiceAccounts in a namespace.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "k8s_list_serviceaccounts"
  }
}

Input Schema

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.4.2

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false and openWorldHint=true, so the safety profile is fully covered without the description. The only added context is that results are namespace-scoped, but it does not say what happens when namespace is omitted (all namespaces vs. default namespace) or whether pagination/limits apply.

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 with no filler or redundancy. It is efficient, though the terseness edges into under-specification rather than deliberate brevity.

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?

For a simple read-only list operation with full annotation coverage and no output schema, the description covers the essentials. However, the optional/nullable namespace parameter and multi-context pool behavior are left entirely to the schema, leaving the definition just barely adequate.

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 50% — the context parameter is documented in the schema, but namespace has no description there. The description mentions a namespace but does not clarify its semantics, notably that it is nullable and defaults to null, which is precisely the ambiguity an agent would need resolved.

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 states a specific verb and resource ("List ServiceAccounts") plus a scope ("in a namespace"), which is enough to distinguish it from the many sibling list_* tools targeting other Kubernetes resources. It does not explicitly name or contrast with any alternative, so it falls short of 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: an agent infers it should call this when it needs ServiceAccounts rather than ConfigMaps or Deployments. There is no explicit statement of when to use it, no prerequisites (e.g., cluster context selection), and no handling of the namespace-omitted case.

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