Skip to main content
Glama

Live: set viewport

live_set_viewport
Read-onlyIdempotent

Adjust the canvas viewport by zooming, panning, or fitting to selection or page. Use to frame the canvas before rendering or capturing.

Instructions

Control the live canvas viewport: zoom / pan / fit-to-selection / fit-to-page.

When to use: framing the canvas before a render/capture. To then render use live_render_view; to edit (not just view) use live_apply_to_selection.

Key params: mode is one of the fixed verbs zoom | pan | fit_selection | fit_page (no raw Action or code path — ADR-003). zoom takes a positive zoom and optional center_x/center_y to recentre; pan takes both dx and dy (a delta in user units); fit_selection/fit_page take no numerics. Every numeric is finite-checked and bounded server-side before it crosses the transport (sec.12). Requires a session. VIEW-ONLY (no Operation Record, no approval).

Return shape: LiveViewportResult — the applied viewport state.

Example: live_set_viewport("zoom", zoom=2.0)

Risk class: low (view-only; no document mutation, no Operation Record).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dxNo
dyNo
modeYes
zoomNo
center_xNo
center_yNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeYesViewport mode applied (zoom/pan/fit_selection/fit_page).
detailNoShort human-readable summary.
appliedNoWhether the backend applied the viewport op.
Behavior5/5

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

Reinforces annotations by declaring VIEW-ONLY, no Operation Record, no approval, and mentions server-side bounds checking. No contradiction with annotations.

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

Conciseness5/5

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

Well-structured with clear sections, no filler, each sentence adds value. Efficiently covers purpose, usage, params, example, risk.

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?

Given 0% schema coverage, description compensates fully. Includes return shape mention (LiveViewportResult). Usage and safety covered. Complete for this view-only tool.

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

Parameters5/5

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

Despite 0% schema coverage, description fully explains each mode's parameter requirements (zoom needs zoom/center, pan needs dx/dy, fit modes take no numerics), adding critical meaning beyond 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?

Description clearly states verb 'control' and resource 'live canvas viewport', and explicitly distinguishes from siblings like live_render_view and live_apply_to_selection.

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?

Provides explicit 'When to use' guidance and names alternatives for rendering and editing, making it clear when not to use this tool.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jjjsood/inkscape-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server