Skip to content

Destructive tools

Require both --allow-mutations and --allow-destructive. These tools delete resources and use the two-step confirm-fingerprint flow.

ray_cluster_delete

Delete a RayCluster (two-step confirmed): call WITHOUT confirm to preview and receive a confirmation fingerprint, then re-call with confirm= to delete. Honors the ray-mcp/protected annotation (refuses). Deleting a RayCluster cascades to its head/worker pods and head service. Requires --allow-destructive. Pass dryRun=true to validate without deleting.

Tier: destructive (destructive, idempotent)

Input parameters

Name Type Required Description
confirm string confirmation fingerprint from a prior preview (empty call); echo it back to commit the deletion
dryRun boolean validate the deletion server-side without removing anything
name string yes the RayCluster name (required)
namespace string namespace of the RayCluster; defaults to the server default namespace

Output fields

Name Type Required Description
confirm string echo this fingerprint back to commit the deletion (preview only)
dryRun boolean true if nothing was deleted (a server-side validation only)
message string human-readable explanation of the preview or result
name string yes
namespace string yes

Example

Request:

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "name": "ray-demo",
      "namespace": "ray-system"
    },
    "name": "ray_cluster_delete"
  }
}

Response (synthesized from the schema; values are illustrative):

{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "content": [
      {
        "text": "<human-readable summary>",
        "type": "text"
      }
    ],
    "structuredContent": {
      "confirm": "example",
      "dryRun": false,
      "message": "example",
      "name": "ray-demo",
      "namespace": "ray-system"
    }
  }
}

ray_service_delete

Delete a RayService (two-step confirmed): call WITHOUT confirm to preview and receive a confirmation fingerprint, then re-call with confirm= to delete. Deleting a RayService cascades to its owned RayCluster(s) and every serve replica on them. If the service appears to be serving traffic (ready serve endpoints, or an upgrade/rollback in progress) the deletion is refused unless force=true (a guardrail against deleting a live service; confirm is still required). Honors the ray-mcp/protected annotation (refuses). Requires --allow-destructive. Pass dryRun=true to validate without deleting.

Tier: destructive (destructive, idempotent)

Input parameters

Name Type Required Description
confirm string confirmation fingerprint from a prior preview (empty call); echo it back to commit the deletion
dryRun boolean validate the deletion server-side without removing anything
force boolean override the guard that refuses to delete a RayService that appears to be serving traffic; confirm is still required
name string yes the RayService name (required)
namespace string namespace of the RayService; defaults to the server default namespace

Output fields

Name Type Required Description
confirm string echo this fingerprint back to commit the deletion (preview only)
dryRun boolean true if nothing was deleted (a server-side validation only)
message string human-readable explanation of the preview or result
name string yes
namespace string yes

Example

Request:

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "name": "ray-demo",
      "namespace": "ray-system"
    },
    "name": "ray_service_delete"
  }
}

Response (synthesized from the schema; values are illustrative):

{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "content": [
      {
        "text": "<human-readable summary>",
        "type": "text"
      }
    ],
    "structuredContent": {
      "confirm": "example",
      "dryRun": false,
      "message": "example",
      "name": "ray-demo",
      "namespace": "ray-system"
    }
  }
}