Skip to main content
Glama
mmpyro

vcluster-mcp

by mmpyro

get_namespace_labels

Retrieve all label key-value pairs for a specified Kubernetes namespace, with optional kubeconfig path support.

Instructions

Get labels for a specific namespace.

This function retrieves all labels associated with a Kubernetes namespace. Labels are key-value pairs that can be used to organize and select resources.

Args: namespace: The name of the namespace to get labels from. kubeconfig_path: Optional path to a kubeconfig file. If not provided, the default kubeconfig from the environment will be used.

Returns: Union[Dict[str, str], str]: Dictionary of labels on success, or error object if failed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
namespaceYes
kubeconfig_pathNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations provided, the description carries the burden of behavioral disclosure. It correctly implies a read-only operation ('retrieves all labels') and documents the kubeconfig fallback behavior. However, it does not disclose authentication requirements, error conditions, or explicitly state it does not modify state, leaving some gaps.

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?

The description is well-structured with a clear purpose statement, a brief explanation of labels, and organized Args/Returns sections. It is concise without unnecessary verbosity, though the generic explanation of labels could be trimmed.

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?

For a relatively simple read tool, the description covers purpose, parameters, and return type. It does not mention error handling or access prerequisites, but the tool's simplicity and the provided Args/Returns sections make it sufficiently complete for an AI agent to invoke correctly.

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

Parameters4/5

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

Schema description coverage is 0%, so the description must fully explain parameters. It does so effectively: 'namespace' is defined as the namespace to get labels from, and 'kubeconfig_path' is described with optionality and default behavior. This adds meaningful semantics beyond the raw property names.

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?

The description clearly states the tool 'Get labels for a specific namespace' and explains that it retrieves all labels associated with a Kubernetes namespace. It distinguishes itself from sibling tools like get_namespace_annotations by explicitly focusing on labels rather than annotations.

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?

The description provides context but no explicit guidance on when to use this tool versus alternatives. It does not mention when not to use it, mention alternatives, or explain how it relates to sibling tools like set_namespace_label or get_namespace_annotations.

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

Install Server

Other Tools

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/mmpyro/vcluster-mcp'

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