get_identity_field_configuration
Retrieve identity field configuration for an organization, including preset fields, order, metadata, and available fields. Optionally specify an identity ID to get effective configuration for a specific identity.
Instructions
Get identity field configuration of an organization. Returns preset field configurations, field order, available fields, fields metadata, and field details. Optionally pass an identityId to get the effective configuration for a specific identity.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| identityId | No | Optional identity ID to get the effective configuration for a specific identity |
Implementation Reference
- Handler function that executes the tool logic. Gets an AdminaApiClient, converts params to URL query params, and makes a GET API call to /identity/configuration/configuration endpoint.
export async function getIdentityFieldConfiguration(params: GetIdentityFieldConfigurationParams) { const client = getClient(); const queryParams = filtersToParams(params); return client.makeApiCall("/identity/configuration/configuration", queryParams); } - Zod schema defining the input: an optional identityId string to get the effective configuration for a specific identity.
export const GetIdentityFieldConfigurationSchema = z.object({ identityId: z .string() .optional() .describe("Optional identity ID to get the effective configuration for a specific identity"), }); - src/index.ts:206-211 (registration)Tool registration in the listTools handler with name 'get_identity_field_configuration', description, and input schema.
{ name: "get_identity_field_configuration", description: "Get identity field configuration of an organization. Returns preset field configurations, field order, available fields, fields metadata, and field details. Optionally pass an identityId to get the effective configuration for a specific identity.", inputSchema: zodToJsonSchema(GetIdentityFieldConfigurationSchema), }, - src/index.ts:315-316 (registration)Tool handler mapping routing the 'get_identity_field_configuration' tool call to the getIdentityFieldConfiguration function with schema validation.
get_identity_field_configuration: async (input) => getIdentityFieldConfiguration(GetIdentityFieldConfigurationSchema.parse(input)), - src/common/helper.ts:1-19 (helper)Helper function filtersToParams that converts a Record of filter params into URLSearchParams, filtering out undefined/null/empty values.
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; }