Skip to main content
Glama

add_container

Adds ONE empty container (group/swimlane) to a live Trident document. When you are building a diagram, do NOT create the containers first and fill them later — use draw_group, which draws a container together with its nodes and edges. The result reports where things landed: "placed" (centre x/y and size w/h), the "container" box grown around its nodes, "overlaps" when something landed on top of something else, "nextFree" (top-left corners of clear space to the right of and below the whole diagram — positions are centres, so add half your region's width/height), and sometimes a "hint" — act on it. Containers visually group related nodes. Use get_document_summary to check existing container IDs before adding to avoid duplicates. Requires a valid editor access token. To build an ERD (entity-relationship diagram), add one container per table with kind:"erd" and an x/y position, then add each field with add_node (container:, no x/y) — rows are stacked and the table sized automatically — and join TABLES (never rows) with add_connection using an ERD pair type such as "one_to_many".

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": {
      "token": "<token>",
      "agentId": "<agentId>",
      "container": "<container>"
    },
    "name": "add_container"
  }
}

Input Schema

NameRequiredDescriptionDefault
tokenYesEditor access token for this document. The document ID is embedded in the token.
agentIdYesYOUR AI assistant name (e.g. "Claude.ai", "GitHub Copilot"). Shown as "[agentId] working with [userName]" in the collaboration presence dot.
userNameNoFirst name of the human you are assisting (ask them at session start if you do not know). Shown in the collaboration presence dot as "[agentId] working with [userName]".
containerYes
action_explanationNoOptional: brief explanation of what this action does and why (max 250 chars). Shown live to human collaborators in the AI cursor tooltip.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / container / properties / x / description
      Previous value: -"Optional: X position (required for kind:\"erd\" — the centre of the table)"New value: +"X of the container's centre. Give the final position now. If you omit x/y the server places the container in clear space beside the diagram and the result tells you where — it never lands at the origin. Required for kind:\"erd\" (the centre of the table)."
    • changedInput schema / properties / container / properties / y / description
      Previous value: -"Optional: Y position (required for kind:\"erd\" — the centre of the table)"New value: +"Y of the container's centre (larger Y is lower on screen). Give with x. Required for kind:\"erd\"."
  2. Changed5 schema fields changed
    • addedInput schema / properties / container / properties / height
      Added value: +{
      +  "description": "Optional: fixed height (use with width). Not for ERD tables. If you give a container a fixed size, make sure every node you add to it fits inside, or enlarge it with update_container.",
      +  "type": "number"
      +}
    • addedInput schema / properties / container / properties / kind
      Added value: +{
      +  "description": "Optional: \"erd\" makes this container an ERD table (flat table: the label is the table name, child nodes are its field rows). Omit for a regular container.",
      +  "enum": [
      +    "erd"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / container / properties / width
      Added value: +{
      +  "description": "Optional: fixed width. Omit width/height to let the container auto-size around its nodes. ERD tables default to 220; their height is managed automatically (28 header + 24 per row), so do not set it.",
      +  "type": "number"
      +}
    • changedInput schema / properties / container / properties / x / description
      Previous value: -"Optional: X position"New value: +"Optional: X position (required for kind:\"erd\" — the centre of the table)"
    • changedInput schema / properties / container / properties / y / description
      Previous value: -"Optional: Y position"New value: +"Optional: Y position (required for kind:\"erd\" — the centre of the table)"
  3. Changed1 schema field changed
    • addedInput schema / properties / container / properties / outlineColor
      Added value: +{
      +  "description": "Optional: border/outline color (hex or color name), e.g. \"#5B7A99\" for a C4 system boundary.",
      +  "type": "string"
      +}
  4. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only tell us it is a non-readonly, non-idempotent, non-destructive open-world write. The description adds substantial unstated behavior: it reports "placed", "container", "overlaps", "nextFree" in centres so half the region size must be added, may return a "hint" to act on, requires a valid editor access token, and never lands at the origin when x/y are omitted. It also notes that fixed-size containers must fit their nodes or be enlarged with update_container. That is meaningful disclosure beyond the annotation set.

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?

Front-loading is strong: purpose first, alternative second, return semantics third. The closing ERD recipe is long and reads more like a workflow tutorial than a tool definition, and the result-field enumeration is dense, but every sentence carries actionable information rather than filler.

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?

There is no output schema, so the description carries the return-value burden itself — and it does, describing placed/container/overlaps/nextFree/hint and how to interpret centre coordinates. Combined with the ERD recipe, the auth requirement, and the auto-placement fallback, an agent has enough to invoke this correctly and interpret the response.

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 description coverage is 80%, so most parameters are already documented; the description still adds real meaning, notably that positions are centres and that x/y are required for kind:"erd" while ERD height is auto-managed. It does not, however, discuss token/agentId/userName semantics beyond what the schema already says, so it is not fully additive.

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 opening sentence names a specific verb and resource with scope: "Adds ONE empty container (group/swimlane) to a live Trident document." It immediately distinguishes itself from the sibling draw_group, which draws a container together with its nodes and edges, so an agent can route correctly without opening either schema.

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?

Explicit when-not guidance: "do NOT create the containers first and fill them later — use draw_group". It also names get_document_summary as the pre-check for existing container IDs and spells out the ERD workflow (add_node with container:<table id>, then add_connection between tables, never rows). This is about as complete as a when/when-not/alternatives section gets.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.