Skip to main content
Glama

apply_resource

Destructive

Create or update Kubernetes resources from YAML manifests, with server-side apply, conflict detection, dry-run validation, and multi-document support.

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
modeNo'apply' (default, create-or-update) or 'create' (fail if exists)
yamlYesYAML manifest to apply (supports multi-document with --- separator)
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.
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.
dry_runNovalidate and preview the server-side result without persisting changes
namespaceNooverride namespace for the resource
Behavior5/5

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

Beyond the destructiveHint annotation, the description discloses server-side apply with FieldManager=radar, conflict handling, multi-document failure behavior, and return content details, offering rich behavioral context without contradicting annotations.

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 well-structured and front-loaded with the core purpose, with each sentence contributing distinct and useful information without redundancy or unnecessary detail.

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?

For a tool with six parameters and no output schema, the description comprehensively covers modes, conflict handling, dry_run, verification, multi-document behavior, and return format, making it fully complete for an 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 coverage is 100%, so baseline is 3. The description adds meaning by explaining the rationale behind force (field ownership), the effect of dry_run, and the multi-document behavior, enhancing comprehension beyond the schema descriptions.

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 it creates or updates a Kubernetes resource from a YAML manifest, with explicit details about modes and behavior that distinguish it from read-only sibling tools like get_resource and patch_resource.

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?

Provides clear guidance on when to use 'apply' vs 'create' modes and when to set force=true or dry_run, but does not explicitly name alternative sibling tools or state when not to use this tool in favor of others.

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