rules.list

Live

List Cortex rules for the authenticated principal.

CategoryRules
JSON-RPCtools/call
EndpointPOST /mcp
Sourcepackages/mcp-tools/src/tools/rules-list.ts

Description

Returns the principal's behavioral rulebook, filterable by lifecycle status.

Input schema

FieldTypeRequiredDescription
limitinteger > 0noMaximum rules to return.
status"active" | "suspended" | "all"noFilter by lifecycle status. Defaults to "active".

Output shape

typescript
{
  rules: Array<{
    id: string;
    summary: string;
    status: string;
    created_at: string;
  }>;
}

Example call

JSON-RPC tools/call request body (omit the JSON-RPC envelope when using an SDK; the SDK adds it for you):

jsontools/call params
{
  "name": "rules.list",
  "arguments": { "status": "active", "limit": 20 }
}

Example response

Tool results are always wrapped as content[0].text with a stringified JSON body. The shape below is what you get back from JSON.parse(result.content[0].text):

jsonparsed result body
{
  "rules": [
    {
      "id": "rule_01HXP",
      "summary": "Always confirm before sending messages after 10pm.",
      "status": "active",
      "created_at": "2026-04-12T03:14:00Z"
    }
  ]
}

Errors this tool can return

CodeMeaning
unauthorizedMissing or invalid bearer token.

See the full error catalog for resolution steps on each code, plus the standard transport-layer responses (401, 429).