Skip to main content
Glama

List D2 Themes

d2_list_themes
Read-onlyIdempotent

List all available D2 diagram themes by ID and name, split into light and dark categories, to select a theme for rendering. The built-in list requires no local d2 binary.

Instructions

List all available D2 diagram themes with their IDs and names.

Use theme IDs with d2_render's theme_id parameter. No d2 binary required — theme list is built-in.

Args: (none)

Returns: JSON object: { "light": [{ "id": number, "name": string }], "dark": [{ "id": number, "name": string }] }

Notable themes:

  • 0: Neutral Default (clean, professional — good default)

  • 3: Flagship Terrastruct (vibrant, colorful)

  • 8: Colorblind Clear (accessible palette)

  • 200: Dark Mauve (dark mode)

  • 300: Terminal (monospace, dot-fill containers, uppercase labels)

  • 302: Origami (paper-like aesthetic)

  • 303: C4 (C4 architecture diagram style)

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.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, openWorldHint=false, and destructiveHint=false. The description adds meaningful context beyond these by specifying the exact return structure and the fact that the theme list is built-in, plus notable theme examples that help the agent select appropriate values.

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 and front-loaded with purpose and usage, followed by a compact return format and a useful list of notable themes. Each section earns its place; the notable themes list adds practical value for choosing theme IDs despite being slightly longer than a minimal description.

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?

With no input parameters and annotations already covering safety and idempotency, the description fully compensates for the lack of an output schema by documenting the exact JSON return shape. It also provides enough theme context for the agent to use the tool correctly and connect its output to d2_render.

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, so parameter semantics are mostly non-applicable. The description explicitly says 'Args: (none)' and the input schema confirms an empty properties object, which is fully sufficient. The baseline for zero parameters 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 description clearly states a specific action ('List all available D2 diagram themes') with a specific resource and expected content (IDs and names). It is easily distinguished from sibling tools like d2_render and d2_list_layouts because it uniquely refers to theme listing and provides the built-in theme ID inventory.

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 says theme IDs are meant to be used with d2_render's theme_id parameter, which gives the agent clear downstream usage context. It also notes that no d2 binary is required, clarifying the environmental prerequisite, but it does not explicitly define when-not-to-use or compare against a direct alternative.

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