Skip to main content
Glama

coras_read_diagram

Read a .dgx file to output its structured spec and CORAS text notation, with optional rendering for inspection or rewriting.

Instructions

Read an existing .dgx file and return it as a structured spec and as the CORAS text notation, so it can be inspected or rewritten. Optionally renders it so you can see the current state.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesThe .dgx file to read.
scaleNo
formatNoWhat to return, default 'both'.
previewNoAlso render it as an image.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

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 burden. It discloses that the tool reads a file and returns representations (structured spec and text notation) and optionally renders it. However, it does not explicitly state that it performs no modifications, what happens with missing or invalid files, or how scale affects the render. These gaps limit transparency.

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 two sentences with no wasted words. The primary action and output are front-loaded, and the every clause earns its place (read behavior, output formats, use case, optional render).

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?

For a read tool with no annotations or output schema, the description covers the core functionality but leaves scale completely undocumented (no schema description either). It also does not explain the precise return structure or error handling, which an agent would need for robust use. The tool's complexity is moderate, so this is adequate but not complete.

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 75%, with scale missing a description. The description's phrases 'structured spec and CORAS text notation' map to the format parameter's default 'both', and 'Optionally renders it' maps to preview, adding some semantic value. However, it does not clarify scale or parameter interactions, so it does not fully compensate for the schema gap.

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 the tool's verb ('Read'), resource ('an existing .dgx file'), and output ('structured spec and as the CORAS text notation'). It also indicates the purpose ('so it can be inspected or rewritten') and an optional rendering behavior. This distinguishes it from siblings like coras_create_diagram (creation) and coras_render_diagram (rendering alone).

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?

The description implies usage for inspecting or rewriting diagrams, but does not explicitly state when to choose this tool over alternatives such as coras_render_diagram or coras_open_editor. There are no when-not-to-use conditions or references to sibling tools, leaving the decision partly to inference.

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