Skip to main content
Glama

fit_elements

Frames an entire map or selected elements and computes the zoom to fit, so you can screenshot the result. Pass element IDs to focus on specific items.

Instructions

Frame the whole map, or a group of elements, then screenshot() to see it.

ids: omit to frame the entire map — this is the normal way to look at your
  work. Pass ids to frame just those elements instead; ids without a
  position are skipped and listed in the 'missing' field.
pad: extra margin as a fraction (0.15 = 15%). The zoom is the closest
  Dungeondraft zoom level that still fits, at most 800%.

Prefer this over set_camera: it computes the zoom for you, and set_camera's
zoom is woxels-per-pixel, which runs backwards from the intuition that a
bigger number means closer.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "fit_elements"
  }
}

Input Schema

NameRequiredDescriptionDefault
idsNo
padNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.5.0

TDQS

A4.7/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does well: it discloses that ids without a position are silently skipped and reported in a 'missing' field, and that zoom snaps to the closest Dungeondraft level capped at 800%. It stops short of stating outright that the map contents are not modified and that only the camera changes, which would fully close the loop.

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?

The opening line front-loads purpose and the next step, and the per-parameter lines are scannable with labeled prefixes. The set_camera rationale is slightly long-winded, but it earns its place by preventing a foreseeable misuse.

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?

Two optional parameters, no output schema, and the description still covers defaults, edge cases (skipped ids), the 'missing' return field, and the zoom cap. An agent has everything needed to call this correctly without consulting another 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?

Schema coverage is 0%, so the description must compensate and it does: ids=omitted means whole map, ids=given means only those elements, and invalid ids land in 'missing'. pad is explained as a fraction with a worked example (0.15 = 15%) plus the resulting zoom behavior.

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?

"Frame the whole map, or a group of elements" states a specific verb and the two resource scopes, and the follow-up "then screenshot() to see it" tells the agent the tool's role in a workflow. It is immediately distinguishable from siblings like set_camera and screenshot.

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?

It gives an explicit default path ("omit ids to frame the entire map — this is the normal way to look at your work"), an explicit alternative ("Pass ids to frame just those elements instead"), and an explicit exclusion with reason: "Prefer this over set_camera: it computes the zoom for you" plus the counterintuitive woxels-per-pixel caveat.

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