Skip to main content
Glama

from_ir

Read-onlyIdempotent

Convert diagram JSON IR into Mermaid source code with deterministic validation, rejecting unknown fields or missing IDs.

Instructions

Convert diagram JSON IR to Mermaid source. Deterministic; fails on unknown kinds, missing fields, or undeclared ids. IR: {diagram, target, ...}; see list_ir_targets.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
irYes
targetNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and idempotentHint, and the description adds meaningful behavioral detail: deterministic output and failure on unknown kinds, missing fields, or undeclared ids. This goes beyond the structured annotations and helps the agent predict failure modes.

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 compact and front-loaded, with the core purpose in the first sentence. Every sentence adds value: purpose, determinism/failure behavior, and IR shape/target reference. There is no filler or redundancy.

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 two-parameter tool with no output schema, the description covers purpose, failure behavior, and points to a sibling for targets. However, the target parameter is not clearly explained, and the IR format note is ambiguous about whether 'target' is a field in the IR object or the separate parameter. This leaves meaningful gaps for an agent.

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 provides some IR shape guidance ('IR: {diagram, target, ...}') and points to list_ir_targets, but it does not clearly explain the 'target' parameter's role or the string form of 'ir'. This is partial compensation, not complete.

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 states a specific action and resource: 'Convert diagram JSON IR to Mermaid source.' This clearly identifies what the tool does. However, it does not explicitly differentiate from the sibling tool 'render', so it stops short of full sibling 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?

The description gives useful context about when the tool applies (converting IR to Mermaid) and points to 'list_ir_targets' for target information. It does not explicitly state when to prefer this tool over 'render' or provide exclusion criteria, so usage guidance is implied rather than explicit.

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

Deploy Server

Other Tools