Skip to main content
Glama

apply_resource

Destructive

Create or update Kubernetes resources from YAML manifests with server-side apply, field ownership conflict detection, and dry-run preview.

Instructions

Create or update a Kubernetes resource from a YAML manifest. In 'apply' mode (default), performs a server-side apply with FieldManager=radar and reports field ownership conflicts instead of taking ownership by default. Set force=true only when you intend to take field ownership from other managers (Helm, Flux, GitOps controllers, kubectl). In 'create' mode, performs a strict create that fails if the resource already exists. Supports multi-document YAML separated by '---'. Use dry_run to validate without persisting changes and preview the server-side result. Multi-document failures return per-document status because earlier documents may already be applied. By default returns compact post-mutation state, submitted-vs-live spec differences, rollout/pod status for workloads, and current related issues; set verify=false only when you need a terse write result.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
yamlYesYAML manifest to apply (supports multi-document with --- separator)
modeNo'apply' (default, create-or-update) or 'create' (fail if exists)
dry_runNovalidate and preview the server-side result without persisting changes
namespaceNooverride namespace for the resource
verifyNoreturn compact post-mutation state, rollout/pod status, and related issues; on dry_run return a preview diff. Default true; set false for a terse write result.
forceNoapply mode only: force server-side apply field ownership conflicts and take ownership from other managers. Default false; use only when you intend to override Helm/Flux/GitOps/kubectl ownership.
Behavior5/5

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

The description goes beyond the destructiveHint annotation by detailing field ownership conflict handling, multi-document failure behavior, and default return content (post-mutation state, spec diffs, rollout/pod status). It also warns about force implications.

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 a single coherent paragraph that front-loads the main purpose and logically flows through modes, parameters, and return behavior. It is thorough but could be slightly more concise, though the length is justified by the tool's complexity.

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?

Given the tool has 6 parameters, no output schema, and one required parameter, the description covers all aspects: modes, edge cases (multi-document failures), dry_run preview, and default vs terse output. It leaves no significant gaps for an agent to interpret.

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?

While the input schema already describes parameters, the description adds meaningful context: explains the default mode and FieldManager, conditions for force, and the interaction of verify with dry_run. This enriches understanding beyond the schema.

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 creates or updates Kubernetes resources from YAML, distinguishes between 'apply' and 'create' modes, and implicitly differentiates from sibling tools like patch_resource by focusing on full manifests and server-side apply.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

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

The description provides guidance on when to use force, dry_run, and verify parameters, and explains the behavior of both modes. However, it does not explicitly contrast with sibling tools (e.g., patch_resource) to help the agent choose among them.

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/skyhook-io/radar'

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