Skip to main content
Glama

Apply manifest

k8s_apply_manifest

Apply one or more Kubernetes YAML manifests server-side, automatically placing namespaced resources in the target namespace and returning a per-document summary.

Instructions

Server-side apply one or more YAML documents (kubectl apply --server-side).

Namespaced documents without metadata.namespace go to namespace. Returns one summary per document; object bodies are not echoed.

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": {
      "manifest_yaml": "<manifest_yaml>"
    },
    "name": "k8s_apply_manifest"
  }
}

Input Schema

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.4.2

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already declare mutating, non-destructive, open-world behavior. The description adds useful behavior beyond that: namespace defaulting for namespaced documents lacking metadata.namespace, and the return shape (one summary per document, object bodies omitted). It does not address conflict behavior despite force_conflicts defaulting to true, nor whether a failing document aborts the remaining ones.

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?

Three short sentences, front-loaded with the core operation, then scoping behavior, then return format. No filler, no restatement of the tool name, and each sentence carries distinct information.

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 mutation tool with five parameters, no output schema, and only 20% schema coverage, the description covers the essentials of target selection and return format. It leaves notable gaps around dry_run and force_conflicts semantics and failure handling across multiple documents, which an agent would need to know before invoking it on a multi-document manifest.

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

Parameters3/5

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

Schema description coverage is only 20% (only the context parameter is documented), but the description compensates partially by explaining how the namespace parameter applies to namespaced documents without metadata.namespace. manifest_yaml, dry_run, and force_conflicts receive no explanation, and the force_conflicts default of true in particular is a consequential behavior left undocumented.

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 pairs a specific verb with the resource and qualifies it precisely: server-side apply of one or more YAML documents, with the kubectl equivalent given in parentheses. That maps the tool unambiguously for anyone familiar with Kubernetes. It stops short of naming the obvious alternative (k8s_diff_manifest) for previewing changes, so sibling differentiation is left implicit.

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 states what happens but never when to reach for this tool versus k8s_diff_manifest for a preview, nor when the dry_run parameter should be used instead of a plain apply. The namespace defaulting rule is operational detail, not selection guidance. An agent must infer usage entirely from the tool's purpose.

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