Skip to main content
Glama

remove_iscsi_target

Destructive

Remove an iSCSI send target from an ESXi host's software iSCSI adapter, preview the blast radius before confirming, then rescan HBAs and VMFS volumes.

Instructions

[WRITE] Remove an iSCSI send target from an ESXi host's software iSCSI adapter, then rescan all HBAs and VMFS volumes.

Destructive: LUNs served only through this target become inaccessible after the rescan. Without confirm=True this only previews: it returns blast_radius (the static targets it discovered, the paths that go with them, the devices and VMFS datastores that lose all or some paths) and changes nothing. Show that to the user and get their explicit decision. Do not set confirm=True on your own because the user asked earlier — they have not seen what it cuts off yet. Refused when a datastore would lose every path (unmount it first), when the address:port is not configured or software iSCSI is disabled, and when any path or static target cannot be attributed. Reversible only by re-adding via add_iscsi_target. Returns a dict.

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": {
      "host_name": "<host_name>",
      "address": "<address>"
    },
    "name": "remove_iscsi_target"
  }
}

Input Schema

NameRequiredDescriptionDefault
portNoConfigured iSCSI TCP port, 1-65535 (default 3260).
targetNoOptional vCenter/ESXi target name from config.
addressYesConfigured iSCSI portal IP (IPv4/IPv6 literal; hostnames rejected). Must match the existing entry exactly.
confirmNoFalse (default) returns the blast radius and changes nothing. True applies it.
host_nameYesESXi host name as shown in vCenter inventory.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.5.0
    • removedInput schema / properties / dry_run
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "boolean"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null,
      -  "description": "Deprecated alias for confirm; removed in the next minor release. dry_run=False acts, dry_run=True previews.",
      -  "title": "Dry Run"
      -}
  2. Addedv2.0.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already flag destructive/openWorld/non-idempotent, but the description adds substantial context: what becomes inaccessible after the rescan, the exact refusal conditions (all-paths-loss datastore, unconfigured address, disabled iSCSI, unattributable paths), reversibility limits, and return type.

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?

Front-loaded with the action, then the destructive warning and confirm protocol. Dense but nearly every sentence carries decision-relevant information; minor verbosity in the blast_radius enumeration.

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?

No output schema exists, yet the description fills that gap by describing the returned dict's blast_radius contents (targets, paths, devices, datastores losing paths). Complete for an agent to call and interpret this destructive tool safely.

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 description coverage is 100%, so all five parameters are already documented in the schema. The description reinforces the confirm semantics but adds no new per-parameter meaning beyond what the schema provides; 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 (Remove) and resource (iSCSI send target from an ESXi software iSCSI adapter) and includes the immediate side effect (rescan HBAs/VMFS). This clearly separates it from add_iscsi_target and rescan_storage among the siblings.

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 describes the preview-then-confirm workflow, warns against setting confirm=True on the user's prior request, and tells the agent to surface blast_radius for an explicit decision. It also names the alternative recovery path (re-add via add_iscsi_target).

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