Status Tools
The staff-only tools that report the platform’s health now: platform_status and eks_status.
They are staff-only tools of the MCPServer (smarter.apps.mcpserver.protocol.staff), for the
platform’s staff and their AI agents, e.g. Claude Code answering a help desk question. Each tool
calls smarter.apps.mcpserver.services.status.report, and formats its report as Markdown.
platform_status (
PlatformStatusTool) answers “is something wrong right now?” in one call, withplatform_status(). Its result starts with the report’s observations: what looks wrong, in plain sentences, so that the LLM does not have to find it in the tables.eks_status (
EksStatusTool) reports the cluster as the cloud provider sees it, witheks_status().
Like every staff-only tool, each call takes a ticket, is recorded in the audit trail, and is
never cached (see StaffTool).
Note
Experimental. The MCPServer was designed and coded by Claude Code (Anthropic’s Claude Opus 5.5), with Lawrence McDaniel as co-author. It is experimental, and will be documented.
- class smarter.apps.mcpserver.protocol.tools.status.EksStatusTool(user)[source]
Bases:
StaffToolThe
eks_statusoperations tool: the cluster, as the cloud provider sees it.Reads:
get_kubernetes_cluster_health(), i.e. for AWS, the EKS cluster, its node groups, its add-ons and their newest versions, and EKS’s insights, and the recent events of AWS EKS and EC2 in the platform’s region (aws_service_events()).Result: Markdown: the control plane, then a section each for the node groups, the add-ons, the insights that are not passing, and the AWS events. A part that could not be read, e.g. insights, which need the
eks:ListInsightspermission, is named, and the others are still reported. A cloud provider that is not ready, e.g. in local development, makes the call a tool error.Side effects: read-only calls to the EKS api (
DescribeCluster,ListNodegroups,DescribeNodegroup,ListAddons,DescribeAddon,DescribeAddonVersionsandListInsights), and up to two HTTPS GETs of AWS status feeds, which are cached for a minute.- static addons_section(health)[source]
Format the add-ons: each one’s version, status, available update and health issues.
- Parameters:
health (
ClusterHealth) – The cluster’s health.- Return type:
- Returns:
The section’s lines, or one that says none is listed.
- arguments_model
alias of
StaffToolArguments
- static control_plane_section(health)[source]
Format the control plane’s status, version and health issues.
- Parameters:
health (
ClusterHealth) – The cluster’s health.- Return type:
- Returns:
The section’s lines.
- description: ClassVar[str] = "Report the platform's Kubernetes cluster as AWS EKS sees it: the control plane's status, version and health issues; each node group's status, size, instance types and health issues; each add-on's version, health issues and whether a newer version is available; EKS's insights, e.g. readiness for the next Kubernetes version; and the recent events of AWS EKS and EC2 in the platform's region."
What the tool does, and when to call it.
The LLM reads it to decide which tool to call.
- static insights_section(health)[source]
Format the insights that need attention, count those that pass, and name the parts that could not be read.
- Parameters:
health (
ClusterHealth) – The cluster’s health.- Return type:
- Returns:
The section’s lines.
- static nodegroups_section(health)[source]
Format the node groups: each one’s status, size, instances, node image and health issues.
- Parameters:
health (
ClusterHealth) – The cluster’s health.- Return type:
- Returns:
The section’s lines, or one that says none is listed.
- open_world: ClassVar[bool] = True
Whether the tool reaches beyond the platform’s own data, e.g. to GitHub.
- run(arguments)[source]
Read the cluster’s health from the cloud provider, with
eks_status(), and report it.- Parameters:
arguments (
StaffToolArguments) – The validated arguments: the ticket.- Return type:
- Returns:
The report, as Markdown.
- Raises:
InfrastructureNotReadyError – If the cloud provider is not ready.
SmarterInfrastructureError – If the cluster cannot be described.
- class smarter.apps.mcpserver.protocol.tools.status.PlatformStatusTool(user)[source]
Bases:
StaffToolThe
platform_statusoperations tool: the platform’s health, now, in one call.Reads:
the environment’s pods, the cluster’s nodes, their CPU and memory use, and the namespace’s warning events (
cluster_snapshot()),the dashboard’s health checks, the Celery queues and the database’s load (
smarter.apps.mcpserver.services.status.platform),the AI providers’ and AWS’s status pages (
smarter.apps.mcpserver.services.status.feeds).
Result: Markdown, which starts with the untrusted data notice, then the observations, then a section for each of the parts above. A part that cannot be read is named, and the others are still reported.
Side effects: five
kubectl getcalls, aSELECT 1and twoSHOWqueries on the database, a value written to and deleted from the cache, a ping of the Celery workers, a connection to the Celery broker, and up to five HTTPS GETs of public status pages, which are cached for a minute. Nothing in the cluster, the database or the queues is changed.- arguments_model
alias of
PlatformStatusArguments
- description: ClassVar[str] = "Report the platform's health now, in one call: what looks wrong; the environment's pods (ready, restarts, problems such as CrashLoopBackOff or OOMKilled, CPU and memory use); the cluster's nodes (ready, pressure, CPU and memory use); recent Kubernetes warning events; the health checks of the database, cache, task broker and workers; the Celery queues' backlog; the database's connections; and the public status pages of the AI providers (OpenAI, Anthropic, Mistral) and of AWS EKS and EC2 in the platform's region. Call it first for 'is Smarter down?', 'why is it slow?' and 'is something wrong with EKS?'."
What the tool does, and when to call it.
The LLM reads it to decide which tool to call.
- static events_section(snapshot)[source]
Format the warning events section.
- Parameters:
snapshot (
ClusterSnapshot) – The snapshot, whose events are newest first.- Return type:
- Returns:
The section’s lines: one bullet per event, at most
MAX_EVENTS, each with its time, object, reason, count and message, cut atMAX_EVENT_MESSAGEcharacters, or one that says there are none.
- name: ClassVar[str] = 'platform_status'
The tool’s name, which the LLM calls it by, e.g.
search_logs.
- static observations_section(found)[source]
Format the observations section.
- Parameters:
found (
list[str]) – The observations, fromobservations().- Return type:
- Returns:
The section’s lines: one bullet per observation, or one that says nothing looks wrong.
- open_world: ClassVar[bool] = True
Whether the tool reaches beyond the platform’s own data, e.g. to GitHub.
- run(arguments)[source]
Read the platform’s health, with
platform_status(), and report it.- Parameters:
arguments (
PlatformStatusArguments) – The validated arguments: the ticket, and the minutes of warning events to read.- Return type:
- Returns:
The report, as Markdown.
- static services_section(checks, depths, database)[source]
Format the backing services section.
- Parameters:
- Return type:
- Returns:
The section’s lines: one bullet per health check, per queue, and for the database.
- title: ClassVar[str] = 'Platform status'
The tool’s human-readable name, which an MCP client may show, e.g.
Search pod logs.
- smarter.apps.mcpserver.protocol.tools.status.nodes_table(nodes)[source]
Format the cluster’s nodes as a Markdown table.
- Parameters:
nodes (
list[NodeStatus]) – The nodes.- Return type:
- Returns:
The table’s lines: its header, then one row per node, with its name, readiness, instance type and capacity type, CPU and memory use as shares of what pods may use, and its pressure conditions, and whether it is cordoned.