create_dead_host
Configure a 404 error page host in Nginx Proxy Manager to handle invalid domain requests with optional SSL settings.
Instructions
Create a new 404 dead host
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| domain_names | Yes | List of domain names | |
| certificate_id | No | ||
| ssl_forced | No | ||
| hsts_enabled | No | ||
| hsts_subdomains | No | ||
| http2_support | No | ||
| advanced_config | No |
Implementation Reference
- src/npm_mcp/client.py:319-324 (handler)The implementation of the create_dead_host method in the NPMClient class, which makes the actual API call to the backend.
async def create_dead_host(self, host: DeadHost) -> DeadHost: response = await self._request( "POST", "/api/nginx/dead-hosts", json=host.model_dump(exclude_none=True, exclude={"id", "created_on", "modified_on"}), ) return DeadHost(**response.json()) - src/npm_mcp/server.py:168-184 (registration)The tool registration for 'create_dead_host' in the MCP server, including its input schema.
Tool( name="create_dead_host", description="Create a new 404 dead host", inputSchema={ "type": "object", "properties": { "domain_names": {"type": "array", "items": {"type": "string"}, "description": "List of domain names"}, "certificate_id": {"type": "integer"}, "ssl_forced": {"type": "boolean", "default": False}, "hsts_enabled": {"type": "boolean", "default": False}, "hsts_subdomains": {"type": "boolean", "default": False}, "http2_support": {"type": "boolean", "default": False}, "advanced_config": {"type": "string", "default": ""}, }, "required": ["domain_names"], }, ), - src/npm_mcp/server.py:438-439 (handler)The MCP server call_tool handler block for 'create_dead_host', which validates arguments and calls the client method.
elif name == "create_dead_host": return _model_response(await npm_client.create_dead_host(DeadHost(**arguments)))