Skip to main content
Glama

list_identities

Retrieve and filter identities in a Kubernetes cluster, including service accounts, users, and groups, using cluster IDs and pagination options for organized access.

Instructions

Get list of identities for a specific Kubernetes cluster

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cluster_idsNoCluster IDs to get identities for
identity_typesNoIdentity types to get
pageNoPage number to get. Default: 1
page_sizeNoPage size to get. Default: 10
qNoQuery to filter identities

Implementation Reference

  • The core handler function implementing the list_identities tool logic by querying the RAD Security API with provided filters.
    export async function listIdentities( client: RadSecurityClient, identityTypes: IdentityType[] = [], clusterIds: string[] = [], page: number = 1, page_size: number = 10, q: string = "", ): Promise<any> { const identities = await client.makeRequest( `/accounts/${client.getAccountId()}/identities`, { identity_types: identityTypes.join(","), identity_sources: clusterIds.join(","), page, page_size, q, } ); return identities; }
  • Zod input schema for validating arguments to the list_identities tool.
    export const ListIdentitiesSchema = z.object({ identity_types: z.array(IdentityTypeEnum).optional().describe("Identity types to get"), cluster_ids: z.array(z.string()).optional().describe("Cluster IDs to get identities for"), page: z.number().optional().describe("Page number to get. Default: 1"), page_size: z.number().optional().describe("Page size to get. Default: 10"), q: z.string().optional().describe("Query to filter identities"), });
  • src/index.ts:141-145 (registration)
    Tool registration in the MCP listTools request handler, defining name, description, and schema.
    { name: "list_identities", description: "Get list of identities for a specific Kubernetes cluster", inputSchema: zodToJsonSchema(identities.ListIdentitiesSchema), },
  • src/index.ts:437-442 (registration)
    Dispatch handler in the MCP CallToolRequest that parses arguments and invokes the listIdentities function.
    case "list_identities": { const args = identities.ListIdentitiesSchema.parse(request.params.arguments); const response = await identities.listIdentities(client, args.identity_types, args.cluster_ids, args.page, args.page_size, args.q); return { content: [{ type: "text", text: JSON.stringify(response, null, 2) }], };

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/rad-security/mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server