Screenshot from a viewpoint
screenshot_fromCaptures the game scene from any specified camera position, angles, and field of view and returns it as an MCP image without moving the player. Set width and height to render at a custom resolution.
Instructions
Captures the scene from an arbitrary camera (pos, ang, fov) and returns it as an MCP image; the player does not move. Client only (unsupported on srcds), with a loaded map. Without w/h: a temporary CalcView hook moves the view for 3 frames, the window is captured, then the hook is removed (result method calcview, camera_restored: true when the player's view is back). With w/h: rendered into an off-screen target of that size (method render_target), the view is not touched. The local player's body is drawn (it is not the camera). debug_draw primitives are visible. Example: {"pos": [0, -300, 200], "ang": [30, 90, 0], "w": 800, "h": 600}.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"pos": "<pos>",
"ang": "<ang>"
},
"name": "screenshot_from"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| h | No | Height in pixels (default: the game window's). | |
| w | No | Width in pixels (default: the game window's). | |
| ang | Yes | Camera angles [pitch, yaw, roll] in degrees. | |
| fov | No | Field of view in degrees (default 90). | |
| pos | Yes | Camera position, [x, y, z] in Hammer units. | |
| format | No | Default jpeg. | |
| quality | No | JPEG quality (default 90). | |
| instance | No | Optional. Instance identifier (see instances_list). If present and different from the local instance, the call is relayed by the coordinator to that instance. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| h | No | ||
| w | No | ||
| file | No | ||
| next | No | ||
| note | No | ||
| bytes | Yes | ||
| format | No | ||
| method | No | ||
| source | No | ||
| ignored | No | ||
| warning | No | ||
| screen_h | No | ||
| screen_w | No | ||
| next_call | No | ||
| capture_ms | No | ||
| answered_by | No | ||
| file_deleted | No | ||
| truncated_note | No | ||
| camera_restored | No | ||
| version_warning | No |