Skip to main content
Glama

list_namespaces

Lists all namespaces in the connected Kubernetes cluster, returning an alphabetically sorted list with total count.

Instructions

List all namespaces present in the connected Kubernetes cluster.

Usage Guidelines

  • Call this tool first when discovering available cluster domains or when the user does not supply an explicit namespace.

  • Do not use this tool to inspect workload health; use list_pods instead.

Behavioral Transparency

  • Read-only operation.

  • Scans cluster-wide namespace resources using CoreV1Api.

  • Returns an alphabetically sorted list of namespace names with total count.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

A5/5.0
Behavior5/5

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

Explicitly states the operation is read-only and describes what it does (scans CoreV1Api) and what it returns (sorted names with count). No side effects or hidden behaviors are implied, and with no annotations, the description fully covers safety.

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?

The description is very concise, using short sentences and clear structure. Every line adds value, including the return format and usage guidance, with no redundant content.

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?

Covers the essential context needed to invoke the tool: what it does, when to use it, what it returns, and how it differs from a sibling tool. No missing information for correct invocation.

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?

The tool has zero parameters, so there are no parameter semantics to clarify. The description's lack of parameter detail is appropriate and complete.

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?

Clearly states the tool lists all namespaces in the connected Kubernetes cluster, with a specific verb and resource scope. The scope is unambiguous and directly matches the tool name.

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?

Provides explicit guidance on when to use (first when discovering cluster domains or no explicit namespace) and when not to use (for workload health, use list_pods). This gives the agent clear decision-making criteria.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/akkireddy-challa/k8s-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server