# screen.zoom_to

Source: https://docs.lightair.app/developers/remote-api/screen.zoom_to

> Zooms every display capture that has zoom on to a point of the screen, for a while.

JSON-RPC 2.0 method of Lightair's Remote API (ws://localhost:4455/rpc). Group: Objects and sources. Script plugins need the `project.write` permission.

## Parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `x` | `number` | no | Display points from the display's left edge. |
| `y` | `number` | no | Display points from its top edge. |
| `fx` | `number` | no | Instead of x: a fraction of its width, 0 to 1. |
| `fy` | `number` | no | Instead of y: a fraction of its height, 0 to 1. |
| `display` | `string` | no | A display from capture.targets. Default: the main display. |
| `scale` | `number` | no | How far to zoom in, 1.1 to 6. |
| `hold_s` | `number` | no | How long to hold it, 0.5 to 15 seconds. Default 4. |

## Result

| Name | Type | Required | Description |
|---|---|---|---|
| `at` | `[number, number]` | no | The point, in screen coordinates. |
| `hold_s` | `number` | no | How long it holds. |

## Errors

Invalid params (-32602) without `x` and `y` or `fx` and `fy`. Not found (-32004) for an unknown display.

## From an AI agent

The MCP server's `zoom_to (action: in)` reaches this method.

## Example

```json
{ "jsonrpc": "2.0", "id": 1, "method": "screen.zoom_to", "params": { "fx": 0.5, "fy": 0.5, "scale": 2 } }
```

Result:

```json
{ "at": [756, 491], "hold_s": 4 }
```

## Related

- [screen.zoom_release](https://docs.lightair.app/developers/remote-api/screen.zoom_release.md)
- [capture.targets](https://docs.lightair.app/developers/remote-api/capture.targets.md)
