Skip to main content
Glama

gateway_status

Monitor OpenClaw gateway process health by retrieving its uptime, restart history, bind address, and PID to detect crashes or public exposure flagged by 0.0.0.0 binding.

Instructions

Status of the OpenClaw gateway process: alive/dead, uptime, recent restarts (intentional vs crashes), bind address, PID. Flags 0.0.0.0 binding (default-publicly-exposed config).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Tool registration for 'gateway_status' — defines its name, description, and empty inputSchema. Registered as an MCP Tool in list_tools().
    Tool(
        name="gateway_status",
        description=(
            "Status of the OpenClaw gateway process: alive/dead, uptime, recent "
            "restarts (intentional vs crashes), bind address, PID. Flags 0.0.0.0 "
            "binding (default-publicly-exposed config)."
        ),
        inputSchema={"type": "object", "properties": {}, "required": []},
    ),
  • GatewayStatus Pydantic model (schema) — defines fields: is_alive, last_restarted_at, uptime_seconds, pid, bind_address, restarts_24h, crashes_24h, health, notes.
    class GatewayStatus(BaseModel):
        """Status of the OpenClaw gateway process.
    
        `crashes_24h` is the count of unintentional restarts in the last 24h
        (different from intentional `restarts_24h` triggered by config change /
        deploy). Backends that can't disambiguate may report both as `restarts_24h`
        and leave `crashes_24h=None`.
        """
    
        model_config = ConfigDict(frozen=True)
    
        is_alive: bool
        last_restarted_at: datetime | None = None
        uptime_seconds: int | None = None
        pid: int | None = None
        bind_address: str | None = None
        """e.g., "0.0.0.0:18789" — flagged as DEGRADED when 0.0.0.0 (publicly exposed default)."""
        restarts_24h: int = 0
        crashes_24h: int | None = None
        health: HealthLevel = HealthLevel.UNKNOWN
        notes: list[str] = Field(default_factory=list)
  • call_tool handler for 'gateway_status' — calls backend.get_gateway_status() and serializes the result via _serialize().
    if name == "gateway_status":
        return _serialize(await backend.get_gateway_status())
  • MockBackend.get_gateway_status() — returns sample GatewayStatus data (alive, degraded, bind 0.0.0.0, 1 crash).
    async def get_gateway_status(self) -> GatewayStatus:
        return GatewayStatus(
            is_alive=True,
            last_restarted_at=_ago(hours=4, minutes=33),
            uptime_seconds=4 * 3600 + 33 * 60,
            pid=14872,
            bind_address="0.0.0.0:18789",
            restarts_24h=2,
            crashes_24h=1,
            health=HealthLevel.DEGRADED,
            notes=[
                "Bound to 0.0.0.0 — gateway is publicly exposed (default config). "
                "Bind to 127.0.0.1 unless intentional.",
                "1 unintentional crash in last 24h (post 2026.4.26 upgrade regression).",
            ],
        )
  • Abstract base class defining the get_gateway_status() interface that all backends must implement.
    @abstractmethod
    async def get_gateway_status(self) -> GatewayStatus:
        """Return current gateway process status — alive/dead, uptime, recent restarts."""
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses that the tool reports status including whether the process is alive/dead and flags a security-relevant binding. It does not mention auth requirements or rate limits, but for a read-only status tool, this is adequate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short, dense sentences contain all necessary information without wasted words. The structure is efficient and front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no input parameters and no output schema, the description provides a comprehensive list of output fields and a notable security flag. It is sufficiently complete for the agent to understand the tool's function and return value.

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?

There are zero parameters, so the baseline is 4. The description adds value by listing the expected output fields (uptime, restarts, etc.), exceeding the baseline by providing concrete details about what the tool returns.

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?

The description explicitly states that the tool returns the status of the OpenClaw gateway process, listing specific attributes (alive/dead, uptime, restarts, bind address, PID). It also uniquely flags a security concern (0.0.0.0 binding), clearly distinguishing it from sibling health check tools.

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

Usage Guidelines3/5

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

Usage context is implied through the description of the tool's purpose (gateway status) among sibling health tools, but no explicit guidance on when to use this vs alternatives or when not to use it is provided.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/temurkhan13/openclaw-health-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server