Skip to main content
Glama

Workflow to mermaid

servicenow_workflow_to_mermaid

Generates Mermaid diagrams mapping ServiceNow flow and subflow relationships from root flow names or sys_ids, with depth control and optional markdown file export.

Instructions

Generates a Mermaid diagram representing the relationships between ServiceNow flows and subflows.

:param flow_identifiers: List of flow names or sys_ids to use as roots. If None, fetches all active flows. :param max_depth: Maximum recursion depth for subflow discovery. :param save_to_file: Whether to save the result to a markdown file. :param output_dir: Directory to save the report. Defaults to project/servicenow_flow_reports. :param mermaid_name: Base name for the generated file (used if destination_file is not provided). :param segment_by_root: If True, generates a separate diagram for each root flow. :param destination_file: Explicit full path to save the markdown report.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
max_depthNo
output_dirNo
mermaid_nameNoservicenow_workflow
save_to_fileNo
segment_by_rootNo
destination_fileNo
flow_identifiersNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.4.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations cover the safety profile (readOnlyHint=false, destructiveHint=false, openWorldHint=true). The description adds real context beyond them: it writes a markdown file to disk, the default output directory (project/servicenow_flow_reports), and the fallback naming logic. It stops short of stating auth/instance requirements or what is returned when save_to_file=false.

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?

Classic docstring layout: a one-sentence purpose followed by a compact parameter list, front-loaded and free of filler. Efficient, though the prose could note what the diagram output looks like.

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 7-parameter tool with no output schema and file-writing behavior, the description covers inputs well but leaves an important gap: whether the diagram is returned inline or only written to disk, and what the agent should expect when save_to_file=false. Adequate but not complete.

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 0%, so the description carries the full load, and it documents all seven parameters, including non-obvious ones like flow_identifiers accepting names or sys_ids and mermaid_name being used only when destination_file is absent. Some parameters (max_depth, segment_by_root) get only one-line glosses, but coverage of an otherwise undocumented schema is strong.

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?

States a specific verb and artifact ("Generates a Mermaid diagram") plus the exact domain ("relationships between ServiceNow flows and subflows"). This is clearly distinguishable from siblings like servicenow_get_flow_metadata or servicenow_collect_graph_for_roots.

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

Usage Guidelines2/5

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

There is no when-to-use guidance or routing to alternatives. The only conditional statement ("If None, fetches all active flows") describes default behavior, not a usage decision. An agent gets no help choosing between this and the other flow/graph tools.

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