Skip to main content
Glama

Set cluster agent resources

set_cluster_agent_resources
Destructive

Resize the Ankra agent itself on a cluster: set its container's memory and CPU limits and requests. This is the fix for an ankra-agent that is OOMKilled at its memory limit (raise memory_limit, e.g. to "2Gi"); do not hand the user a helm or kubectl command for it. Ankra holds the sizing for the cluster, so every later agent upgrade and every reinstall renders it; an agent that accepts held sizing re-renders its own release at once, and an older one has its Deployment resized directly and keeps it through upgrades (the result's survives_agent_upgrades says whether that holds). Either way the agent restarts onto the new sizing, so the cluster reads as offline for a few seconds. Only the named members change; an empty string stops Ankra holding a member (the agent keeps its current value for it, so to change a value set a new one), and a call that matches what the agent already runs stores it without a restart. Requests are capped low on purpose (memory 128Mi-2Gi, CPU 50m-2) because the agent's old pod stops before the new one schedules and a request no node can place would leave the cluster without an agent; limits take memory 512Mi-16Gi and CPU 100m-8. A request above its limit is refused. Read the agent's current sizing with describe_resource on the Deployment ankra-agent in the agent's namespace, and its OOM history with get_events or get_pod_logs. Requires agents.manage.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "set_cluster_agent_resources"
  }
}

Input Schema

NameRequiredDescriptionDefault
cpu_limitNoNew CPU limit, as a Kubernetes quantity (100m to 8), e.g. "1" or "500m", or an empty string to stop holding it.
cluster_idNoUUID of the target cluster. Optional when a cluster is selected.
cpu_requestNoNew CPU request, as a Kubernetes quantity (50m to 2), or an empty string to stop holding it. Must not exceed the CPU limit. Usually leave unchanged.
cluster_nameNoExact name of the target cluster. Optional when a cluster is selected.
memory_limitNoNew memory limit for the agent container, as a Kubernetes quantity (512Mi to 16Gi), e.g. "2Gi", or an empty string to stop holding it. Raise this for an OOMKilled agent.
memory_requestNoNew memory request, as a Kubernetes quantity (128Mi to 2Gi), or an empty string to stop holding it. Must not exceed the memory limit. Usually leave unchanged.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / properties / cpu_limit / description
      Previous value: -"New CPU limit, as a Kubernetes quantity (100m to 8), e.g. \"1\" or \"500m\"."New value: +"New CPU limit, as a Kubernetes quantity (100m to 8), e.g. \"1\" or \"500m\", or an empty string to stop holding it."
    • changedInput schema / properties / cpu_request / description
      Previous value: -"New CPU request, as a Kubernetes quantity (50m to 2). Must not exceed the CPU limit. Usually leave unchanged."New value: +"New CPU request, as a Kubernetes quantity (50m to 2), or an empty string to stop holding it. Must not exceed the CPU limit. Usually leave unchanged."
    • changedInput schema / properties / memory_limit / description
      Previous value: -"New memory limit for the agent container, as a Kubernetes quantity (512Mi to 16Gi), e.g. \"2Gi\". Raise this for an OOMKilled agent."New value: +"New memory limit for the agent container, as a Kubernetes quantity (512Mi to 16Gi), e.g. \"2Gi\", or an empty string to stop holding it. Raise this for an OOMKilled agent."
    • changedInput schema / properties / memory_request / description
      Previous value: -"New memory request, as a Kubernetes quantity (128Mi to 2Gi). Must not exceed the memory limit. Usually leave unchanged."New value: +"New memory request, as a Kubernetes quantity (128Mi to 2Gi), or an empty string to stop holding it. Must not exceed the memory limit. Usually leave unchanged."
  2. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only flag destructive/non-idempotent; the description adds the consequences that matter: the agent restarts onto new sizing and the cluster reads as offline for a few seconds, held sizing is re-rendered by later upgrades and reinstalls, older agents get a direct Deployment resize, and the survives_agent_upgrades result field reports which case applied. It also discloses the empty-string semantics (stops Ankra holding a member) and the no-op case that stores without a restart, plus the auth requirement (agents.manage).

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?

Long but front-loaded: purpose and the OOM fix come first, then behavior, then parameter edge cases. Nearly every sentence carries operational meaning, though the nested parentheticals about held sizing and survives_agent_upgrades are dense enough to slow a first read.

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 destructive, zero-required-parameter mutation with no output schema, the definition covers what an agent needs: trigger condition, permission, restart consequence, per-member semantics, validation rule (request above limit refused), and even the meaning of the result field. Nothing material is left to inference.

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 already 100%, so the baseline is 3; the description goes beyond it by explaining the per-member model ('Only the named members change'), that an empty string stops Ankra holding a member rather than resizing to zero, that a request above its limit is refused, and the rationale for the deliberately low request caps versus the wider limit ranges.

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?

Opens with a specific verb+resource+scope: 'Resize the Ankra agent itself on a cluster: set its container's memory and CPU limits and requests.' It even states the primary real-world motivation (OOMKilled agent), so an agent can distinguish this from upgrade_cluster_agent or the various set_cluster_* siblings without opening the schema.

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

Usage Guidelines5/5

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

Gives explicit when-to-use (fix an OOMKilled ankra-agent) and an explicit when-not-to (do not hand the user a helm or kubectl command). It also names the diagnostic siblings to consult first: describe_resource on the Deployment ankra-agent, plus get_events and get_pod_logs for OOM history.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.