app_stop_server
Stop the currently running HTTP server managed by Goose App Maker MCP. Returns a dictionary with the operation result, ensuring server shutdown is confirmed.
Instructions
Stop the currently running HTTP server.
Returns:
A dictionary containing the result of the operation
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- main.py:481-512 (handler)The handler function for the 'app_stop_server' tool. It stops the global HTTP server instance if running, resets the app response state, and returns a success or error dictionary.def app_stop_server() -> Dict[str, Any]: """ Stop the currently running HTTP server. Returns: A dictionary containing the result of the operation """ global http_server, app_response, response_ready try: if http_server: logger.info("Stopping HTTP server") http_server.shutdown() http_server.server_close() http_server = None # Reset response state app_response = None response_ready = False return { "success": True, "message": "HTTP server stopped successfully" } else: return { "success": False, "error": "No HTTP server is currently running" } except Exception as e: logger.error(f"Error stopping server: {e}") return {"success": False, "error": f"Failed to stop server: {str(e)}"}
- main.py:480-480 (registration)The @mcp.tool() decorator registers the app_stop_server function as an MCP tool.@mcp.tool()