Skip to main content
Glama

Screenshot from a viewpoint

screenshot_from
Read-only

Captures 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

NameRequiredDescriptionDefault
hNoHeight in pixels (default: the game window's).
wNoWidth in pixels (default: the game window's).
angYesCamera angles [pitch, yaw, roll] in degrees.
fovNoField of view in degrees (default 90).
posYesCamera position, [x, y, z] in Hammer units.
formatNoDefault jpeg.
qualityNoJPEG quality (default 90).
instanceNoOptional. 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

NameRequiredDescriptionDefault
hNo
wNo
fileNo
nextNo
noteNo
bytesYes
formatNo
methodNo
sourceNo
ignoredNo
warningNo
screen_hNo
screen_wNo
next_callNo
capture_msNo
answered_byNo
file_deletedNo
truncated_noteNo
camera_restoredNo
version_warningNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.7

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Discloses behavior far beyond the annotations: the default path installs a temporary CalcView hook, moves the view for 3 frames, captures, then removes it and reports camera_restored; the w/h path renders off-screen and leaves the view untouched. It also flags non-obvious rendering facts (the local player's body is drawn, debug_draw primitives are visible) and a platform limitation. The transient view movement is a mild nuance against readOnlyHint but is explicitly bounded and self-reported, so it is disclosure rather than contradiction.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the one-sentence purpose, then the branching behavior, then a concrete example call. Dense parentheticals make it slightly hard to scan, but almost every clause carries operational information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 8-parameter tool with a rich output schema and read-only annotations, the description covers the gaps that matter: platform support, map requirement, mode switching, side effects, and rendered content. Nothing an agent needs to call it correctly appears missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the schema already defines pos/ang/fov/w/h/format/quality. The description still adds genuine meaning the schema cannot express: omitting w/h selects the CalcView capture path while supplying them selects render_target, a behavioral consequence of a parameter presence not documented in the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ("Captures the scene from an arbitrary camera") plus the defining scope constraint ("the player does not move"), which is exactly what differentiates it from a plain player-view screenshot. An agent can tell what it gets back ("an MCP image") without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives real prerequisites ("Client only (unsupported on srcds), with a loaded map") and an implicit routing rule between the two capture modes based on whether w/h are supplied. It does not explicitly say when to prefer the sibling screenshot tool over this one, so it stops short of full alternative routing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.