Skip to main content
Glama

Normalize viewBox

normalize_viewbox

Repair or normalize the document's root viewBox. Synthesizes a missing viewBox from width/height or fixes a malformed one, leaving a valid viewBox unchanged.

Instructions

Normalize or repair the document's root viewBox.

When to use: tidying/repairing a missing or malformed root viewBox. To frame the page to the art use fit_to_content, to set the page size use resize_canvas.

Key params: none beyond doc_id. A valid 4-number viewBox is left unchanged (idempotent → changed=False); an absent one is synthesized from numeric width/height; a malformed one is repaired from width/height when possible.

Return shape: EditResultoperation_id, snapshot_id, changed (real before/after content diff), before/after preview; the edit lands on the working copy only (reversible).

Example: normalize_viewbox(doc_id)

Render and look before you trust this edit: render with render_preview (or live_render_view) and inspect the result before relying on it; restore_snapshot reverts it if it is wrong.

Risk class: medium.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
doc_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
doc_idYes
changedYes
summaryNo
snapshot_idYes
operation_idYes
preview_afterNo
preview_beforeNo
Behavior5/5

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

Annotations provide minimal info (readOnlyHint=false, idempotentHint=false, destructiveHint=false). The description adds rich behavior: idempotency for valid viewBox, synthesis/recovery for absent/malformed, reversibility on working copy, return shape with diff, and risk warning. 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?

Description is well-structured with clear sections: purpose, usage, key params, return shape, example, risk warning. Every sentence adds value and the most important information (what it does) is front-loaded. No wasted words.

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 the tool's simplicity (one parameter, output schema exists), the description covers all needed aspects: purpose, when to use, behavior, return, risk, and references to siblings. It is fully complete for an agent to select and invoke correctly.

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 has 1 param (doc_id) with 0% description coverage. Description mentions 'Key params: none beyond doc_id', acknowledging the parameter but adding no further details about its type or usage. For a single simple parameter, this is adequate but minimal added value.

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?

The description clearly states the tool normalizes/repairs the root viewBox. It specifies the action and resource, and distinguishes from siblings fit_to_content and resize_canvas by naming them as alternatives for different purposes.

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 states 'When to use: tidying/repairing a missing or malformed root viewBox.' and provides when-not-to-use guidance with alternative tool names, offering clear context for selection.

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