Skip to main content
Glama

add_frame

Creates a frame container to group and organize diagram elements, optionally enclosing existing elements by ID.

Instructions

Create a frame container, optionally enclosing existing elements.

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": {
      "name": "<name>",
      "x": "<x>",
      "y": "<y>",
      "w": "<w>",
      "h": "<h>"
    },
    "name": "add_frame"
  }
}

Input Schema

NameRequiredDescriptionDefault
hYes
wYes
xYes
yYes
nameYes
opacityNo
fillStyleNo
roughnessNo
element_idsNo
strokeColorNo
strokeStyleNo
strokeWidthNo
backgroundColorNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.5.0
    • changedInput schema / properties / backgroundColor / anyOf
      Previous value: -[
      -  {
      -    "pattern": "^(?:transparent|#[0-9A-Fa-f]{3,8})$",
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "pattern": "^(?:transparent|#[0-9A-Fa-f]{3}|#[0-9A-Fa-f]{4}|#[0-9A-Fa-f]{6}|#[0-9A-Fa-f]{8})$",
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / strokeColor / anyOf
      Previous value: -[
      -  {
      -    "pattern": "^(?:transparent|#[0-9A-Fa-f]{3,8})$",
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "pattern": "^(?:transparent|#[0-9A-Fa-f]{3}|#[0-9A-Fa-f]{4}|#[0-9A-Fa-f]{6}|#[0-9A-Fa-f]{8})$",
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  2. Changed3 schema fields changedv0.4.0
    • changedInput schema / properties / backgroundColor / anyOf
      Previous value: -[
      -  {
      -    "pattern": "^(?:transparent|#[0-9A-Fa-f]{3}|#[0-9A-Fa-f]{4}|#[0-9A-Fa-f]{6}|#[0-9A-Fa-f]{8})$",
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "pattern": "^(?:transparent|#[0-9A-Fa-f]{3,8})$",
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / element_ids / anyOf
      Previous value: -[
      -  {
      -    "items": {
      -      "maxLength": 200,
      -      "minLength": 1,
      -      "pattern": ".*\\S.*",
      -      "type": "string"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "items": {
      +      "maxLength": 200,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / strokeColor / anyOf
      Previous value: -[
      -  {
      -    "pattern": "^(?:transparent|#[0-9A-Fa-f]{3}|#[0-9A-Fa-f]{4}|#[0-9A-Fa-f]{6}|#[0-9A-Fa-f]{8})$",
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "pattern": "^(?:transparent|#[0-9A-Fa-f]{3,8})$",
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  3. Changed1 schema field changedv0.3.0
    • changedOutput schema / (root)
      Previous value: -{
      -  "properties": {
      -    "arrow_id": {
      -      "type": "string"
      -    },
      -    "circle_id": {
      -      "type": "string"
      -    },
      -    "diamond_id": {
      -      "type": "string"
      -    },
      -    "frame_id": {
      -      "type": "string"
      -    },
      -    "label_id": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ]
      -    },
      -    "rectangle_id": {
      -      "type": "string"
      -    },
      -    "text_id": {
      -      "type": "string"
      -    }
      -  },
      -  "type": "object"
      -}New value: +null
  4. First observedv0.2.1

TDQS

C2.9/5.0
Behavior3/5

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

Annotations already declare openWorldHint=false, idempotentHint=false, and destructiveHint=false. The description adds one behavioral detail beyond that — the frame can enclose existing elements, implying some form of grouping/reparenting operation — but says nothing about whether enclosed elements move, how z-order works, or what the created frame returns.

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?

A single front-loaded sentence with no filler or repetition. It is efficient, though for a 13-parameter creation tool the terseness contributes to the overall under-specification assessed elsewhere.

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

Completeness2/5

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

This is a 13-parameter mutation tool with no output schema and no schema descriptions, yet the description is one sentence. Critical context an agent needs — coordinate system, units, how enclosed elements are affected, default styling — is absent, so it is not complete relative to the tool's complexity.

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

Parameters2/5

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

Schema description coverage is 0% across 13 parameters, so the schema provides only names, types, and constraints. The description only hints at the element_ids parameter via 'optionally enclosing existing elements' and says nothing about the required x/y/w/h coordinates, opacity, or style fields, leaving most parameter meaning undocumented in both places.

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?

States a specific verb and resource ('Create a frame container') that clearly identifies the object type, distinguishing it from generic element creators like create_shape or add_text. It lacks explicit sibling differentiation, but the resource is specific enough that an agent can tell what it makes.

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 when-to-use guidance, no mention of prerequisites, and no routing to alternatives such as create_shape or batch_mutate. The only hint is the optional enclosure of existing elements, which implies a use case but does not say when a frame is preferable to other containers.

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