Skip to main content
Glama

add_iscsi_target

Add an iSCSI send target to an ESXi host's software iSCSI adapter, then rescan HBAs and VMFS volumes to discover new LUNs; preview changes unless confirmed.

Instructions

[WRITE] Add an iSCSI send (dynamic discovery) target to an ESXi host's software iSCSI adapter, then automatically rescan all HBAs and VMFS volumes to discover new LUNs.

Without confirm=True this only previews: it returns blast_radius (the adapter, the send targets configured now, and the adapters the rescan touches) and changes nothing. Show it to the user. Do not set confirm=True on your own because the user asked earlier — they have not seen the preview yet. Refused when software iSCSI is not enabled (run enable_iscsi first) or the host's storage view cannot be read. A duplicate address:port returns action "noop". No separate rescan_storage call is needed afterwards. 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": "add_iscsi_target"
  }
}

Input Schema

NameRequiredDescriptionDefault
portNoiSCSI TCP port, 1-65535 (default 3260).
targetNoOptional vCenter/ESXi target name from config.
addressYesiSCSI portal IP address (IPv4/IPv6 literal; hostnames are rejected with a validation error).
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.8/5.0
Behavior5/5

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

Beyond the annotations, the description discloses the two-phase preview/apply behavior, the contents of blast_radius, the refusal conditions, duplicate handling, and the automatic HBA/VMFS rescan. It makes the tool's side effects and safety workflow clear even without relying solely on the annotations.

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?

The description is front-loaded with the write operation and its main side effect, then proceeds to preview/confirm guidance and failure cases. Despite its length, every sentence carries relevant operational information.

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?

It covers the critical context for a complex write tool: prerequisites, preview behavior, confirmation caution, automatic rescan, duplicate noop, and refusal conditions. It is slightly incomplete on the full shape of the returned dict, but the preview return contents are described.

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 coverage is 100%, so all five parameters are already documented. The description adds operational meaning for confirm and address:port duplicate handling, though it does not add much beyond the schema for host_name, target, or port.

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 states a specific verb and resource: add an iSCSI send/dynamic discovery target to an ESXi host's software iSCSI adapter. It also names the automatic rescan side effect, so an agent can distinguish this from sibling tools like rescan_storage or enable_iscsi.

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?

It gives explicit usage conditions: call enable_iscsi first if software iSCSI is disabled, use confirm=True only after showing the preview, and do not make a separate rescan_storage call afterward. It also states that duplicate address:port calls return noop, which clarifies an important edge case.

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