update_stream
Modify an existing TCP/UDP stream configuration in Nginx Proxy Manager by updating port settings, forwarding destinations, and SSL certificates.
Instructions
Update an existing stream
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| stream_id | Yes | The ID of the stream to update | |
| incoming_port | No | ||
| forwarding_host | No | ||
| forwarding_port | No | ||
| tcp_forwarding | No | ||
| udp_forwarding | No | ||
| certificate_id | No |
Implementation Reference
- src/npm_mcp/client.py:290-295 (handler)The implementation of the update_stream client method that sends the PUT request.
async def update_stream(self, stream_id: int, stream: Stream) -> Stream: stream_id = _validate_int_id(stream_id, "stream_id") response = await self._request( "PUT", f"/api/nginx/streams/{stream_id}", json=stream.model_dump(exclude_none=True, exclude={"id", "created_on", "modified_on", "owner_user_id"}), ) - src/npm_mcp/server.py:416-422 (handler)The handler in the server that prepares the updated stream data and calls the client's update_stream method.
elif name == "update_stream": args = dict(arguments) stream_id = args.pop("stream_id") current = await npm_client.get_stream(stream_id) updated_data = current.model_dump() updated_data.update(args) return _model_response(await npm_client.update_stream(stream_id, Stream(**updated_data))) - src/npm_mcp/server.py:144-155 (registration)The tool registration for update_stream.
Tool( name="update_stream", description="Update an existing stream", inputSchema={ "type": "object", "properties": { "stream_id": {"type": "integer", "description": "The ID of the stream to update"}, "incoming_port": {"type": "integer"}, "forwarding_host": {"type": "string"}, "forwarding_port": {"type": "integer"}, "tcp_forwarding": {"type": "boolean"}, "udp_forwarding": {"type": "boolean"},