Skip to main content
Glama

generate_diagram

Read-onlyIdempotent

WHEN: generating a visual diagram of D365 table relationships or security chains. Triggers: 'generate diagram', 'diagramme', 'visualize', 'schéma', 'ER diagram', 'entity-relationship', 'relation diagram', 'security diagram', 'show connections'. Generate visual Mermaid diagrams from D365 F&O knowledge base data. Diagrams render directly in Copilot Chat, Cursor, Claude, and markdown viewers. Types: 'er' (entity-relationship diagram for a table and its relations), 'security' (security chain: Role->Duty->Privilege->EntryPoints -- use when you need a VISUAL Mermaid diagram; for the structured text chain with tables of duties/privileges/entry-points use trace_security_chain instead). Note: 'flow' (execution flowchart) is disabled -- static call trees are misleading in D365 due to CoC and event handlers.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
maxRelatedNoOptional: maximum related entities to show (default: 12, max: 20)
methodNameNoNot used -- flow diagrams are disabled.
objectNameYesObject name to diagram, e.g. 'SalesTable', 'SystemAdministrator'
diagramTypeYesDiagram type: 'er' (entity-relationship) or 'security' (security chain). 'flow' is disabled.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / methodName / description
      Previous value: -"Not used — flow diagrams are disabled."New value: +"Not used -- flow diagrams are disabled."
  2. Changed1 schema field changed
    • changedInput schema / properties / methodName / description
      Previous value: -"Not used � flow diagrams are disabled."New value: +"Not used — flow diagrams are disabled."
  3. Changed1 schema field changed
    • changedInput schema / properties / methodName / description
      Previous value: -"Not used — flow diagrams are disabled."New value: +"Not used � flow diagrams are disabled."
  4. First observed

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, and destructiveHint=false, so the safety profile is covered and the description does not contradict it. The description adds context beyond annotations: output is Mermaid diagrams that render directly in Copilot Chat, Cursor, Claude, and markdown viewers, and it explains why 'flow' is intentionally disabled (static call trees are misleading due to CoC and event handlers). This is meaningful behavioral context, though it doesn't discuss failure modes or edge cases.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is on the longer side but front-loads the WHEN clause and triggers, and every subsequent section is functional: rendering environments, per-type semantics, sibling routing, and the disabled-mode rationale. The nine-trigger list is mildly redundant (several are near-synonyms), but it supports reliable surface-form matching for an agent.

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?

With no output schema, the description correctly carries the burden of explaining outputs — Mermaid diagrams and their rendering environments. It covers both active modes, the disabled mode with a reason, parameter intent, and the key sibling alternative. The only minor gap is that it doesn't distinguish the 'er' mode from the sibling get_relation_graph, which could overlap in scope.

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?

Schema description coverage is 100%, so the baseline is 3. The description adds value beyond the schema by expanding diagramType semantics — spelling out the security chain structure (Role->Duty->Privilege->EntryPoints) and the ER scope ('a table and its relations'). It also explains why methodName is inert in practice ('Not used — flow diagrams are disabled'), which the schema states only tersely.

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 uses a precise verb+resource construction — 'Generate visual Mermaid diagrams from D365 F&O knowledge base data' — and enumerates the two active diagram types ('er' for entity-relationships, 'security' for Role->Duty->Privilege->EntryPoints chains) plus the disabled 'flow' type. It explicitly differentiates itself from the sibling trace_security_chain by framing that tool as the structured-text alternative, so an agent can reliably distinguish them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description opens with an explicit WHEN clause and lists nine concrete trigger phrases ('generate diagram', 'diagramme', 'visualize', 'ER diagram', etc.). It states the exact selection condition for the alternative tool — 'for the structured text chain with tables of duties/privileges/entry-points use trace_security_chain instead' — and explicitly disables 'flow' with a rationale. This is exemplary routing guidance that leaves nothing to inference.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.