Skip to main content
Glama

create_diagram

Start a new diagram or clear an existing session. Provide a session ID to reset that diagram, or omit to begin a new one.

Instructions

Create a new diagram or clear an existing session.

This action will:

  1. If a sessionId is specified, clear all elements in that session.

  2. If no sessionId is specified, create a new session.

  3. Reset the application state.

Usage scenarios: • Starting a new project (no sessionId specified) • Clearing an existing diagram (sessionId specified) • Creating multiple independent diagrams (specify different sessionIds each time)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionIdNoSession ID. If not specified, a new session is automatically generated. If an existing ID is specified, that session is cleared.
viewBackgroundColorNoCanvas background color (default: #ffffff)
Behavior4/5

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

With no annotations, the description fully discloses behavior: it clears elements if sessionId provided, creates new session otherwise, and resets application state. This adequately informs the agent of the tool's side effects, though a caution about data loss could be added.

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?

The description is concise and well-structured with numbered steps and bullet points for scenarios. Every sentence adds value without redundancy.

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

Completeness4/5

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

Given the parameter count and lack of output schema, the description covers the tool's behavior well. However, it omits details about what the tool returns (e.g., session ID), leaving a minor gap in completeness.

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 coverage is 100% with good descriptions. The description adds value by explaining the conditional behavior based on sessionId, but this is largely redundant with the schema. Baseline of 3 is appropriate.

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?

The description clearly states the tool's dual function: creating a new diagram or clearing an existing session. It provides specific actions based on sessionId. However, it does not explicitly differentiate from sibling tools like 'start_session' or 'delete_diagram', though the conditional behavior is implied.

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

Usage Guidelines4/5

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

Usage scenarios are given (starting new project, clearing diagram, creating multiple diagrams). No explicit exclusions or alternatives (e.g., when to use 'start_session' instead) are mentioned, but the context is clear.

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/Scofieldfree/excalidraw-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server