Skip to main content
Glama

List D2 Layout Engines

d2_list_layouts
Read-onlyIdempotent

List available D2 layout engines with feature support to select the right one for diagram rendering.

Instructions

List available D2 layout engines with descriptions and feature support.

Use layout names with d2_render's layout parameter. No d2 binary required — layout list is built-in.

Args: (none)

Returns: JSON object: { "layouts": [{ "name": string, "description": string, "features": string[] // Supported features }] }

Layout guidance:

  • dagre: Default. Fast, good for most flowcharts and architecture diagrams.

  • elk: Better for complex graphs, supports ancestor-to-descendant connections, width/height on containers. Slower than dagre.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.0.0

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint, idempotentHint, destructiveHint), the description discloses that the layout list is built-in and requires no d2 binary, and it provides the exact JSON return structure. It also gives behavioral context for layout engines (dagre default, elk trade-offs). No contradiction with annotations.

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 well-structured with a clear opening statement, usage note, args section, return schema, and layout guidance. Every section serves a purpose and the most important information is front-loaded. The layout guidance is extra but relevant to selecting a layout.

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?

For a parameter-free, read-only listing tool with no output schema, the description is remarkably complete. It covers what the tool does, the exact return format, how to apply the results, and practical details like the absence of a d2 binary requirement.

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 has zero parameters, and the input schema already declares an empty properties object with additionalProperties false. The description confirms 'Args: (none)' and therefore adds no misleading or ambiguous parameter information. Baseline for 0 params is 4.

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 first sentence, 'List available D2 layout engines with descriptions and feature support,' uses a specific verb and resource, immediately distinguishing it from siblings like d2_list_themes and d2_render. The additional note about using layout names with d2_render's layout parameter further reinforces its role.

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?

The description explicitly tells the agent to use the returned layout names with d2_render's layout parameter, which is actionable guidance. It also notes that no d2 binary is required. However, it does not explicitly name alternatives or state when not to use this tool, though that is less critical for a simple listing tool.

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

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/ItsJooL/d2-mcp'

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