Skip to main content
Glama

get_group

Retrieve detailed information about a specific group in Okta by providing the group ID using this tool for user management and group-level insights.

Instructions

Get detailed information about a specific group

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
groupIdYesID of the group to retrieve

Implementation Reference

  • The main handler function for the 'get_group' tool. It validates the input using the Zod getGroup schema, fetches the specific group from the Okta API using oktaClient.groupApi.getGroup, formats the group details including ID, name, description, type, object class, and timestamps, and returns a formatted text response or an error message.
    get_group: async (request: { parameters: unknown }) => { const { groupId } = groupSchemas.getGroup.parse(request.parameters); try { const oktaClient = getOktaClient(); const group = await oktaClient.groupApi.getGroup({ groupId, }); if (!group || !group.profile) { return { content: [ { type: "text", text: `No group found with ID: ${groupId}`, }, ], }; } const formattedGroup = `Group Details: - ID: ${group.id} - Name: ${group.profile.name} - Description: ${getProfileValue(group.profile.description)} - Type: ${group.type || "Unknown"} - Object Class: ${formatArray(group.objectClass)} - Created: ${formatDate(group.created)} - Last Updated: ${formatDate(group.lastUpdated)} - Last Membership Updated: ${formatDate(group.lastMembershipUpdated)}`; return { content: [ { type: "text", text: formattedGroup, }, ], }; } catch (error) { console.error("Error getting group:", error); return { content: [ { type: "text", text: `Failed to get group: ${error instanceof Error ? error.message : String(error)}`, }, ], isError: true, }; } },
  • Zod schema definition for the get_group tool input validation, requiring a non-empty groupId string.
    getGroup: z.object({ groupId: z.string().min(1, "Group ID is required"), }),
  • Tool registration entry for 'get_group' in the exported groupTools array, defining the tool name, description, and JSON Schema for input validation (groupId required).
    { name: "get_group", description: "Get detailed information about a specific group", inputSchema: { type: "object", properties: { groupId: { type: "string", description: "ID of the group to retrieve", }, }, required: ["groupId"], }, },

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/kapilduraphe/okta-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server