Skip to main content
Glama

add_territory

Add a filled, bordered territory polygon to a Wonderdraft map, clamped to map bounds. Set color, border style and width, and fill opacity to mark regions programmatically.

Instructions

Add a filled, bordered territory polygon; points outside the map are clamped (clamped = how many). color is "#rrggbb" or [r, g, b(, a)] floats 0-1 (0-255 values are rejected with a hint). opacity is the fill opacity 0-1. style is one of Wonderdraft's border textures: border_dark_dot, border_dash, border_gradient, border_solid. width is the border width in px.

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": {
      "points": "<points>",
      "color": "<color>"
    },
    "name": "add_territory"
  }
}

Input Schema

NameRequiredDescriptionDefault
colorYes
styleNoborder_dash
widthNo
pointsYes
opacityNo
smoothingNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description does real work: it discloses clamping of out-of-bounds points, that 0-255 color values are rejected with a hint, and the exact border-texture style set that the schema does not enumerate. It omits success/failure behavior, whether the operation is undoable via the undo sibling, and any permission or open-map requirement.

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

Conciseness3/5

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

It is a single front-loaded paragraph with no filler, but the fragment "(clamped = how many)" reads like an unresolved author note rather than a semantic clarification, and the run-on color clause is harder to parse than it needs to be.

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

Completeness3/5

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

For a 6-parameter mutation tool with no annotations and no output schema, the description covers five of six parameters and a key input-validation behavior. It still leaves smoothing undocumented and says nothing about the result of a successful call or interaction with undo and object listing.

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 0%, so the description must compensate, and it largely does: color syntax and rejection rule, opacity range, the allowed style strings, and width units are all supplied. Only smoothing (default 0.2) is left completely unexplained, and points is described only via the clamping note rather than format or ordering.

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

Purpose4/5

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

"Add a filled, bordered territory polygon" gives a specific verb plus a distinct resource, which separates it from add_forest, add_lake, and add_path without needing their schemas. It stops short of naming any sibling or stating the boundary case (e.g. territory vs. region).

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

Usage Guidelines2/5

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

There is no guidance on when to reach for this instead of build_region, add_path, or the other shape-adding siblings, and no stated prerequisites such as whether a map must be open or a layer active. The agent must infer relevance purely from the resource name.

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