Build a raidcom command
raidcom_build_commandBuild and validate a single raidcom command from structured arguments without executing it or contacting storage; returns command text with errors and fixes for review.
Instructions
Build one raidcom command from structured arguments and validate it. Nothing is executed and no storage system is contacted: you get command text to review and run elsewhere. Unknown options, wrong value counts, missing required options, bad port names and out-of-range LDEV, LUN, pool and serial numbers are reported as errors with a fix. Example: {"command": "add ldev", "options": {"-pool": 0, "-ldev_id": 256, "-capacity": "100G"}, "model": "vsp-one-b28", "global": {"instance": 0}} → raidcom add ldev -pool 0 -ldev_id 256 -capacity 100G -I0. For many similar commands use raidcom_build_script, not repeated calls. When the user asks for a command, show them the command from the result.
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": {
"command": "<command>"
},
"name": "raidcom_build_command"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Storage model, so values are checked against its limits: vsp-one-b24, vsp-one-b26, vsp-one-b28, vsp-5000, vsp-e590, vsp-e790, vsp-e990, vsp-e1090. Aliases such as B28 or E990 work. Omit it to check against the widest range of any model. | |
| global | No | Settings that apply to the whole command, not to one raidcom option. | |
| strict | No | Default true. The command catalogue is parsed from the manual, whose syntax lines are occasionally incomplete, so a "needs <option>" error can be a false alarm. If one looks wrong after reading raidcom_describe_command, retry with strict=false: missing-option errors then become warnings. Unknown options and out-of-range values stay errors. | |
| command | Yes | Command name: action and object, e.g. "add lun", "get ldev", "modify host_grp". | |
| options | No | raidcom options and their values, keyed by option name with or without the leading dash. A value is a string or number; an option that takes several values (for example -port takes a port and an optional host group name) takes an array: {"-port": ["CL1-A-0", "esx01"]}. An option with no value (a switch such as -allports) is true. Example for `add lun`: {"-port": ["CL1-A-0"], "-ldev_id": 200, "-lun_id": 1}. |