check_identity_management_type
Check identity management type by email or identity ID. Returns whether the identity is HR master, manual, or unregistered.
Instructions
Check Identity management type. Use this endpoint to determine the management type for an identity based on email or identityId. Returns the management type (e.g., hr_master, manual, unregistered).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| No | Email of the new Identity to check | ||
| identityId | No | Identity Id to be checked |
Implementation Reference
- The main handler function that executes the tool logic. It gets an API client, converts params to query params via filtersToParams, and calls /identity/check endpoint.
export async function checkIdentityManagementType(params: CheckIdentityManagementTypeParams) { const client = getClient(); const queryParams = filtersToParams(params); return client.makeApiCall("/identity/check", queryParams); } - Zod schema defining input parameters: email (optional email string) and identityId (optional string) for checking identity management type.
export const CheckIdentityManagementTypeSchema = z.object({ email: z.string().email().optional().describe("Email of the new Identity to check"), identityId: z.string().optional().describe("Identity Id to be checked"), }); - src/index.ts:224-229 (registration)Tool registration in ListToolsRequestSchema handler, defining the tool name 'check_identity_management_type', its description, and input schema.
{ name: "check_identity_management_type", description: "Check Identity management type. Use this endpoint to determine the management type for an identity based on email or identityId. Returns the management type (e.g., hr_master, manual, unregistered).", inputSchema: zodToJsonSchema(CheckIdentityManagementTypeSchema), }, - src/index.ts:319-320 (registration)Tool handler registration in toolHandlers map, mapping 'check_identity_management_type' to checkIdentityManagementType with schema parsing.
check_identity_management_type: async (input) => checkIdentityManagementType(CheckIdentityManagementTypeSchema.parse(input)), - src/common/helper.ts:1-19 (helper)filtersToParams utility function used by the handler to convert filter objects to URLSearchParams for the API call.
export function filtersToParams(filters: Record<string, any>): URLSearchParams { const queryParams = new URLSearchParams(); Object.entries(filters).forEach(([key, value]) => { if (value !== undefined && value !== null && !(Array.isArray(value) && value.length === 0)) { if (Array.isArray(value) && value.length > 0) { // Append each array value separately to generate format: key=value1&key=value2 value.forEach((item) => { queryParams.append(key, String(item)); }); } else if (typeof value === "boolean") { queryParams.append(key, value.toString()); } else { queryParams.append(key, String(value)); } } }); return queryParams; }