Skip to content

Kuboard MCP Tools

The Kuboard MCP Server provides 34 tools in total, grouped into three categories by purpose: read, write, and change approval. This page lists every tool's name, key parameters, and purpose for reference when configuring your agent.

Audience: operations / platform engineers who want to give an AI agent (Agent) access to Kuboard cluster operations.

Reading conventions

  • Tool names keep their original English names (e.g. list_clusters); agents call these tools directly by name
  • Parameters are marked required / (optional); most write tools carry a dryRun (optional) parameter — set to true it only validates and does not really execute, useful for previewing the change result
  • This page is the detailed expansion of "What MCP provides" in the MCP capabilities overview

Three Tool Categories: Read / Write / Approval

All tools are grouped by their real side effects into three categories: read tools only query and never modify; write tools issue persistent write operations to the cluster; change approval (Plan) tools are the entry through which write tools are executed after they get approval.

CategoryCountDescriptionApproval needed
Read19Query clusters, workloads, Pods, logs, metrics, etc.; never modify any resourceNo — returns on call
Write10Create / modify / delete K8s resources, restart and scale, node drain, etc.Yes — goes through change-plan approval first
Change approval (Plan)5Submit the pending write operations to you for approval; executes after approvalThe approval flow itself

Write tools require approval

With "Force agent change approval" enabled, the 10 write tools are invisible and not directly callable by the agent. The agent must go through the change-plan flow: create_planappend_step_to_planfinalize_plan → you approve in the Kuboard UI → apply_plan(planId, approvalToken). See change approval flow and dangerous operations and confirmation tokens.

Danger level markers

Write tools carry a danger level, treated differently by marker at approval time:

  • MEDIUM: apply_k8s / patch_k8s / delete_k8s
  • HIGH: delete_k8s_collection (especially deleting PVCs), drain_node, evict_pod — prominently marked at approval time; double-check the impact scope of these

With "Force agent change approval" disabled, the 5 change approval (Plan) tools are hidden and the write tools become directly callable by the agent again.

All Tools at a Glance (34)

The table below lists all tools by the read / write / approval categories. Only key parameters are shown; refer to each tool's actual schema when configuring your agent.

ToolCategoryKey parametersPurpose
list_clustersReadNoneList all clusters the current user can access (id / name); first step of a session
list_namespacesReadclusterIdList the namespace tree of the given cluster
list_workloadsReadclusterId, namespaceList Deployments / StatefulSets / DaemonSets
get_workloadReadclusterId, namespace, kind, nameGet the full YAML of a single workload
get_workload_historyReadclusterId, namespace, kind, nameList the workload's historical revisions (view before rollback)
list_endpointsReadclusterId, namespace (optional)List endpoints
check_permissionReadclusterId, apiGroup, resource, verb, namespace (optional)Check whether the current user has permission on a resource (self-check before a write operation)
get_podReadclusterId, namespace, nameGet detailed info of a single Pod
get_pod_logsReadclusterId, namespace, name, tailLines (default 100, max 1000), container, previous, sinceSecondsGet Pod logs
list_k8sReadclusterId, apiGroup, resource, namespace (optional)List K8s resources of any registered type (ConfigMap / Secret / Service / Ingress / PVC, etc.)
get_k8sReadclusterId, apiGroup, resource, name, namespace (optional)Get details of a single K8s resource
list_eventsReadclusterId, namespace (optional), limit (default 50)List cluster events; troubleshoot ImagePullBackOff, CrashLoopBackOff, etc.
get_node_metricsReadclusterId, name (optional, defaults to all nodes)Query real-time CPU / memory usage of nodes
get_pod_metricsReadclusterId, namespace (optional), name (optional)Query real-time CPU / memory usage of Pods
list_custom_resourcesReadclusterId, apiGroup, resource, namespaced, namespace (optional)List instances of a given CRD (CRs created by Operator / Helm)
prometheus_queryReadclusterId, query, time (optional), timeout (optional)PromQL instant query
prometheus_query_rangeReadclusterId, query, start, end, stepPromQL range query
prometheus_label_valuesReadclusterId, label, matchSeries (optional)Query the values of a label
prometheus_buildinfoReadclusterId, timeout (optional)Query Prometheus version and health info
apply_k8sWrite · MEDIUMclusterId, apiGroup, resource, namespace, yaml, dryRun (optional)Apply K8s YAML: update the resource if it exists, create it if it does not
patch_k8sWrite · MEDIUMclusterId, apiGroup, resource, name, patches, namespace (optional)Modify resource fields with RFC 6902 JSON Patch
delete_k8sWrite · MEDIUMclusterId, apiGroup, resource, name, namespace (optional), dryRun (optional)Delete a single resource; idempotently returns success when it does not exist
delete_k8s_collectionWrite · HIGHclusterId, apiGroup, resource, namespace (optional), propagationPolicy (optional)Delete an entire resource collection; pass Foreground explicitly when deleting a PVC collection
restart_workloadWriteclusterId, namespace, kind, name, dryRun (optional)Restart a workload (rollingly recreate Pods)
scale_workloadWriteclusterId, namespace, kind (deployment / statefulset), name, replicas, dryRun (optional)Change the replica count of a workload (scale up / down)
update_image_tagWriteclusterId, namespace, kind, name, newImageTag, containerName (optional)Update the image tag; applies to all containers when containerName is omitted
rollback_workloadWriteclusterId, namespace, kind, name, revisionToRollback (optional)Roll back a workload; rolls back to the previous revision when the revision is omitted
drain_nodeWrite · HIGHclusterId, nodeName, force (optional), gracePeriodSeconds (optional), dryRun (optional)Drain a node: mark it unschedulable first, then evict all its Pods; force=true ignores PodDisruptionBudget
evict_podWrite · HIGHclusterId, namespace, podName, force (optional), gracePeriodSeconds (optional), dryRun (optional)Evict a single Pod
create_planApprovaldescriptionCreate an empty change plan; returns planId
append_step_to_planApprovalplanId, tool, args, descriptionAdd an object to change into the plan; tool must be one of the 10 write tools and is dry-run validated before being added
finalize_planApprovalplanIdSubmit the plan into pending-approval state; from then on it is visible and approvable in the Kuboard UI
get_plan_approve_statusApprovalplanIdAfter approval, query the result of each step and return the approvalToken
apply_planApprovalplanId, approvalTokenConsume the approvalToken to actually execute all changes in the plan

Log parameter notes: container is required for multi-container Pods and can be omitted for single-container ones; previous set to true returns logs from before the last restart (valid only for terminated containers); sinceSeconds returns only logs from the last N seconds — use it or tailLines, not both.

The clusterId / namespace needed by read tools usually come from the return values of the first two tools, list_clusters and list_namespaces — have the agent call them at the start of a session, and every later tool is located by these two values.

Metrics and Prometheus Queries

Prerequisites

  • The node / Pod metrics tools require metrics-server installed in the cluster; without it they return an error like "metrics.k8s.io unavailable"
  • The Prometheus tools need a data source configured under System Settings → MCP Server → Prometheus first, see server configuration; unconfigured tools return a disabled notice

Prometheus queries are subject to cluster RBAC and rate limits: complex aggregate queries are rejected under the REJECT policy, and results exceeding the per-query series / points limit return PROM_TOO_LARGE. On failure the error code is passed through via meta.errorCode: PROM_NOT_FOUND (no Prometheus service found), PROM_UNREACHABLE (unreachable), PROM_QUERY_ERROR (query error), PROM_AUTH_FAILED (insufficient permission), PROM_SCOPE_TOO_LARGE (aggregation scope exceeds the limit).

Both metrics tools return normalized values: CPU converted to cores, memory to MiB — usable directly for alerting or comparison.

Typical Usage Flow

Once your agent is connected, a conversation like "restart nginx for me" roughly goes through these steps; the only thing you need to do is the final approval:

  1. The agent first calls list_clusters / list_workloads to locate the cluster and workload — read tools return immediately, no involvement needed from you
  2. The agent calls create_plan to create a change plan, adds write operations such as restart_workload via append_step_to_plan, then submits with finalize_plan
  3. You see the plan in the pending list in the Kuboard UI, review the objects and parameters, approve, and receive the approvalToken
  4. The agent calls apply_plan to execute; you can watch the progress and final result in the UI (all succeeded or partial failure)

Change Plans: The Entry to Write Approval

A change plan (Plan) is the only entry for submitting write operations to your approval, for the scenario where "the agent wants to change the cluster, but the change must be confirmed by you". The 5 tools are chained in a fixed order:

StepToolParametersPurpose
1create_plandescriptionCreate an empty plan and return planId; description states the purpose of this operation
2append_step_to_planplanId, tool, args, descriptionAppend objects to change into the plan; callable multiple times to aggregate several changes; objects that fail dry-run never enter the plan
3finalize_planplanIdSubmit the plan into pending-approval; you see it in the Kuboard UI and approve / reject
4get_plan_approve_statusplanIdAfter your approval, query each step's result; partial approval marks the skipped steps and returns the approvalToken
5apply_planplanId, approvalTokenExecute all approved changes in the plan; planId and the token must belong to the same plan

Plan status flow: CREATED (being built; visible in the list but not approvable) → PENDING (awaiting approval) → APPROVEDAPPLYINGAPPLIED / PARTIAL_APPLIED / FAILED, plus REJECTED (rejected), CANCELED (canceled), and EXPIRED (expired).

Usage suggestions

  • The tool whitelist of append_step_to_plan is exactly the 10 write tools; write operations must be added to a plan first
  • To reduce the number of approvals, combine the changes under the same purpose into a single plan