enable_redirection_host
Activate a configured URL redirection in Nginx Proxy Manager by specifying its host ID to direct traffic from one address to another.
Instructions
Enable a redirection host
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host_id | Yes | The ID of the redirection host to enable |
Implementation Reference
- src/npm_mcp/client.py:266-269 (handler)The implementation of the 'enable_redirection_host' method in the NPMClient class, which performs the actual API request.
async def enable_redirection_host(self, host_id: int) -> None: host_id = _validate_int_id(host_id, "host_id") await self._request("POST", f"/api/nginx/redirection-hosts/{host_id}/enable") - src/npm_mcp/server.py:122-122 (registration)The tool definition for 'enable_redirection_host' in the MCP server's tool list.
Tool(name="enable_redirection_host", description="Enable a redirection host", inputSchema=_id_schema("host_id", "The ID of the redirection host to enable")), - src/npm_mcp/server.py:402-404 (handler)The handler logic in the MCP server that routes the 'enable_redirection_host' tool call to the client implementation.
elif name == "enable_redirection_host": await npm_client.enable_redirection_host(arguments["host_id"]) return _msg_response("Redirection host enabled successfully")