Skip to main content
Glama

stop-metro

Stops the Metro bundler process listening on a specified port and asks for user confirmation before sending SIGTERM. Use when Metro must be stopped or restarted.

Instructions

Stop the Metro bundler process listening on port. Use when the user asks to stop Metro or when Metro must be restarted - do not offer it when a task wraps up, since the next task would wait on a cold Metro start. Returns { stopped, port, pids }: stopped=true when it sent SIGTERM to every listening pid it found (or the pid had already exited), stopped=false when it found none. Fails if the port lookup cannot run or times out, if it finds a listener but not the process that owns it, or if it cannot signal a listener it found (e.g. EPERM). On macOS another user's listener is detected only when no other listener on the port is visible, so it can survive stopped=true. This is DESTRUCTIVE: always ask the user for confirmation before calling this tool.

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": "stop-metro"
  }
}

Input Schema

NameRequiredDescriptionDefault
portNoTCP port Metro is listening on. Default: 8081. Range: 1 to 65535.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / port / description
      Previous value: -"TCP port Metro is listening on (default 8081)"New value: +"TCP port Metro is listening on. Default: 8081. Range: 1 to 65535."
  2. First observedv0.15.0

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full burden and does: it documents the return shape ({ stopped, port, pids }), the exact semantics of stopped=true vs false, three distinct failure classes (lookup failure/timeout, orphaned listener, unsignalable listener like EPERM), a platform-specific caveat where a listener can survive stopped=true on macOS, and a DESTRUCTIVE label requiring user confirmation.

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 usage guidance, and every sentence carries operative information (no filler). It is a dense single block, though, and the return-shape and failure enumeration could be broken out for faster scanning; length is justified by the absence of an output schema.

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?

A one-parameter destructive tool with no annotations and no output schema needs exactly this: purpose, usage boundaries, return contract, failure modes, platform caveat, and confirmation requirement. An agent has everything required to decide and to call it safely.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the single `port` parameter already documents default 8081 and range 1-65535, so the description adds nothing new about it beyond tying it to the listening process. Baseline 3 applies since the schema does the heavy lifting.

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?

Names a specific verb and resource ('Stop the Metro bundler process') plus the scoping selector ('listening on `port`'). The name is easily confused with siblings like debugger-reload-metro or stop-all-simulator-servers, and the description makes the exact target unambiguous.

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 explicit when-to-use ('user asks to stop Metro or when Metro must be restarted') and an explicit when-not ('do not offer it when a task wraps up, since the next task would wait on a cold Metro start'), with the reasoning attached. It also imposes a confirmation precondition, so the agent knows the required pre-call behavior.

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