Skip to content

Usage Examples

This section provides example queries you can ask your MCP client (GitHub Copilot, Claude Desktop, etc.) when using the ONTAP MCP Server. For more examples and community discussions about MCP usage, see: ONTAP MCP examples discussion

Higher-capability language models provide better analysis and insights. When possible use the latest model versions with large context windows. You will get better results when using flagship models like GPT-5.X, Sonnet 4.X, Gemini 3, etc.

The following examples were run with Claude Sonnet 4.5 large language model.

Reference Questions

Below are example questions that work well with the ONTAP MCP Server:

CIFS shares

Create a CIFS share

  • On the umeng-aff300-05-06 cluster, create a CIFS share named cifsFin at the path / on the marketing svm
  • Expected Response: CIFS share created successfully.

Update a CIFS share

  • On the umeng-aff300-05-06 cluster, update the CIFS share named cifsFin. Change its path to /cifsFin on the marketing svm
  • Expected Response: CIFS share updated successfully.

FCP

  • On the umeng-aff300-05-06 cluster, enable fcp service in marketing svm
  • Expected Response: The fcp service has been successfully created.

  • On the umeng-aff300-05-06 cluster, create fc interface fc1 in marketing svm at port 0e in node umeng-aff300-01 of fcp data protocol

  • Expected Response: The fc interface has been successfully created.

  • On the umeng-aff300-05-06 cluster, delete fc interface fc1 in marketing svm

  • Expected Response: The fc interface has been successfully deleted.

  • On the umeng-aff300-05-06 cluster, update fcp service to disable on the marketing svm

  • Expected Response: The fcp service has been successfully updated.

iGroups (SAN)

Create an iGroup

  • On the umeng-aff300-05-06 cluster, create an igroup named igroupFin with OS type linux and protocol iscsi on the marketing svm
  • Expected Response: igroup created successfully.

  • On the umeng-aff300-05-06 cluster, create lun map of lun named /vol/docs/lunpayroll and an igroup named igroupFin on the marketing svm

  • Expected Response: lun map created successfully.

  • On the umeng-aff300-05-06 cluster, delete lun map of lun named /vol/docs/lunpayroll and an igroup named igroupFin on the marketing svm

  • Expected Response: lun map deleted successfully.

Rename an iGroup

  • On the umeng-aff300-05-06 cluster, rename igroup igroupFin to igroupFinNew and os type as windows on the marketing svm
  • Expected Response: igroup updated successfully.

Add an Initiator to an iGroup

  • On the umeng-aff300-05-06 cluster, add initiator iqn.2021-01.com.example:test to igroup igroupFinNew on the marketing svm
  • Expected Response: initiator added to igroup successfully.

Remove an Initiator from an iGroup

  • On the umeng-aff300-05-06 cluster, remove initiator iqn.2021-01.com.example:test from igroup igroupFinNew on the marketing svm
  • Expected Response: initiator removed from igroup successfully.

Delete an iGroup

  • On the umeng-aff300-05-06 cluster, delete igroup igroupFinNew on the marketing svm
  • Expected Response: igroup deleted successfully.

iSCSI

  • On the umeng-aff300-05-06 cluster, create iscsi service target named alias tgpath on the marketing svm
  • Expected Response: The iscsi service has been successfully created.

  • On the umeng-aff300-05-06 cluster, disable the iscsi service on the marketing svm

  • Expected Response: The iscsi service has been successfully updated.

  • On the umeng-aff300-05-06 cluster, delete the iscsi service on the marketing svm

  • Expected Response: The iscsi service has been successfully deleted.

  • on the umeng-aff300-05-06 cluster, create network interface named cl_mg with ip address 10.63.41.6 and netmask 18 with Default ipspace on node umeng-aff300-06

  • Expected Response: The Network IP interface has been created successfully.

  • on the umeng-aff300-05-06 cluster, change auto revert to false in cluster scope network interface named cl_mg

  • Expected Response: The Network IP interface updated successfully.

  • on the umeng-aff300-05-06 cluster, delete svm scope network interface named svg1 in marketing svm

  • Expected Response: The Network IP interface deleted successfully.

LUNs

Create a LUN

  • On the umeng-aff300-05-06 cluster, create a 20MB lun named lundoc in volume doc on the marketing svm with os type linux
  • Expected Response: LUN has been created successfully.

Resize a LUN

  • On the umeng-aff300-05-06 cluster, update lun lundoc size to 50mb in volume doc on the marketing svm
  • Expected Response: LUN has been updated successfully.

Rename a LUN

  • On the umeng-aff300-05-06 cluster, rename the lun lundoc in volume doc on the marketing svm to lundocnew
  • Expected Response: LUN has been updated successfully.

State change of a LUN

  • On the umeng-aff300-05-06 cluster, disable the lun lundocnew in volume doc on the marketing svm
  • Expected Response: LUN has been updated successfully.

Delete a LUN

  • On the umeng-aff300-05-06 cluster, delete lun lundocnew in volume doc in marketing svm
  • Expected Response: LUN has been deleted successfully.

NFS Export Policies

Create an NFS Export policy

  • On the umeng-aff300-05-06 cluster, create an NFS export policy name nfsEngPolicy on the marketing svm
  • Expected Response: NFS Export Policy created successfully.

Rename an NFS Export policy

  • On the umeng-aff300-05-06 cluster, rename the NFS export policy from nfsEngPolicy to nfsMgrPolicy on the marketing svm.
  • Expected Response: NFS Export Policy updated successfully.

NFS Export Policy Rules

Create an NFS Export policy rule

  • On the umeng-aff300-05-06 cluster, create an NFS export policy rule as client match 0.0.0.0/0, ro rule any, rw rule any in nfsMgrPolicy on the marketing svm
  • Expected Response: NFS Export Policy Rules created successfully.

Update an NFS Export policy rule

  • On the umeng-aff300-05-06 cluster, update the NFS export policy rule for nfsMgrPolicy export policy on the marketing svm ro rule from any to never.
  • Expected Response: NFS Export Policy Rules updated successfully.

NVMe

  • On the umeng-aff300-05-06 cluster, create nvme service on the marketing svm
  • Expected Response: The nvme service has been successfully created.

  • On the umeng-aff300-05-06 cluster, disable nvme service on the marketing svm

  • Expected Response: The nvme service has been successfully updated.

  • On the umeng-aff300-05-06 cluster, create nvme subsystem sys1 with linux os on the marketing svm

  • Expected Response: The nvme subsystem has been successfully created.

  • On the umeng-aff300-05-06 cluster, add host nqn as nqn.1992-01.example.com:host1 in sys1 nvme subsystem in marketing svm

  • Expected Response: The nvme subsystem Host has been successfully added.

  • On the umeng-aff300-05-06 cluster, delete nvme subsystem sys1 in marketing svm

  • Expected Response: The nvme subsystem has been successfully deleted.

  • On the umeng-aff300-05-06 cluster, create nvme namespace /vol/docns/ns1 with linux os and 20mb size in nvmevs1 svm

  • Expected Response: The nvme namespace has been successfully created.

  • On the umeng-aff300-05-06 cluster, create subsystem map of sys1 subsystem and /vol/docns/ns1 namespace in nvmevs1 svm

  • Expected Response: The nvme subsystem map has been successfully created.

QoS Policies

List All QoS Policies

  • On the umeng-aff300-05-06 cluster, list all qos policies

  • Expected Response: A list of all QoS policies including both SVM-scoped and cluster-scoped policies.

List QoS Policies for a Specific SVM

  • On the umeng-aff300-05-06 cluster, list all qos policies for the marketing svm

  • Expected Response: All QoS policies for the marketing SVM plus all cluster-scoped policies (cluster-scoped policies are always included).

List Only Fixed QoS Policies

  • On the umeng-aff300-05-06 cluster, list all fixed qos policies

  • Expected Response: A list of fixed QoS policies including cluster-scoped ones.

List Only Adaptive QoS Policies

  • On the umeng-aff300-05-06 cluster, list all adaptive qos policies

  • Expected Response: A list of adaptive QoS policies including cluster-scoped ones.

Create a QoS Policy

  • On the umeng-aff300-05-06 cluster, create a fixed QoS policy named gold on the marketing svm with a max throughput of 5000 iops.

  • Expected Response: The fixed QoS policy "gold" has been successfully created on the marketing SVM with a maximum throughput of 5000 IOPS on the umeng-aff300-05-06 cluster.

Apply a Named QoS Policy to a Volume

  • On the umeng-aff300-05-06 cluster, apply the gold QoS policy to the docs volume on the marketing svm

  • Expected Response: The QoS policy "gold" has been successfully applied to the "docs" volume on the marketing SVM.

Create a Volume with a Named QoS Policy

  • On the umeng-aff300-05-06 cluster, create a 20MB volume named docs on the marketing svm and the harvest_vc_aggr aggregate with QoS policy gold

  • Expected Response: Volume "docs" has been created successfully on the marketing SVM with QoS policy "gold" applied.

Create a Volume with Inline QoS Limits

  • On the umeng-aff300-05-06 cluster, create a 20MB volume named docs on the marketing svm and the harvest_vc_aggr aggregate with an inline QoS limit of max_iops 300

  • Expected Response: Volume "docs" has been created successfully with an inline QoS limit of 300 IOPS.

Update Inline QoS Limits on a Volume

  • On the umeng-aff300-05-06 cluster, update the docs volume on the marketing svm setting an inline QoS limit of max_iops 150

  • Expected Response: The inline QoS limit on volume "docs" has been updated to a maximum of 150 IOPS.

Switch a Volume from Inline QoS to a Named QoS Policy

  • On the umeng-aff300-05-06 cluster, apply the gold QoS policy to the docs volume on the marketing svm

  • Expected Response: The QoS policy "gold" has been successfully applied to the "docs" volume, replacing the previous inline QoS limits.

Switch a Volume from a Named QoS Policy to Inline QoS

  • On the umeng-aff300-05-06 cluster, update the docs volume on the marketing svm setting an inline QoS limit of max_iops 500

  • Expected Response: The inline QoS limit on volume "docs" has been set to a maximum of 500 IOPS.

Remove Inline QoS Limits from a Volume

  • On the umeng-aff300-05-06 cluster, update the docs volume on the marketing svm and remove the inline QoS limit by setting max_iops to 0

  • Expected Response: The inline QoS limit on volume "docs" has been removed. The volume no longer has a maximum IOPS constraint.

Remove a Named QoS Policy from a Volume

  • On the umeng-aff300-05-06 cluster, remove the QoS policy from the docs volume on the marketing svm

  • Expected Response: The QoS policy has been successfully removed from the "docs" volume on the marketing SVM.


Qtrees

  • On the umeng-aff300-05-06 cluster, create a qtree named staff in docs volume on the marketing SVM
  • Expected Response: The qtree has been successfully created.

  • On the umeng-aff300-05-06 cluster, rename a qtree named staff to pay in docs volume on the marketing SVM

  • Expected Response: The qtree has been successfully renamed.

Schedules

  • On the umeng-aff300-05-06 cluster, create a cron schedule with 5 * * * * named as 5minutes
  • Expected Response: The schedule has been successfully created.

  • On the umeng-aff300-05-06 cluster, create a cron schedule with * * 11 1-2 * named as 11dayjantofeb

  • Expected Response: The schedule has been successfully created.

Snapshot Policies

  • On the umeng-aff300-05-06 cluster, create a snapshot policy named every4hours on the gold SVM. The schedule is 4 hours and keeps the last 5 snapshots.

  • Expected Response: The snapshot policy "every4hours" has been successfully created on the gold SVM with a schedule of every 4 hours, retaining the last 5 snapshots on the umeng-aff300-05-06 cluster.

  • On the umeng-aff300-05-06 cluster, create a snapshot policy named biweekly on the vs_test SVM. The schedule would be 2weekday12_30min and keeps the last 3 snapshots.

  • Expected Response if the schedule exists: The snapshot policy has been successfully created.
  • Expected Response if the schedule does not exist: no schedule 2weekday12_30min found

  • On the umeng-aff300-05-06 cluster, create a snapshot policy named every5min on the vs_test SVM. The schedule is 5 min and keeps the last 2 snapshots.

  • Expected Response: The snapshot policy has been successfully created.

Snapshots

  • On the umeng-aff300-05-06 cluster, create a snapshot named localsnap on the docs volume on the marketing svm.
  • Expected Response: Snapshot created successfully

  • On the umeng-aff300-05-06 cluster, restore the docs volume from a snapshot named localsnap on the marketing svm.

  • Expected Response: Snapshot restored successfully

  • On the umeng-aff300-05-06 cluster, delete the localsnap snapshot on the docs volume on the marketing svm.

  • Expected Response: Snapshot deleted successfully

  • On the umeng-aff300-05-06 cluster, list the snapshots on the docs volume on svm marketing.

  • Expected Response: A list of snapshots for the volume docs on the marketing SVM.

SVMs

Create an SVM

  • On the umeng-aff300-05-06 cluster, create marketing svm
  • Expected Response: SVM created successfully.

Rename an SVM

  • On the umeng-aff300-05-06 cluster, rename svm marketing to marketingNew
  • Expected Response: SVM updated successfully.

Update an SVM

  • On the umeng-aff300-05-06 cluster, update svm marketingNew state to stopped and comment as stop_svm
  • Expected Response: SVM updated successfully.

Delete an SVM

  • On the umeng-aff300-05-06 cluster, delete marketingNew svm
  • Expected Response: SVM deleted successfully.

Volumes

Create a Volume

  • On the umeng-aff300-05-06 cluster, create a 20MB volume named docs on the marketing svm and the harvest_vc_aggr aggregate
  • Expected Response: Volume "docs" has been created successfully on the umeng-aff300-05-06 cluster with 20MB size on the marketing SVM using the harvest_vc_aggr aggregate.

Resize a Volume

  • On the umeng-aff300-05-06 cluster, resize the docs volume on the marketing svm to 25MB.

  • Expected Response: Volume "docs" has been successfully resized to 25MB on the marketing SVM.

  • On the umeng-aff300-05-06 cluster, increase the size of the docs volume on the marketing svm by 5MB.

  • Expected Response: Volume "docs" has been successfully increased by 5MB to 30MB on the marketing SVM.

Volume Autogrowth

  • On the umeng-aff300-05-06 cluster, enable autogrowth on the docs volume in the marketing svm

  • Expected Response: Autogrowth has been enabled on the "docs" volume in the marketing SVM on the umeng-aff300-05-06 cluster.

  • Increase the docs volume autogrow percent to 62

  • Expected Response: The autogrow threshold for the docs volume has been successfully increased to 62%. The volume will now automatically grow when it reaches 62% capacity.


Querying Specific Fields

Get volume space and protection details

  • On the umeng-aff300-05-06 cluster, for every volume on the marketing svm, show me the name, junction path, used size, available size, and snapshot policy.
  • Expected Response: A table of volumes with their junction paths, used/available space, and assigned snapshot policies on the marketing SVM.

Check whether it is safe to extend a volume

  • On the umeng-aff300-05-06 cluster, can I safely grow the docs volume on the marketing svm by 10GB? Check the aggregate's available space first.
  • Expected Response: A summary of aggregate free space, followed by a recommendation on whether it is safe to proceed with the resize.

Manage SnapMirror Relationships

Create a SnapMirror relationship

  • On the umeng-aff300-05-06 cluster, create a snapmirror relationship from source svm srsvm and source volume srvol to destination svm dtsvm and destination volume dtvol with policy name XDPDefault

Expected Response: SnapMirror relationship created successfully

Update a SnapMirror relationship

  • On the umeng-aff300-05-06 cluster, update a snapmirror relationship of destination svm dtsvm and destination volume dtvol with transfer schedule name to hourly

Expected Response: SnapMirror relationship updated successfully

Update a SnapMirror relationship state

  • On the umeng-aff300-05-06 cluster, break a snapmirror relationship of destination svm dtsvm and destination volume dtvol

Expected Response: SnapMirror relationship broken successfully

  • On the umeng-aff300-05-06 cluster, resync a snapmirror relationship of destination svm dtsvm and destination volume dtvol

Expected Response: SnapMirror relationship resynced successfully

Delete a SnapMirror relationship

  • On the umeng-aff300-05-06 cluster, delete a snapmirror relationship of destination svm dtsvm and destination volume dtvol

Expected Response: SnapMirror relationship deleted successfully


MCP Clients

Common MCP clients that work with ONTAP MCP Server:

  • GitHub Copilot: Integrated in VS Code, supports MCP connections
  • Claude Desktop: Anthropic's desktop application with MCP support
  • Custom MCP Clients: Any application implementing the MCP standard