Skip to main content
Glama
genart-dev

genart-mcp

by genart-dev

capture_screenshot

Captures a sketch screenshot as an inline JPEG with metadata, optionally saving a full-resolution PNG; intended for single-frame canvas2d renders.

Instructions

Capture a screenshot of a sketch. Returns an inline JPEG image + metadata as text. In local mode, also writes a full-res PNG to snapshots/--preview.png (path in savedPreviewTo). When a previewUrl is present in the metadata, the full-res image is available at that URL for sharing (30-min TTL). In MCP Apps-capable clients, the captured image renders inline in the conversation.

IMPORTANT TIMING: The capture waits only 500ms after page load. For animated p5 sketches that accumulate particles/lines over many frames, the screenshot may appear mostly empty. This is NORMAL — it does NOT mean the algorithm is broken. To verify animated sketches, use preview_sketch to open in the browser instead. Only use capture_screenshot for single-frame renderers (canvas2d) or after confirming the sketch works in the browser preview.

Input Schema

NameRequiredDescriptionDefault
seedNoOverride seed for this capture only
widthNoOutput width in pixels (default: sketch canvas width)
heightNoOutput height in pixels (default: sketch canvas height)
paramsNoOverride params for this capture only
targetNoWhat to capture (default: selected)
sketchIdNoRequired when target is 'sketch'
previewSizeNoMax dimension for inline preview JPEG (default: 400)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and delivers most of it: return format (inline JPEG + metadata text), a disk side effect (full-res PNG under snapshots/...), a sharing URL with a 30-min TTL, inline rendering in MCP Apps clients, and a concrete timing constraint (500ms post-load) that would otherwise cause an agent to misdiagnose an empty capture as a failure. It stops short of stating whether the capture is read-only or what errors/permissions look like, so it is thorough but not exhaustive.

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 what the tool does and what it returns, with the critical timing caveat clearly flagged. The timing paragraph is longer than typical but every clause earns its place by preventing a specific failure mode; a bit of the file-writing detail could be tightened.

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

Completeness4/5

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

For a 7-parameter tool with no output schema and no annotations, the description supplies the missing return-value and side-effect information plus a misuse warning and an alternative. The remaining gap is parameter-level behavior for target/sketchId and the shape of the returned metadata, which the agent must infer from the schema.

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

Parameters3/5

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

Schema description coverage is 100%, so the seven parameters (seed, width, height, params, target, sketchId, previewSize) are already documented individually, including defaults. The description mentions seed/value semantics only obliquely via the filename pattern and doesn't clarify target=selected vs sketch or size override behavior. Baseline 3 for high schema coverage with no compensating detail.

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+resource (capture a screenshot of a sketch) and immediately characterizes the output: inline JPEG plus text metadata, plus an optional full-res PNG written to a named path. This is clearly distinguishable from preview_sketch (browser preview) and design_capture_composite (design-document composite) named elsewhere in the sibling set.

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

Usage Guidelines5/5

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

Explicitly routes the agent: use it for single-frame renderers (canvas2d) or after the sketch is verified in the browser; do NOT rely on it for animated p5 sketches, and use preview_sketch instead. It names both the condition for exclusion and the alternative tool, which is exactly what usage guidance should do.

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

Deploy Server

Other Tools