Skip to main content
Glama

explain_diagram

Explains how a single PlantUML diagram is parsed line by line, returning source, human-readable explanation, and line number so you can understand diagram syntax.

Instructions

Explains how a single PlantUML diagram is parsed, line by line. Returns a JSON array of objects, each containing: 'input' (the source line(s) that produced the explanation), 'explain' (a human-readable explanation), and 'line' (1-based line number, when available).

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": {
      "source": "<source>"
    },
    "name": "explain_diagram"
  }
}

Input Schema

NameRequiredDescriptionDefault
sourceYesThe PlantUML source to explain, including @start.../@end... (a single diagram)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.2026.10
    • removedInput schema / additionalProperties
      Removed value: -false
  2. First observedv0.2.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full burden and does disclose the return shape in useful detail (array of input/explain/line objects). However, it says nothing about failure behavior on unparseable source, whether the call is strictly read-only, or any limits on diagram size.

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?

Two sentences, front-loaded with the action and followed by the return contract; every clause is informative and nothing is repeated from the schema.

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 one-parameter read-only tool with no output schema, the description supplies the essential return-value structure that structured fields omit. Only edge-case behavior (invalid input, multi-diagram sources) is left unaddressed.

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% and the schema already documents the single 'source' parameter, including the @start/@end requirement. The description adds no syntax or formatting detail beyond what the schema provides, so the baseline 3 applies.

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 and resource: 'Explains how a single PlantUML diagram is parsed, line by line.' That clearly separates it from render_diagram and check_syntax by intent, though it never names those siblings to reinforce the distinction.

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 implied by 'a single diagram' and by the schema note that source must include @start.../@end... . There is no explicit when-to-use or when-not-to-use guidance, and no pointer to check_syntax for validation versus explanation.

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