Skip to main content
Glama

Label resource

k8s_label_resource

Add or update labels on a Kubernetes resource by specifying its type, name, and optional namespace or context using a patch-based approach.

Instructions

Label a Kubernetes resource (table-driven via patch_resource).

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": {
      "resource_type": "<resource_type>",
      "name": "<name>"
    },
    "name": "k8s_label_resource"
  }
}

Input Schema

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

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, destructiveHint=false, and openWorldHint=true, so safety is partly covered. The description adds only 'table-driven via patch_resource' and does not explain label merge/patch semantics, required permissions, conflicts, or what happens to existing labels.

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

Conciseness2/5

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

It is a single sentence, but it is under-specified rather than usefully concise. The parenthetical implementation note is not a substitute for parameter and behavior details.

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 mutating tool with five parameters, low schema description coverage, no output schema, and open-world behavior, the description is incomplete. It does not describe patch semantics, expected result, or enough context to call the tool confidently.

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

Parameters1/5

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

The schema has five parameters and only 20% description coverage, with only context carrying a schema description. The tool description does not explain resource_type, name, namespace, labels shape, or how labels are applied, so it fails to compensate for the low schema coverage.

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?

States the specific verb 'Label' and resource 'Kubernetes resource', and identifies the implementation as table-driven via patch_resource. It does not distinguish this tool from closely related siblings such as k8s_annotate_resource or k8s_patch_resource, 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 Guidelines2/5

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

Provides no when-to-use, when-not-to-use, prerequisite, or explicit alternative-tool guidance. It only implies that labeling a resource should be done through this tool.

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