UNPKG

okta-mcp-server

Version:

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

48 lines 1.65 kB
/** * System management tool handlers */ /** * Get read-only mode status */ export async function handleGetReadOnlyStatus(args, context) { try { const readOnlyMiddleware = context.get('readOnlyMiddleware'); const status = readOnlyMiddleware.getStatus(); const message = readOnlyMiddleware.getReadOnlyMessage(); return { content: [ { type: 'text', text: JSON.stringify({ message: 'Read-only mode status retrieved successfully', status: { readOnlyMode: status.readOnlyMode, message: message, allowedOperations: status.allowedOperations, blockedOperations: status.blockedOperations, summary: { totalAllowed: status.allowedOperations.length, totalBlocked: status.blockedOperations.length, }, }, }, null, 2), }, ], }; } catch (error) { return { content: [ { type: 'text', text: JSON.stringify({ message: 'Failed to get read-only status', error: error instanceof Error ? error.message : String(error), }, null, 2), }, ], isError: true, }; } } //# sourceMappingURL=handlers.js.map