Skip to main content
Glama

Sketchwright

Deterministic Excalidraw diagram agent, layout engine, and Model Context Protocol (MCP) server.

Status: Beta (v0.1.0). Fully functional MCP server, standalone Python engine, and CLI; production-ready for automated diagram generation.

CI Python Version MCP Specification License: MIT Version


Quick Facts

Dimension

Specification

Evidence / Details

Package Name

sketchwright

Defined in pyproject.toml

Runtime Requirement

Python >=3.12

Tested on Python 3.12 (ubuntu-latest, windows-latest)

Protocol Support

Model Context Protocol (MCP) 2.3.0

6 tools, 3 resources, 3 prompts over stdio

Output Formats

.excalidraw (v2 JSON schema), .svg (standalone)

Verified reciprocal arrow bindings & multiline text containers

Layout Algorithms

Layered (Sugiyama), Grid, Tree

Deterministic cycle breaking, 4 directions (LR, RL, TB, BT)

External Dependencies

Zero external LLM or cloud services required

Pure local layout and scene serialization

Primary Entry Points

sketchwright CLI, sketchwright Python module

Module execution via python -m sketchwright

License

MIT License

Verified in LICENSE


Related MCP server: excalidraw-diagram-agent

Overview

Sketchwright is a developer-oriented Model Context Protocol (MCP) diagram agent and standalone Python engine. It translates structured diagram specifications and lightweight textual DSL into deterministic, visually balanced, and fully editable Excalidraw-compatible scenes (.excalidraw) as well as standalone SVG.

A language model in an MCP-compatible host (such as Claude Desktop, VS Code, or Antigravity) decides what the diagram should represent; Sketchwright's deterministic engine decides how that specification is validated, positioned, routed, and serialized.

Core Product Principle

Structured intent in; validated, editable diagram scene out.

Core layout, validation, and generation capabilities require no paid model APIs, cloud accounts, API keys, or external LLM service.


Quick Start

Generate a complete, editable Excalidraw diagram scene in fewer than five steps:

In POSIX Shells (Linux / macOS)

# 1. Clone the repository
git clone https://github.com/manoj-025/sketchwright-mcp.git
cd sketchwright-mcp

# 2. Install dependencies with uv
uv sync --all-groups

# 3. Generate an Excalidraw diagram from the sample architecture
uv run sketchwright generate examples/architecture.json -o architecture.excalidraw --overwrite

In PowerShell (Windows)

# 1. Clone the repository
git clone https://github.com/manoj-025/sketchwright-mcp.git
Set-Location sketchwright-mcp

# 2. Install dependencies with uv
uv sync --all-groups

# 3. Generate an Excalidraw diagram from the sample architecture
uv run sketchwright generate examples/architecture.json -o architecture.excalidraw --overwrite

Expected result:

Generated diagram written to: architecture.excalidraw

You can drag and drop architecture.excalidraw directly into Excalidraw.com or open it inside the Excalidraw VS Code extension.


Features

  • Model Context Protocol (MCP 2.x) Integration: Exposes 6 dedicated tools (sketchwright_create_diagram, sketchwright_update_diagram, sketchwright_validate_diagram, sketchwright_layout_diagram, sketchwright_export_diagram, sketchwright_get_capabilities), 3 resources, and 3 prompt templates over standard input/output (stdio).

  • Strict Stdio Discipline: Guarantees that MCP JSON-RPC protocol framing is never polluted by application logs; all diagnostics are routed strictly to sys.stderr.

  • Deterministic Layered Layout (Sugiyama Engine):

    • Cycle detection and feedback edge set condensation to guarantee termination on cyclic graphs.

    • Longest-path rank assignment and barycentric crossing reduction.

    • Multi-directional flow: Left-to-Right (LR), Right-to-Left (RL), Top-to-Bottom (TB), and Bottom-to-Top (BT).

    • Graceful handling of disconnected clusters, self-loops, and parallel edges.

  • True Excalidraw v2 Schema & Reciprocal Bindings:

    • Validates and generates native startBinding, endBinding, container boundElements, and centered bound text containers.

    • Fully editable in Excalidraw.com or the Excalidraw VS Code / Obsidian extensions.

  • Visual Grouping & Boundaries: Declared groups serialize with member container tracking and dashed boundary rectangles.

  • Incremental Diagram Mutation: Iteratively patch diagrams (add/remove nodes, prune connected edges, update labels) via stable ID matching with ambiguous-match fallback protection.

  • Standalone CLI & Public Python API: Complete functionality accessible as a CLI utility or embedded library without requiring an active MCP host.

  • Defensive Resource Limits: Enforces input payload limits (1 MB), node counts (500), edge counts (1000), label lengths (256 chars), and path traversal boundary checks.

  • Clean SVG Export: Standalone valid SVG renderer with <tspan> multiline text wrapping, arrow markers, and XML escaping.


Supported Diagram Types

  • Software & Cloud Architecture: Multi-tier web applications, client/server models, API gateways, database clusters.

  • Microservices & Data-Flow Topologies: Service meshes, message brokers, caching tiers, storage clusters.

  • Decision Trees & Process Flowcharts: Branching logic, validation flows, decision nodes.

  • State-Transition Diagrams & Cyclic Networks: Finite state machines, feedback loops, retry circuits.

  • CI/CD Pipelines & Roadmaps: Build, test, security audit, and deployment stages.

Supported Shapes

Shape Identifier

Visual Representation

Common Use Case

rectangle

Standard sharp box

Services, modules, UI components, microservices

rounded_rectangle

Rounded container

Queues, consumers, workers, terminal steps

ellipse

Elliptical container

Start/stop states, events, terminal nodes

diamond

Rhombus / Diamond

Decision conditions, branching logic

cylinder

Storage drum

Databases, caches, file storage, data lakes

text

Frameless text block

Standalone annotations, notes, titles


Prerequisites & Installation

Prerequisites

  • Python: 3.12 or newer.

  • Package Manager: uv (recommended) or standard pip.

  • Supported Operating Systems: Windows, Linux, macOS.

# Clone the repository
git clone https://github.com/manoj-025/sketchwright-mcp.git
cd sketchwright-mcp

# Install dependencies into isolated virtual environment
uv sync --all-groups

Installation via pip

# Clone and install in editable mode with development dependencies
git clone https://github.com/manoj-025/sketchwright-mcp.git
cd sketchwright-mcp
python -m venv .venv
# Activate environment (POSIX: source .venv/bin/activate | Windows: .venv\Scripts\Activate.ps1)
pip install -e ".[dev]"

Public Python API

Sketchwright exports a fully typed public Python API:

from sketchwright import (
    generate_diagram,
    validate_diagram,
    layout_diagram,
    export_diagram,
    update_diagram,
    get_capabilities,
)

spec = {
    "schema_version": "1.0",
    "title": "Cloud Microservice Architecture",
    "layout": {"algorithm": "layered", "direction": "LR"},
    "nodes": [
        {"id": "gateway", "label": "API Gateway", "shape": "rectangle"},
        {"id": "auth", "label": "Auth Service", "shape": "rounded_rectangle"},
        {"id": "db", "label": "User Store", "shape": "cylinder"},
    ],
    "edges": [
        {"id": "e1", "source": "gateway", "target": "auth", "label": "JWT Verify"},
        {"id": "e2", "source": "auth", "target": "db", "label": "SQL Query"},
    ],
}

# 1. Generate full Excalidraw scene
result = generate_diagram(spec, output_path="architecture.excalidraw", overwrite=True)

print(f"Valid Scene: {result.validation.is_valid}")
print(f"Canvas Size: {result.laid_out.canvas_rect.width} x {result.laid_out.canvas_rect.height}")
print(f"Total Elements: {len(result.scene['elements'])}")

Expected output:

Valid Scene: True
Canvas Size: 853.0 x 310.0
Total Elements: 7

See examples/hello_world.py for a complete standalone runnable script.


Command-Line Interface

Sketchwright provides the sketchwright executable (and module invocation via python -m sketchwright).

Exit Code Policy

Exit Code

Classification

Description

0

Success

Command completed successfully.

2

User / Validation Error

Schema validation failure, syntax error, or invalid CLI flag.

1

Internal / Filesystem Error

Unexpected runtime exception or filesystem access error.

Common Commands

# Inspect version and CLI help
uv run sketchwright --version
uv run sketchwright --help

# Query runtime capabilities and limits
uv run sketchwright capabilities

# Validate a diagram specification or Excalidraw scene
uv run sketchwright validate examples/architecture.json
uv run sketchwright validate my_diagram.excalidraw

# Generate an Excalidraw scene file (.excalidraw)
uv run sketchwright generate examples/architecture.json -o web_arch.excalidraw --overwrite

# Generate an SVG file (.svg)
uv run sketchwright generate examples/flowchart.json -o flowchart.svg --format svg --overwrite

# Compute raw geometry and routing coordinates without writing a scene
uv run sketchwright layout examples/architecture.json --direction LR

# Launch the MCP server over standard input/output
uv run sketchwright mcp

Sample output from uv run sketchwright validate examples/architecture.json:

Validation result for architecture.json: VALID

MCP Server Integration

To register Sketchwright in an MCP client (such as Claude Desktop, VS Code, or Google Antigravity), add the following entry to your host's MCP configuration file (e.g., mcpServers object):

{
  "mcpServers": {
    "sketchwright": {
      "command": "uv",
      "args": [
        "run",
        "--directory",
        "<PATH_TO_SKETCHWRIGHT_MCP>",
        "sketchwright",
        "mcp"
      ]
    }
  }
}

Note: Replace <PATH_TO_SKETCHWRIGHT_MCP> with the absolute path to your cloned sketchwright-mcp directory (use forward slashes / on all platforms).

Registered MCP Tools

Tool Name

Purpose

Key Parameters

sketchwright_create_diagram

Generates complete Excalidraw scene JSON from specification or text DSL.

specification, text_dsl, layout_overrides, output_path, overwrite

sketchwright_update_diagram

Incrementally mutates an existing specification (add/remove nodes, edges) and regenerates scene.

specification, patch, generate_scene, output_path, overwrite

sketchwright_validate_diagram

Validates a diagram specification or Excalidraw scene for schema conformance and bindings.

specification, scene

sketchwright_layout_diagram

Computes deterministic node coordinates, canvas bounds, and edge routes without serialization.

specification, algorithm, direction

sketchwright_export_diagram

Exports a diagram specification or scene to .excalidraw or .svg.

specification, scene, format, output_path, overwrite

sketchwright_get_capabilities

Returns machine-readable report of supported shapes, algorithms, directions, and limits.

None

Registered MCP Resources & Prompts

  • Resources:

    • schema://v1.0: Canonical JSON Schema for DiagramSpec.

    • capabilities://manifest: Runtime capability and limits manifest.

    • guide://usage: Comprehensive prompt engineering guide and diagram patterns.

  • Prompts:

    • architecture_diagram: Prompt guide for structured software architecture requests.

    • flowchart_diagram: Prompt guide for workflow/decision flowcharts.

    • dependency_graph: Prompt guide for software/package dependency graphs.


Configuration

Sketchwright works out of the box with zero external configuration. Settings can be customized via environment variables (or a local .env file; see .env.example).

Precedence Order

  1. Explicit API / CLI Argument / Tool Parameter (highest precedence)

  2. Diagram Specification layout block

  3. Environment Variables (SKETCHWRIGHT_*)

  4. Internal Default Settings (lowest precedence)

Environment Variables

Variable

Type

Default

Description

Secret

SKETCHWRIGHT_LOG_LEVEL

string

INFO

Logging level (DEBUG, INFO, WARNING, ERROR).

No

SKETCHWRIGHT_DEFAULT_ALGORITHM

string

layered

Default layout algorithm (layered, grid, tree).

No

SKETCHWRIGHT_DEFAULT_DIRECTION

string

LR

Default layout direction (LR, RL, TB, BT).

No

SKETCHWRIGHT_NODE_SPACING

float

80.0

Intra-rank spacing between adjacent nodes in pixels.

No

SKETCHWRIGHT_RANK_SPACING

float

120.0

Distance between consecutive ranks/layers in pixels.

No

SKETCHWRIGHT_PADDING

float

40.0

Outer canvas margin around diagram bounds in pixels.

No

SKETCHWRIGHT_MAX_INPUT_BYTES

int

1048576

Maximum allowed input payload size in bytes (1 MB).

No

SKETCHWRIGHT_MAX_NODES

int

500

Maximum number of nodes permitted per diagram.

No

SKETCHWRIGHT_MAX_EDGES

int

1000

Maximum number of edges permitted per diagram.

No

SKETCHWRIGHT_MAX_LABEL_LENGTH

int

256

Maximum permitted characters for any label.

No

SKETCHWRIGHT_ALLOWED_DIR

string

unset

Path boundary: restricts file outputs to an authorized root.

No


Canonical Specification Format

{
  "schema_version": "1.0",
  "title": "Example Web Architecture",
  "layout": {
    "algorithm": "layered",
    "direction": "LR",
    "node_spacing": 80.0,
    "rank_spacing": 120.0,
    "padding": 40.0
  },
  "style": {
    "theme": "light",
    "font_size": 18,
    "stroke_width": 2
  },
  "nodes": [
    { "id": "browser", "label": "Web Browser", "shape": "rectangle" },
    { "id": "api", "label": "API Server", "shape": "rounded_rectangle" },
    { "id": "database", "label": "Database", "shape": "cylinder" }
  ],
  "edges": [
    { "id": "e1", "source": "browser", "target": "api", "label": "HTTPS", "kind": "directed" },
    { "id": "e2", "source": "api", "target": "database", "label": "SQL", "kind": "directed" }
  ],
  "groups": [
    { "id": "backend", "label": "Backend Tier", "node_ids": ["api", "database"] }
  ],
  "options": {
    "deterministic": true
  }
}

See docs/architecture/Schema.md for detailed schema specifications.


Project Structure

Derived from verified repository source files:

sketchwright-mcp/
├── .github/workflows/ci.yml       # Cross-platform GitHub Actions CI (Linux, Windows)
├── docs/                          # Comprehensive technical documentation suite
│   ├── README.md                  # Documentation suite index & master navigation map
│   ├── product/                   # PRD, user journeys, app flows, and terminology glossary
│   │   ├── PRD.md                 # Product Requirements Document
│   │   ├── AppFlow.md             # State inventory, CLI trees & MCP protocol lifecycles
│   │   └── Glossary.md            # Canonical terminology & domain dictionary
│   ├── architecture/              # Technical specs, design tokens, schemas, APIs & ADRs
│   │   ├── TechSpec.md            # System design, layout pipeline & C4 architecture
│   │   ├── Design.md              # Visual identity & Excalidraw styling tokens
│   │   ├── Schema.md              # Canonical specification & Pydantic data models
│   │   ├── API.md                 # FastMCP tool signatures & CLI contracts
│   │   └── decisions/             # Architecture Decision Records (ADRs)
│   ├── guides/                    # Operational runbooks, configurations & user handbooks
│   │   ├── configuration.md       # Environment variables & tuning limits
│   │   ├── Deployment.md          # Build, release, PyPI publishing & client configs
│   │   ├── troubleshooting.md     # Diagnostic procedures & error resolutions
│   │   └── SecurityAndCompliance.md # STRIDE threat model & security boundaries
│   └── development/               # Engineering standards, testing & code quality
│       ├── Rules.md               # Engineering guidelines & code quality standards
│       └── testing.md             # Test strategy, critical test cases & coverage
├── examples/                      # Runnable samples and test fixtures
│   ├── architecture.json          # Multi-tier microservice architecture spec
│   ├── flowchart.json             # Branching process flowchart spec
│   ├── hello_world.py             # Public Python API usage example
│   └── mcp-client-config.example.json # Generic MCP client host config
├── src/sketchwright/              # Core application package
│   ├── engine/                    # Diagram generator and update engine
│   ├── excalidraw/                # Excalidraw serializer, validator, and SVG export
│   ├── layout/                    # Sugiyama layout, geometry, and stepped routing
│   ├── mcp/                       # MCP 2.x server, tools, resources, and prompts
│   ├── models/                    # Pydantic v2 schemas and validation models
│   ├── parser/                    # Structured JSON and text DSL parsers
│   ├── cli.py                     # Command-line interface subcommands
│   ├── config.py                  # Settings and defensive limit management
│   └── logging_config.py          # Strict stdio/stderr routing
├── tests/                         # Multi-level automated test suite (91 tests)
│   ├── contract/                  # MCP protocol and tool discovery tests
│   ├── e2e/                       # Subprocess stdio integration tests
│   ├── integration/               # Pipeline execution and determinism tests
│   └── unit/                      # Unit tests for CLI, models, layout, and export
├── .env.example                   # Environment variable template
├── CHANGELOG.md                   # Version release notes (Keep a Changelog)
├── CONTRIBUTING.md                # Contribution guidelines and setup steps
├── LICENSE                        # MIT License
├── pyproject.toml                 # Package manifest and tool configuration
└── SECURITY.md                    # Vulnerability reporting and security architecture

Testing & Verification

Sketchwright includes an automated test suite across unit, integration, contract, and end-to-end levels:

# Run the complete test suite (91 tests)
uv run pytest -v

# Run code style and formatting checks
uv run ruff check .
uv run ruff format --check .

# Run static type checking with Mypy in strict mode
uv run mypy src

# Validate package build
uv build

Observed test status: 91 passed in 4.19s (100% pass rate).


Known Limitations

  1. Approximate Font Metrics: To avoid heavy binary font rendering dependencies (such as HarfBuzz or FreeType), Sketchwright computes bounding boxes using deterministic character width heuristics. Browser rendering in Excalidraw may show minor visual variations depending on locally installed fallback fonts.

  2. Simplified Edge Routing: Orthogonal stepped routing avoids node interiors and handles backward loops; complex multi-hop obstacle avoidance routes around rank boundaries rather than sub-pixel collision routing.

  3. Manual Host Configuration: MCP client hosts (Claude Desktop, VS Code, Antigravity) require manual registration by appending the server configuration block to their respective configuration files.


Security Architecture

  • Strict Resource Bounds: Limits input payloads to 1 MB (SKETCHWRIGHT_MAX_INPUT_BYTES), 500 nodes (SKETCHWRIGHT_MAX_NODES), 1000 edges (SKETCHWRIGHT_MAX_EDGES), and 256 characters per label (SKETCHWRIGHT_MAX_LABEL_LENGTH).

  • Filesystem Boundary Isolation: File writes are executed atomically using temporary files followed by atomic replacement. Traversal sequences (../) are detected and rejected. Output directory restrictions can be enforced via SKETCHWRIGHT_ALLOWED_DIR.

  • Zero Dynamic Code Execution: The codebase contains zero calls to eval, exec, or dynamic module loading.

  • Protocol Isolation: Standard output (stdout) is strictly reserved for MCP JSON-RPC protocol messages; all application logs and diagnostics are directed exclusively to stderr.

For vulnerability disclosure procedures, see SECURITY.md.


Contributing

Contributions are welcome. Please read CONTRIBUTING.md for workflow instructions, code standards, and local quality check commands.

All pull requests must pass formatting (ruff format), linting (ruff check), static type analysis (mypy src), and the full test suite (pytest -v).


License

Distributed under the MIT License. See LICENSE for the full text.

Copyright (c) 2026 Sketchwright Contributors.

Available Tools

6 tools
sketchwright_create_diagramC

Generate an Excalidraw-compatible diagram scene JSON from a structured specification or DSL.

NameRequiredDescriptionDefault
text_dslNo
overwriteNo
output_pathNo
specificationNo
layout_overridesNo

Output Schema

NameRequiredDescription

No output parameters

TDQS

C2.7/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It does not explain whether files are written to disk via output_path, what overwrite=true does, whether generation is non-destructive by default, or any side effects, permissions, or error behavior.

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 single sentence is front-loaded and free of filler. It is efficient, though its brevity contributes to the under-specification seen in other dimensions.

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?

For a five-parameter generation tool with no annotations and an output schema, this description is too thin. It omits input-mode selection rules, file output behavior, overwrite semantics, and layout override behavior, leaving an agent without enough context to call it safely and correctly.

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%, and the description only vaguely maps to two of the five parameters by mentioning a structured specification or DSL. It adds no meaning for overwrite, output_path, or layout_overrides, leaving most parameters undocumented in both schema and description.

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 names a specific verb and resource: generating an Excalidraw-compatible diagram scene JSON from a structured specification or DSL. That is clear enough to distinguish it from layout/export/update siblings in broad terms, though it does not explicitly contrast those alternatives.

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?

It implies two input modes, structured specification or text DSL, but gives no guidance on when to use this tool versus sketchwright_layout_diagram, sketchwright_export_diagram, sketchwright_validate_diagram, or sketchwright_update_diagram. No prerequisites or exclusions are stated.

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

sketchwright_export_diagramC

Export a diagram specification or Excalidraw scene to .excalidraw JSON or standalone .svg.

NameRequiredDescriptionDefault
sceneNo
formatNoexcalidraw
overwriteNo
output_pathNo
specificationNo

Output Schema

NameRequiredDescription

No output parameters

TDQS

C2.7/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden. It mentions formats but does not disclose that this likely writes to disk, how output_path and overwrite behave, what happens if the file exists, or whether either scene or specification must be supplied.

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 description is a single front-loaded sentence with no wasted words, and the verb and output formats come early. It is efficient, though its brevity contributes to gaps 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?

For a five-parameter export tool with no annotations and 0% schema description coverage, the description is too thin. It omits input selection rules, overwrite semantics, output_path behavior, and the exact allowed format values.

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%, so the description must compensate. It loosely maps 'specification'/'scene' and the two formats, but says nothing about the overwrite flag, output_path, defaults, or the relationship between the five parameters.

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 uses a specific verb ('Export') and resource ('diagram specification or Excalidraw scene') and names the output formats (.excalidraw JSON or .svg). It distinguishes exporting from create/update siblings by implication, but does not explicitly contrast with them.

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?

It states what can be exported but gives no guidance on when to choose export over siblings like sketchwright_validate_diagram or sketchwright_create_diagram. It also does not clarify whether scene or specification is required or how they relate.

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

sketchwright_get_capabilitiesA

Discover Sketchwright's supported shapes, layout algorithms, directions, and resource limits.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription

No output parameters

TDQS

A3.7/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. 'Discover' strongly implies a read-only lookup and the listed categories clarify what is returned, but it does not explicitly state side-effect safety, auth requirements, or whether results are cached/static.

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?

A single front-loaded sentence with no redundant phrasing. Every listed capability category adds information.

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?

For a simple zero-parameter capability-discovery tool with an output schema, the description is nearly complete: it enumerates the capability categories an agent will receive. The main gap is that it does not say how this discovery step should feed into the sibling diagram tools.

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?

The tool takes zero parameters, so there is no parameter semantics to explain; the baseline for a zero-parameter tool is 4.

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 ('Discover') and concrete resources (shapes, layout algorithms, directions, resource limits). It is clearly distinct in kind from the diagram-manipulation siblings, though it does not explicitly name or contrast with them.

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

Usage Guidelines3/5

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

Usage is only implied by 'Discover' — an agent can infer this is a metadata lookup, but the description does not say when to call it (e.g., before create/layout), when not to, or how it relates to the sibling tools.

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

sketchwright_layout_diagramC

Calculate deterministic node positions, bounding boxes, and edge routes for a diagram.

NameRequiredDescriptionDefault
algorithmNo
directionNo
specificationYes

Output Schema

NameRequiredDescription

No output parameters

TDQS

C2.9/5.0
Behavior3/5

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

With no annotations, the description carries the burden of behavioral disclosure. It helpfully states that the layout is deterministic and enumerates the computed outputs, but it does not clarify whether the operation mutates stored state, requires permissions, or has side effects.

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 a single front-loaded sentence with no filler. Every phrase contributes to identifying the operation and its computed outputs.

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?

An output schema exists, so return values need not be explained in detail. However, the input schema has a nested specification object and undocumented optional fields, and the description does not provide enough context for an agent to invoke the tool correctly.

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

Parameters1/5

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

Schema description coverage is 0%, and the description does not mention any of the three parameters. It says nothing about the required specification object, the optional algorithm parameter, or the optional direction parameter.

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 gives a specific verb, "Calculate," and a specific resource, node positions, bounding boxes, and edge routes for a diagram. It clearly identifies the layout function, though it does not explicitly distinguish itself from siblings such as validate, create, or export.

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?

The description implies that the tool computes diagram layout, but it gives no explicit guidance on when to use it versus create, update, validate, or export. It also does not state prerequisites, ordering, or whether a diagram must already exist.

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

sketchwright_update_diagramC

Incrementally update an existing diagram specification (add/remove/rename nodes, add/remove edges) and regenerate scene.

NameRequiredDescriptionDefault
patchYes
overwriteNo
output_pathNo
specificationYes
generate_sceneNo

Output Schema

NameRequiredDescription

No output parameters

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden. Beyond stating that it updates incrementally and regenerates the scene, it says nothing about how patches are applied (atomic vs partial failure), what 'overwrite' destroys, whether output_path overwrites existing files, or whether permissions/validation are required before a mutation.

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?

One front-loaded sentence with the operation and its supported edits packed into a parenthetical; there is no filler. It is efficient, though the brevity contributes to the specification gaps noted 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?

For a 5-parameter mutation tool with nested object schemas, no annotations, and 0% schema description coverage, a single sentence is inadequate. The output schema covers return values, but patch format, overwrite/regeneration semantics, and output_path behavior are all missing.

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% and two required parameters are free-form nested objects, so the description must compensate. The parenthetical clarifies patch operations, which helps, but 'overwrite', 'output_path', and 'generate_scene' get no explanation at all, leaving three of five parameters opaque.

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?

It states a specific verb and resource ('Incrementally update an existing diagram specification') and enumerates the operations it supports (add/remove/rename nodes, add/remove edges), which implicitly separates it from sketchwright_create_diagram. However, it never names a sibling or explicitly contrasts create-vs-update, so it falls short of full differentiation.

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

Usage Guidelines3/5

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

'Incrementally update an existing diagram' implies you should use this rather than recreating a diagram, but no when-to-use, when-not-to-use, or alternative routing (e.g. validate before/after, or layout after) is stated. The distinction from create_diagram is inferable but not spelled out.

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

sketchwright_validate_diagramB

Validate a diagram specification or an Excalidraw scene JSON for schema conformance and bindings.

NameRequiredDescriptionDefault
sceneNo
specificationNo

Output Schema

NameRequiredDescription

No output parameters

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden. It states that validation covers schema conformance and bindings, but it does not disclose whether the operation is read-only, what happens on invalid input, whether errors are thrown or returned, or what side effects, if any, occur. Those gaps matter for an agent deciding how to handle the result.

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 a single front-loaded sentence that states the action, the inputs, and the validation criteria without any filler. Every element earns its place and the agent can read the core purpose immediately.

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?

An output schema exists, so the description does not need to explain return values. However, with no annotations and 0% schema description coverage, the description should clarify the relationship between the two optional parameters, such as whether one is required and how to choose between them. It is adequate but leaves important invocation details implicit.

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 description coverage is 0%, so the description must compensate. It does add meaning by mapping the two schema properties to 'diagram specification' and 'Excalidraw scene JSON', which is more informative than the bare 'specification' and 'scene' titles. However, it does not clarify that both parameters are optional, whether at least one should be provided, or whether they are mutually exclusive.

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 uses a specific verb, 'Validate', and names the two resource forms it handles: a diagram specification and an Excalidraw scene JSON. It also specifies what is checked, 'schema conformance and bindings', so the tool's function is clear, though it does not explicitly differentiate itself from sibling tools such as create, update, or layout.

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?

The description gives no explicit guidance on when to use this tool versus siblings like sketchwright_create_diagram, sketchwright_update_diagram, or sketchwright_layout_diagram. It implies validation of a spec or scene but does not state when validation should be performed, whether it is a prerequisite for another operation, or when not to use it.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 6 tool updatesv0.1.0
    • First observedsketchwright_create_diagram
    • First observedsketchwright_export_diagram
    • First observedsketchwright_get_capabilities
    • First observedsketchwright_layout_diagram
    • First observedsketchwright_update_diagram
    • First observedsketchwright_validate_diagram

TDQS

A3.5/5.0

Scored across 6 tools

Disambiguation5/5

Each tool maps to a distinct stage in the diagram lifecycle: create, layout, update, validate, export, and capability discovery. The boundaries between create and layout are clarified by their descriptions, so an agent can reliably choose the right operation.

Naming Consistency5/5

All tool names use the same sketchwright_ prefix followed by a consistent verb_noun pattern in snake_case. There are no mixed conventions or vague standalone verbs.

Tool Count5/5

Six tools is well-scoped for a diagram generation server, covering creation, layout, updating, validation, export, and discovery without redundancy. Each tool has a clear, non-overlapping role.

Completeness4/5

The surface covers the core diagram lifecycle from specification creation through validation and export, including incremental updates and capability discovery. Minor gaps exist around persisted diagram management (e.g., listing or deleting saved diagrams), but these are not essential for the stated purpose.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    Generates Excalidraw architecture diagrams with support for 60+ components including GCP, Kafka, and AI/Agentic shapes. Provides MCP tools for creating, modifying, and converting diagrams from structured input or Mermaid syntax.
    4
    1
    MIT
  • F
    license
    Not graded
    quality
    A
    maintenance
    Enables AI assistants to turn plain-language descriptions of systems, flows, and data into 25 kinds of fully laid-out, hand-drawn Excalidraw diagrams — architecture, sequence, ER, swimlane, Gantt, charts and more — with auto-styling for 50+ technologies and revision in natural language. Runs fully offline, exports to SVG and PNG without a browser or Node.js, and can optionally persist the architecture as a queryable knowledge graph.
    -
  • F
    license
    Not graded
    quality
    A
    maintenance
    Enables AI assistants to turn natural-language descriptions of systems, flows, and data into 25 types of hand-drawn Excalidraw diagrams with automatic layout and architecture-aware styling, then revise them conversationally and export to SVG or PNG. It can also persist a system as a version-controlled, queryable architecture knowledge graph, running fully offline without API keys.
    -