Skip to main content
Glama

Get Elasticsearch roles

elasticsearch_role_get
Read-onlyIdempotent

Fetch an Elasticsearch role by exact name to inspect its cluster, index and application permissions plus reserved status after identifying it with the roles list.

Instructions

Get Elasticsearch roles

Returns name, cluster, indices, applications and reserved status for a definition from elasticsearch_roles_list. Built-in permissions are readable; an absent or hidden managed identity returns 404.

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>",
      "role": "<role>"
    },
    "name": "elasticsearch_role_get"
  }
}

Input Schema

NameRequiredDescriptionDefault
roleYesExact role name string returned as name by elasticsearch_roles_list; built-in roles are readable but cannot be changed or deleted.
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
nameYes
clusterYes
indicesYes
reservedNoBuilt-in roles cannot be changed or deleted.
operationIdNo
applicationsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 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."
    • 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."
    • addedInput schema / properties / role / description
      Added value: +"Exact role name string returned as name by elasticsearch_roles_list; built-in roles are readable but cannot be changed or deleted."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$defs": {
      +    "ElasticApplicationPrivileges_depth15": {
      +      "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_depth14": {
      +      "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_depth15": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "allowRestrictedIndices": {
      +          "type": "boolean"
      +        },
      +        "fieldSecurity": {
      +          "$ref": "#/$defs/ElasticFieldSecurity_depth14"
      +        },
      +        "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"
      +    }
      +  },
      +  "additionalProperties": false,
      +  "description": "Built-in roles are readable but immutable; Karakoram-managed roles are hidden.",
      +  "properties": {
      +    "applications": {
      +      "items": {
      +        "$ref": "#/$defs/ElasticApplicationPrivileges_depth15"
      +      },
      +      "type": "array"
      +    },
      +    "cluster": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "indices": {
      +      "items": {
      +        "$ref": "#/$defs/ElasticIndexPrivileges_depth15"
      +      },
      +      "type": "array"
      +    },
      +    "name": {
      +      "maxLength": 64,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "operationId": {
      +      "type": "string"
      +    },
      +    "reserved": {
      +      "description": "Built-in roles cannot be changed or deleted.",
      +      "readOnly": true,
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "name",
      +    "cluster",
      +    "indices",
      +    "applications"
      +  ],
      +  "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 readOnlyHint, idempotentHint, non-destructive and closed-world, so the safety profile is covered. The description adds genuinely new behavioral detail the annotations cannot convey: the specific fields returned and the 404 outcome for an absent or hidden managed identity. The notion of a 'hidden managed identity' is left unexplained, which keeps it below a 5.

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?

The useful content (returned fields, readability of built-ins, 404 behavior) is front-loaded in two compact sentences. The opening line restates the tool name and title rather than adding information, a small but real redundancy.

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 a fully documented schema, an output schema covering return values, and annotations covering the safety profile, the description only needed to add error semantics — which it does via the 404 note. The unexplained 'hidden managed identity' phrase is the remaining small gap for a simple three-parameter read tool.

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 description coverage is 100%, so role, cluster and namespace are all documented in the schema, including the exact-name requirement and namespace resolution rules. The description adds no semantics beyond that baseline, which is the expected 3 when the schema does the heavy lifting.

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?

The description pairs a specific verb and resource with the exact scope it operates on: a single role definition obtained by name, sourced from elasticsearch_roles_list. Enumerating the returned fields (name, cluster, indices, applications, reserved status) makes it trivially distinguishable from the list sibling.

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?

It establishes the retrieval context by tying the input to a value previously returned by elasticsearch_roles_list, and notes that built-in permissions are readable. It stops short of an explicit when-not statement or a named alternative for other lookup paths, so it is clear context without full exclusion guidance.

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