Skip to main content
Glama
es6kr
by es6kr

stop_gui

Stop the web GUI server for managing Claude Code conversation sessions.

Instructions

Stop the web GUI server

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'stop_gui' tool. Checks if the web server instance exists, attempts a graceful shutdown via the /api/shutdown endpoint, calls stopWebServer to kill the process if necessary, and returns a success message.
    server.tool('stop_gui', 'Stop the web GUI server', {}, async () => {
      if (webServerInstance) {
        const port = webServerInstance.port
        // Call shutdown API first for graceful shutdown
        try {
          await fetch(`http://localhost:${port}/api/shutdown`, { method: 'POST' })
        } catch {
          // Server might already be stopping
        }
        // Then kill the process if still running
        await stopWebServer(webServerInstance)
        webServerInstance = null
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify({ success: true, message: 'Web GUI stopped successfully' }, null, 2),
            },
          ],
        }
      }
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify({ success: true, message: 'Web GUI was not running' }, null, 2),
          },
        ],
      }
    })
  • Registers the 'stop_gui' MCP tool with empty schema and the inline handler function.
    server.tool('stop_gui', 'Stop the web GUI server', {}, async () => {
      if (webServerInstance) {
        const port = webServerInstance.port
        // Call shutdown API first for graceful shutdown
        try {
          await fetch(`http://localhost:${port}/api/shutdown`, { method: 'POST' })
        } catch {
          // Server might already be stopping
        }
        // Then kill the process if still running
        await stopWebServer(webServerInstance)
        webServerInstance = null
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify({ success: true, message: 'Web GUI stopped successfully' }, null, 2),
            },
          ],
        }
      }
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify({ success: true, message: 'Web GUI was not running' }, null, 2),
          },
        ],
      }
    })
  • Supporting function called by the stop_gui handler to terminate the web server child process gracefully.
    export async function stopWebServer(server: WebServer): Promise<void> {
      server.process.kill('SIGTERM')
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('Stop') but does not reveal any behavioral traits such as whether this requires specific permissions, if it's reversible, what side effects occur (e.g., interrupting user sessions), or any rate limits. This leaves significant gaps in understanding the tool's behavior.

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?

The description is a single, direct sentence ('Stop the web GUI server') that is front-loaded and wastes no words. It efficiently conveys the core purpose without any extraneous details, making it highly concise and well-structured for its simplicity.

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

Completeness3/5

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

Given the tool's complexity is low (0 parameters, no output schema, no annotations), the description is minimally adequate. However, it lacks context about the tool's effects, prerequisites, or relationship to siblings like 'start_gui', which could be important for safe usage. It meets basic needs but has clear gaps in completeness for a mutation tool.

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 input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description does not add parameter information, which is appropriate here, and it doesn't contradict the schema. A baseline of 4 is applied since no parameters exist, and the description doesn't attempt to compensate unnecessarily.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Stop') and the target resource ('the web GUI server'), which is specific and unambiguous. It doesn't explicitly differentiate from sibling tools like 'start_gui', but the verb 'Stop' inherently contrasts with 'start', making the purpose reasonably clear without direct sibling comparison.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives, such as under what conditions stopping the GUI is appropriate or what prerequisites might be needed. It lacks any mention of context, exclusions, or related tools like 'start_gui' for restarting, leaving usage entirely implicit.

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/es6kr/claude-sessions-mcp'

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