get_identity_details
Retrieve detailed security information about specific identities in Kubernetes clusters to assess access permissions and potential risks.
Instructions
Get detailed information about a specific identity in a Kubernetes cluster
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| identity_id | Yes | Identity ID to get details for |
Implementation Reference
- src/operations/identities.ts:41-54 (handler)The main handler function that implements the core logic of the 'get_identity_details' tool by making an API request to the RAD Security backend to fetch details for the given identity ID.export async function getIdentityDetails( client: RadSecurityClient, identityId: string ): Promise<any> { const identity = await client.makeRequest( `/accounts/${client.getAccountId()}/identities/${identityId}` ); if (!identity) { throw new Error(`No identity found with ID: ${identityId}`); } return identity; }
- src/operations/identities.ts:15-17 (schema)Zod schema for input validation of the tool, requiring an 'identity_id' string parameter.export const GetIdentityDetailsSchema = z.object({ identity_id: z.string().describe("Identity ID to get details for"), });
- src/index.ts:172-176 (registration)Registration of the tool in the MCP server's listTools handler, defining its name, description, and input schema.name: "get_identity_details", description: "Get detailed information about a specific identity in a Kubernetes cluster", inputSchema: zodToJsonSchema(identities.GetIdentityDetailsSchema), },
- src/index.ts:802-815 (registration)Dispatch handler in the MCP server's CallToolRequest handler that validates input with the schema, invokes the tool handler, and returns the JSON response.case "get_identity_details": { const args = identities.GetIdentityDetailsSchema.parse( request.params.arguments ); const response = await identities.getIdentityDetails( client, args.identity_id ); return { content: [ { type: "text", text: JSON.stringify(response, null, 2) }, ], }; }