Skip to main content
Glama

List Elasticsearch roles

elasticsearch_roles_list
Read-onlyIdempotent

List Elasticsearch roles with names, clusters, indices, applications, and reserved flags, using limit and cursor pagination to inspect access definitions and choose a role for retrieval.

Instructions

List Elasticsearch roles

Returns items with name, cluster, indices, applications and reserved flags; managed identities are hidden while built-in definitions remain readable. Use limit (default 100, maximum 500) and cursor with nextCursor; select name for elasticsearch_role_get.

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": {
      "cluster": "<cluster>"
    },
    "name": "elasticsearch_roles_list"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum results per page. Results are authorization-filtered before pagination.
cursorNoOpaque cursor returned by the preceding page.
clusterYesManaged cluster name; the RBAC object is namespace/cluster.
namespaceNoNamespace of the requested object; defaults to default for single-object routes and creation. On collection routes (/clusters, /operations, /events, /events/stream, /orphaned-volumes, /backup-storages and root /metrics), absence includes all authorized namespaces and a value filters to that namespace. A nonexistent explicit namespace returns 404 not_found with resource namespace and its name only when the authenticated caller has a permission in that namespace. Otherwise collections remain empty and object requests retain their normal 403 response without revealing existence. Public and unauthenticated authentication routes do not resolve the parameter.

Output Schema

NameRequiredDescriptionDefault
itemsYes
nextCursorNo
operationIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changed
    • removedInput schema / $defs / NamespaceName
      Removed value: -{
      -  "description": "Project namespace name, 2–32 lowercase letters, digits or hyphens; starts with a letter and ends with a letter or digit. The existing default namespace is reserved.",
      -  "maxLength": 32,
      -  "minLength": 2,
      -  "pattern": "^[a-z][a-z0-9-]{0,30}[a-z0-9]$",
      -  "type": "string"
      -}
    • addedInput schema / $defs / NamespaceName_depth16
      Added value: +{
      +  "description": "Project namespace name, 2–32 lowercase letters, digits or hyphens; starts with a letter and ends with a letter or digit. The existing default namespace is reserved.",
      +  "maxLength": 32,
      +  "minLength": 2,
      +  "pattern": "^[a-z][a-z0-9-]{0,30}[a-z0-9]$",
      +  "type": "string"
      +}
    • addedInput schema / properties / cluster / description
      Added value: +"Managed cluster name; the RBAC object is namespace/cluster."
    • addedInput schema / properties / cursor / description
      Added value: +"Opaque cursor returned by the preceding page."
    • addedInput schema / properties / limit / description
      Added value: +"Maximum results per page. Results are authorization-filtered before pagination."
    • changedInput schema / properties / namespace / $ref
      Previous value: -"#/$defs/NamespaceName"New value: +"#/$defs/NamespaceName_depth16"
    • addedInput schema / properties / namespace / description
      Added value: +"Namespace of the requested object; defaults to default for single-object routes and creation. On collection routes (/clusters, /operations, /events, /events/stream, /orphaned-volumes, /backup-storages and root /metrics), absence includes all authorized namespaces and a value filters to that namespace. A nonexistent explicit namespace returns 404 not_found with resource namespace and its name only when the authenticated caller has a permission in that namespace. Otherwise collections remain empty and object requests retain their normal 403 response without revealing existence. Public and unauthenticated authentication routes do not resolve the parameter."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$defs": {
      +    "ElasticApplicationPrivileges_depth14": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "application": {
      +          "type": "string"
      +        },
      +        "privileges": {
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        "resources": {
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        }
      +      },
      +      "required": [
      +        "application",
      +        "privileges",
      +        "resources"
      +      ],
      +      "type": "object"
      +    },
      +    "ElasticFieldSecurity_depth13": {
      +      "additionalProperties": false,
      +      "description": "Field-level security; omitted lists and explicitly empty lists are distinct.",
      +      "properties": {
      +        "except": {
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        "grant": {
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "ElasticIndexPrivileges_depth14": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "allowRestrictedIndices": {
      +          "type": "boolean"
      +        },
      +        "fieldSecurity": {
      +          "$ref": "#/$defs/ElasticFieldSecurity_depth13"
      +        },
      +        "names": {
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        "privileges": {
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        "query": {
      +          "description": "Opaque Elasticsearch document-level security query JSON.",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "names",
      +        "privileges",
      +        "allowRestrictedIndices"
      +      ],
      +      "type": "object"
      +    },
      +    "ElasticRole_depth15": {
      +      "additionalProperties": false,
      +      "description": "Built-in roles are readable but immutable; Karakoram-managed roles are hidden.",
      +      "properties": {
      +        "applications": {
      +          "items": {
      +            "$ref": "#/$defs/ElasticApplicationPrivileges_depth14"
      +          },
      +          "type": "array"
      +        },
      +        "cluster": {
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        "indices": {
      +          "items": {
      +            "$ref": "#/$defs/ElasticIndexPrivileges_depth14"
      +          },
      +          "type": "array"
      +        },
      +        "name": {
      +          "maxLength": 64,
      +          "minLength": 1,
      +          "type": "string"
      +        },
      +        "reserved": {
      +          "description": "Built-in roles cannot be changed or deleted.",
      +          "readOnly": true,
      +          "type": "boolean"
      +        }
      +      },
      +      "required": [
      +        "name",
      +        "cluster",
      +        "indices",
      +        "applications"
      +      ],
      +      "type": "object"
      +    }
      +  },
      +  "properties": {
      +    "items": {
      +      "items": {
      +        "$ref": "#/$defs/ElasticRole_depth15"
      +      },
      +      "type": "array"
      +    },
      +    "nextCursor": {
      +      "type": "string"
      +    },
      +    "operationId": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "items"
      +  ],
      +  "type": "object"
      +}
  2. First observedv0.4.3

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, non-destructive and closed-world. The description adds real behavior beyond them: which fields come back, that managed identities are filtered out while built-ins stay readable, and the 100/500 pagination bounds with nextCursor continuation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two tight sentences: purpose and return shape first, then pagination and the hand-off to the detail tool. Nothing is wasted, though the limit/cursor restatement is slightly redundant with the schema.

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?

With an output schema present, the description need not explain return values, and it still covers filtering behavior and pagination. The main omissions are the scope of the cluster/namespace parameters, which the schema already handles.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so limit, cursor, cluster and namespace are already fully documented by the schema, and the description largely restates the limit defaults. The only added value is the hint that the response carries nextCursor, which explains how to use cursor.

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?

States a specific verb and resource ("List Elasticsearch roles") and immediately enumerates the returned fields, so the agent can distinguish it from database_roles_list, postgres_roles_list and weaviate_roles_list without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly routes the agent to elasticsearch_role_get via "select name for elasticsearch_role_get," giving a clear when-to-use-next signal. It also explains the visibility rule (managed identities hidden, built-in definitions readable), though it never states when not to use this list tool.

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

Deploy Server

Other Tools