Skip to main content
Glama

Set cluster agent resources

set_cluster_agent_resources

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.

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?

Far exceeds the annotations, which only mark it non-readonly/non-destructive. It discloses the restart and brief offline window, that sizing persists through upgrades with survives_agent_upgrades reporting, why requests are capped low, that a request above its limit is refused, and that agents.manage is required.

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?

Front-loaded with purpose and the OOM fix, and nearly every sentence carries non-redundant information. It is a single dense paragraph rather than a structured list, which slightly hurts scannability for this much content.

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?

No output schema, yet the description explains the salient result field (survives_agent_upgrades), the operational consequences (restart, persistence), the safety constraints, and preconditions. Nothing an agent needs to invoke it correctly is missing.

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 the schema already documents ranges and empty-string handling. The description nevertheless adds real meaning: 'Only the named members change' (partial update semantics), that an empty string makes the agent keep its current value, and the request-vs-limit rule.

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?

States a specific verb and resource: 'Resize the Ankra agent itself on a cluster: set its container's memory and CPU limits and requests.' This unambiguously distinguishes it from siblings like scale_deployment or resize_bastion, which target other workloads.

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 an explicit triggering condition ('the fix for an ankra-agent that is OOMKilled at its memory limit'), an exclusion ('do not hand the user a helm or kubectl command'), and names the read-only siblings to consult first (describe_resource, get_events, get_pod_logs).

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.