Skip to main content
Glama
ketiil

ServiceNow CMDB MCP Server

by ketiil

get_flow_details

Read-onlyIdempotent

Retrieve complete logic of a ServiceNow Flow Designer flow by sys_id, including trigger, steps, and referenced tables. Optionally include detailed step inputs, outputs, and conditions.

Instructions

Get detailed logic of a Flow Designer flow by sys_id.

Fetches the flow definition from sys_hub_flow_base and parses the label_cache to extract trigger, steps, referenced tables, and data flow. Use get_flows to find the flow sys_id first.

Prerequisites: Use get_flows(name_filter="...") to find the flow sys_id.

Examples: get_flow_details(sys_id="abc123...") get_flow_details(sys_id="abc123...", include_step_details=True)

Args: sys_id: The sys_id of the flow (from get_flows results). include_step_details: If True, fetches and decodes step-level configuration from sys_hub_flow_logic_instance_v2 and sys_hub_step_instance. Shows actual inputs, outputs, and conditions for each step. Requires fd_read role. Defaults to False for efficiency.

Returns: JSON object with flow metadata (sys_id, name, internal_name, description, active, status, run_as, type, sys_scope, sys_created_by, sys_updated_on), "steps" and "step_count" parsed from label_cache, and "suggested_next" guidance. When include_step_details=True, also includes "detailed_steps" (with decoded inputs, outputs, conditions, variables per step) and "detailed_step_count".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sys_idYes
include_step_detailsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, idempotentHint=true, so the safety profile is covered. The description adds behavioral context: it fetches from sys_hub_flow_base, parses the label_cache, and optionally fetches step details from additional tables, including role requirement for details. This adds value beyond annotations without contradiction.

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?

Description is well-structured with a clear opening sentence, then prerequisites, examples, args, and returns. It is front-loaded with purpose. While slightly verbose, each section earns its place and provides necessary detail without redundancy.

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?

Given an output schema exists (though not shown), the description's return value listing is sufficient. It covers flow metadata, steps, step count, and optional detailed steps. It mentions role requirements and efficiency. However, it omits error handling or cases like invalid sys_id, so it's not fully exhaustive.

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?

Input schema has 2 params with 0% description coverage. Description compensates by explaining sys_id must come from get_flows, and include_step_details fetches step configuration, requires fd_read role, and defaults to false for efficiency. This adds significant meaning beyond the schema's bare property definitions.

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?

Description clearly states the action ('Get detailed logic of a Flow Designer flow by sys_id'), specifies the resource (flow details), and distinguishes from sibling get_flows by explaining it's the prerequisite to find the sys_id. It also lists what is returned (metadata, steps, etc.), making the purpose unambiguous.

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

Usage Guidelines4/5

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

Description provides explicit prerequisites ('Use get_flows to find the flow sys_id first'), usage context for include_step_details (role requirement, efficiency trade-off), and examples. While it doesn't explicitly mention when not to use it, the guidance is clear and actionable. Sibling differentiation is implicit through the prerequisite mention.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ketiil/mcp-cmdb'

If you have feedback or need assistance with the MCP directory API, please join our Discord server