Skip to main content
Glama

Restart host

restart_host

Restarts the subagent-mcp host to load rebuilt code from disk while keeping agent records, results, usage, and queued or scheduled tasks intact.

Instructions

Restart this project's subagent-mcp host so it runs the subagent-mcp code currently on disk (after a rebuild). Agent records, results and usage are kept, and queued or scheduled (start_at/delay_seconds) tasks persist so a restart is safe for them; the replacement host re-arms their timers and the result reports scheduled_tasks_preserved. Undelivered pings are kept too. Always refused while any agent is running, waiting for a slot, or waiting for approval. Also refused when the host already runs the code on disk, or when other Claude Code sessions are connected to it (restarting would disconnect them); ask the user before passing force: true to override those two. Reconnecting with /mcp already reloads an idle host that no other session uses; use this when a host_warning says the host is on an older build. After a restart this connection lists the new host's tools and tells Claude Code the tool list changed.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "restart_host"
  }
}

Input Schema

NameRequiredDescriptionDefault
forceNoRestart even if the code is unchanged or other sessions are connected

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.4.0

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does: it discloses exactly what survives a restart (agent records, results, usage, queued/scheduled tasks, undelivered pings), that the replacement host re-arms timers, that the result reports scheduled_tasks_preserved, and every refusal condition including other connected sessions. It even explains the post-restart side effect on the client's tool list, which an agent could not infer elsewhere.

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, then preservation guarantees, then refusal rules, then the alternative and post-restart effect — a sensible order for a consequential operation. The prose is dense and a few clauses run long, but almost every sentence adds information an agent needs before calling a destructive-feeling lifecycle operation.

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?

For a no-annotation, no-output-schema restart tool, the description covers safety, data preservation, refusal conditions, override policy, and post-call state changes. Nothing an agent needs in order to decide whether to invoke it, or with force, 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?

The single parameter is fully documented in the schema, so the baseline is 3; the description adds a real operational constraint beyond the schema by requiring the user to be asked before passing force: true. It stops short of describing any further force semantics, but the added consent rule is meaningful.

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 ('Restart this project's subagent-mcp host') and explains the reason it exists: to run the code currently on disk after a rebuild. An agent can distinguish this from the sibling lifecycle tools without opening the schema.

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 trigger ('use this when a host_warning says the host is on an older build'), names an alternative that does not require the tool ('Reconnecting with /mcp already reloads an idle host'), and enumerates the conditions that make it refuse. When-to-use, when-not-to-use, and alternatives are all present.

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