Skip to main content
Glama
ketiil

ServiceNow CMDB MCP Server

by ketiil

find_orphan_cis

Read-onlyIdempotent

Detect configuration items with no upstream or downstream relationships in ServiceNow CMDB to identify incomplete discovery or orphaned records.

Instructions

Find CIs that have no relationships in cmdb_rel_ci.

Orphan CIs are configuration items with zero upstream or downstream relationships (also called unlinked, isolated, or disconnected CIs). These often indicate incomplete discovery, manual entries that were never linked, or leftover records from decommissioned infrastructure.

Scans a batch of CIs and checks each against cmdb_rel_ci using IN-batch queries. Results may be partial if the orphan ratio is low — use scan_offset to continue scanning from where the previous call left off.

Performance: This tool issues multiple API calls per batch (fetches CIs, then checks parent and child relationships for batches of up to 100 CIs). Use cmdb_health_summary for a quick count without record-level detail. Narrow scope with ci_class or operational_status to reduce scan cost.

Examples: find_orphan_cis(ci_class="cmdb_ci_server", operational_status="1") find_orphan_cis(ci_class="cmdb_ci_linux_server", limit=50) find_orphan_cis(ci_class="cmdb_ci", scan_offset=100) # continue scanning

Args: ci_class: CMDB table to search for orphans (e.g. cmdb_ci_server). Defaults to cmdb_ci (all types). operational_status: Optional filter by operational status (e.g. "1" for Operational). limit: Maximum orphan CIs to return (1-1000, default 25). scan_offset: Offset into the CI table to start scanning from. Use the "next_offset" value from a previous response to continue.

Returns: JSON object with "ci_class", "count", "orphan_cis" list, "total_scanned" (CIs checked), "has_more", and "next_offset" (for continuation).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ci_classNocmdb_ci
operational_statusNo
limitNo
scan_offsetNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Annotations already indicate read-only, non-destructive, idempotent. Description adds that multiple API calls are made per batch, results may be partial, and scan_offset allows continuation. No contradiction with annotations.

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?

Well-structured with sections, examples, and front-loaded purpose. Slightly verbose with redundant explanations (e.g., definition of orphans), but overall clear and efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers all aspects: purpose, parameters, return values (described in text), performance, examples, and continuation logic. Output schema presence and description ensure completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, but the 'Args' section describes each parameter, including defaults, enum meanings (e.g., operational_status '1' for Operational), and usage tips. This fully compensates for missing schema descriptions.

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 finds CIs without relationships, defines orphan CIs, and distinguishes from sibling tools like cmdb_health_summary. Examples and parameter details reinforce the purpose.

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?

Explicitly explains when to use this tool (find orphans) and when to use alternatives (cmdb_health_summary for quick count). Provides performance guidance and recommends narrowing scope to reduce cost.

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