Skip to main content
Glama

sn_mcp_unregister_external_server

Destructive

Unregisters an external MCP server from the ServiceNow MCP client registry, optionally removing its connection alias, HTTP connection, and credential; fails if AI agent tools still reference it.

Instructions

Remove an external MCP server from the instance's MCP client registry (sn_mcp_server) and, unless keep_connection is true, the connection alias, HTTP connection and credential created for it. Refused while AI agent tools still use the server. REQUIRES WRITE_ENABLED=true.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "server": "<server>"
    },
    "name": "sn_mcp_unregister_external_server"
  }
}

Input Schema

NameRequiredDescriptionDefault
serverYessn_mcp_server name or sys_id
keep_connectionNoKeep the connection alias, connection and credential (default false)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv5.0.1

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and idempotentHint=false, yet the description still adds what those annotations cannot: exactly which artifacts are destroyed (connection alias, HTTP connection, credential), the keep_connection escape hatch that limits the blast radius, and the precondition that AI agent tool references block the call. That is concrete consequence-level disclosure beyond the structured fields.

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?

Three short sentences, front-loaded with the action and cascade, then the refusal rule, then the environment prerequisite. No filler and no repetition of the schema beyond what illustrates the destructive scope.

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?

For a two-parameter destructive mutation with no output schema, the definition covers what is removed, the opt-out, the blocking condition, and the required environment flag. An agent has enough to decide whether to call it and how to set keep_connection without further inspection.

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 coverage is 100%, so the schema already documents both 'server' (name or sys_id) and 'keep_connection' (default false) with matching wording. The description reinforces the keep_connection consequence by restating it in the main body, but adds no format, identifier, or validation detail the schema lacks; baseline 3 applies.

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 resource ('Remove an external MCP server') and pins the exact target store ('the instance's MCP client registry (sn_mcp_server)'). The 'external' qualifier plus the named registry table distinguishes this from sibling operations like sn_mcp_remove_tool or sn_mcp_delete_server.

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?

Gives a real precondition ('REQUIRES WRITE_ENABLED=true') and an explicit refusal condition ('Refused while AI agent tools still use the server'), which functions as a when-not-to-use rule. It stops short of naming an alternative tool for cases where the server must be detached but not deleted, so it lands at 4 rather than 5.

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