UNPKG

okta-mcp-server

Version:

Model Context Protocol (MCP) server for Okta API operations with support for bulk operations and caching

348 lines 14.6 kB
export const bulkTools = [ { name: 'bulkCreateUsers', description: 'Create multiple users in bulk with progress tracking and error handling. Supports CSV and JSON formats.', inputSchema: { type: 'object', properties: { format: { type: 'string', enum: ['json', 'csv'], description: 'Input format for user data', }, data: { type: 'string', description: 'User data in the specified format (JSON array or CSV string)', }, options: { type: 'object', properties: { batchSize: { type: 'number', description: 'Number of users to create in each batch (default: 10, max: 50)', default: 10, minimum: 1, maximum: 50, }, activate: { type: 'boolean', description: 'Whether to activate users immediately', default: true, }, dryRun: { type: 'boolean', description: 'Validate data without creating users', default: false, }, continueOnError: { type: 'boolean', description: 'Continue processing even if some users fail', default: true, }, csvMapping: { type: 'object', description: 'CSV column to Okta field mapping', properties: { email: { type: 'string', description: 'Column name for email' }, firstName: { type: 'string', description: 'Column name for firstName' }, lastName: { type: 'string', description: 'Column name for lastName' }, login: { type: 'string', description: 'Column name for login (optional)' }, mobilePhone: { type: 'string', description: 'Column name for mobilePhone (optional)', }, department: { type: 'string', description: 'Column name for department (optional)', }, title: { type: 'string', description: 'Column name for title (optional)' }, manager: { type: 'string', description: 'Column name for manager (optional)' }, customAttributes: { type: 'object', description: 'Map of custom attribute names to CSV columns', additionalProperties: { type: 'string' }, }, }, }, }, }, }, required: ['format', 'data'], }, }, { name: 'bulkUpdateUsers', description: 'Update multiple users in bulk based on various criteria', inputSchema: { type: 'object', properties: { updateMode: { type: 'string', enum: ['filter', 'list', 'csv'], description: 'How to identify users to update', }, filter: { type: 'string', description: 'Filter expression for users (when updateMode is "filter")', }, userIds: { type: 'array', items: { type: 'string' }, description: 'List of user IDs to update (when updateMode is "list")', }, csvData: { type: 'string', description: 'CSV data with user identifiers and fields to update (when updateMode is "csv")', }, updates: { type: 'object', description: 'Fields to update for all matching users (not used with CSV mode)', properties: { profile: { type: 'object', additionalProperties: true, description: 'Profile fields to update', }, credentials: { type: 'object', description: 'Credential updates', }, }, }, options: { type: 'object', properties: { batchSize: { type: 'number', description: 'Number of users to update in each batch', default: 10, minimum: 1, maximum: 50, }, dryRun: { type: 'boolean', description: 'Preview changes without applying them', default: false, }, continueOnError: { type: 'boolean', description: 'Continue processing even if some updates fail', default: true, }, csvMapping: { type: 'object', description: 'CSV column mappings (for CSV mode)', properties: { identifier: { type: 'string', description: 'Column containing user identifier (email or ID)', }, identifierType: { type: 'string', enum: ['email', 'id', 'login'], description: 'Type of identifier used', }, fields: { type: 'object', description: 'Map of Okta fields to CSV columns', additionalProperties: { type: 'string' }, }, }, }, }, }, }, required: ['updateMode'], }, }, { name: 'bulkDeleteUsers', description: 'Deactivate or delete multiple users with safety checks', inputSchema: { type: 'object', properties: { selectionMode: { type: 'string', enum: ['filter', 'list', 'csv'], description: 'How to select users for deletion', }, filter: { type: 'string', description: 'Filter expression for users (when selectionMode is "filter")', }, userIds: { type: 'array', items: { type: 'string' }, description: 'List of user IDs to delete (when selectionMode is "list")', }, csvData: { type: 'string', description: 'CSV data with user identifiers (when selectionMode is "csv")', }, action: { type: 'string', enum: ['deactivate', 'delete'], description: 'Whether to deactivate or permanently delete users', default: 'deactivate', }, options: { type: 'object', properties: { batchSize: { type: 'number', description: 'Number of users to process in each batch', default: 10, minimum: 1, maximum: 50, }, dryRun: { type: 'boolean', description: 'Preview affected users without deleting', default: true, }, requireConfirmation: { type: 'boolean', description: 'Require explicit confirmation for each batch', default: true, }, sendEmail: { type: 'boolean', description: 'Send deactivation email to users', default: false, }, csvMapping: { type: 'object', description: 'CSV column mapping (for CSV mode)', properties: { identifier: { type: 'string', description: 'Column containing user identifier', }, identifierType: { type: 'string', enum: ['email', 'id', 'login'], description: 'Type of identifier used', }, }, }, }, }, }, required: ['selectionMode', 'action'], }, }, { name: 'exportUsers', description: 'Export users to CSV or JSON format with filtering options', inputSchema: { type: 'object', properties: { format: { type: 'string', enum: ['csv', 'json'], description: 'Export format', }, filter: { type: 'string', description: 'Filter expression to select users for export', }, search: { type: 'string', description: 'Search query to find users', }, fields: { type: 'array', items: { type: 'string' }, description: 'List of fields to include in export (default: all standard fields)', default: [ 'id', 'status', 'created', 'activated', 'lastLogin', 'profile.email', 'profile.login', 'profile.firstName', 'profile.lastName', 'profile.mobilePhone', 'profile.department', 'profile.title', 'profile.manager', ], }, options: { type: 'object', properties: { includeGroups: { type: 'boolean', description: 'Include user group memberships', default: false, }, includeApps: { type: 'boolean', description: 'Include user app assignments', default: false, }, limit: { type: 'number', description: 'Maximum number of users to export (0 for all)', default: 0, }, filename: { type: 'string', description: 'Output filename (optional)', }, }, }, }, required: ['format'], }, }, { name: 'generateImportTemplate', description: 'Generate a template file for bulk user import', inputSchema: { type: 'object', properties: { format: { type: 'string', enum: ['csv', 'json'], description: 'Template format', }, includeOptionalFields: { type: 'boolean', description: 'Include optional fields in template', default: false, }, includeCustomAttributes: { type: 'array', items: { type: 'string' }, description: 'List of custom attribute names to include', }, sampleRows: { type: 'number', description: 'Number of sample rows to include', default: 3, minimum: 0, maximum: 10, }, }, required: ['format'], }, }, { name: 'getBulkOperationStatus', description: 'Get the status of an ongoing bulk operation', inputSchema: { type: 'object', properties: { operationId: { type: 'string', description: 'ID of the bulk operation', }, }, required: ['operationId'], }, }, ]; //# sourceMappingURL=definitions.js.map