Status Tools

The operations tools that report the platform’s health now: platform_status and eks_status.

They are tools of the Smarter Operations MCP server (smarter.apps.mcpserver.protocol.operations_server), for the platform’s staff and their AI agents, e.g. Claude Code answering a help desk question.

  • platform_status (PlatformStatusTool) answers “is something wrong right now?” in one call. It reads the environment’s pods and the cluster’s nodes, with their CPU and memory use, the namespace’s warning events (cluster), the dashboard’s health checks, the Celery queues and the database’s load (platform), and the status pages of the AI providers and of AWS (feeds). Its result starts with its 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: the control plane, the node groups, the add-ons and their available updates, and the provider’s insights, e.g. readiness for the next Kubernetes version, from get_kubernetes_cluster_health().

Like every operations tool, each call takes a ticket, is recorded in the audit trail, and is never cached (see SmarterOperationsTool). Nothing adds cloud monitoring costs: the data comes from Kubernetes, metrics-server, the platform’s own services, the EKS api, and public status pages.

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.status.tools.EksStatusTool(user)[source]

Bases: SmarterOperationsTool

The eks_status operations 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:ListInsights permission, 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, DescribeAddonVersions and ListInsights), 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:

list[str]

Returns:

The section’s lines, or one that says none is listed.

arguments_model

alias of OperationsToolArguments

static aws_section(aws_events, unread_feeds)[source]

Format the recent AWS events.

Parameters:
  • aws_events (list[AwsEvent]) – The events, newest first.

  • unread_feeds (list[str]) – The AWS services whose feed could not be read.

Return type:

list[str]

Returns:

The section’s lines, or one that says there are none.

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:

list[str]

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:

list[str]

Returns:

The section’s lines.

name: ClassVar[str] = 'eks_status'

The tool’s name, which the LLM calls it by, e.g. search_logs.

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:

list[str]

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, and report it.

Parameters:

arguments (OperationsToolArguments) – The validated arguments: the ticket.

Return type:

str

Returns:

The report, as Markdown.

Raises:
title: ClassVar[str] = 'EKS status'

The tool’s human-readable name, which an MCP client may show, e.g. Search pod logs.

class smarter.apps.mcpserver.status.tools.PlatformStatusTool(user)[source]

Bases: SmarterOperationsTool

The platform_status operations tool: the platform’s health, now, in one call.

Reads:

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 get calls, a SELECT 1 and two SHOW queries 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:

list[str]

Returns:

The section’s lines: one bullet per event, at most MAX_EVENTS, each with its time, object, reason, count and message, cut at MAX_EVENT_MESSAGE characters, 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, from observations().

Return type:

list[str]

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.

read_database()[source]

Read the database’s load, or report that it could not be read.

Return type:

DatabaseLoad | None

Returns:

The load, or None if the database could not be queried. The failure is logged, and becomes an observation.

run(arguments)[source]

Read the platform’s health, and report it.

Parameters:

arguments (PlatformStatusArguments) – The validated arguments: the ticket, and the minutes of warning events to read.

Return type:

str

Returns:

The report, as Markdown.

static services_section(checks, depths, database)[source]

Format the backing services section.

Parameters:
Return type:

list[str]

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.

static upstream_section(providers, aws_events, unread_feeds, region)[source]

Format the upstream status pages section.

Parameters:
  • providers (list[ProviderStatus]) – The AI providers’ status.

  • aws_events (list[AwsEvent]) – The recent AWS events. They are listed in the observations.

  • unread_feeds (list[str]) – The AWS services whose feed could not be read.

  • region (str) – The platform’s AWS region.

Return type:

list[str]

Returns:

The section’s lines: one bullet per AI provider, one per unread AWS feed, and one that says AWS reports no events, when it does not.

smarter.apps.mcpserver.status.tools.observations(snapshot, checks, depths, database, providers, aws_events)[source]

Describe everything that looks wrong, for the top of platform_status’s result.

It gathers the observations of the pods, the nodes, the warning events, the backing services and the upstream status pages, and the parts of the cluster that could not be read.

Parameters:
Return type:

list[str]

Returns:

One sentence per problem, or an empty list if nothing looks wrong.