Skip to main content
Glama
pingidentity

PingOne Advanced Identity Cloud MCP Server

Official
by pingidentity

Set Default Journey

setDefaultJourney
Idempotent

Set the default authentication journey for a realm, used when no specific journey is requested during authentication.

Instructions

Set the default authentication journey for a realm. This journey will be used when no specific journey is requested during authentication.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
realmYesThe realm to configure
journeyNameYesThe name of the journey to set as default

Implementation Reference

  • The main tool definition and handler function for 'setDefaultJourney'. It exports setDefaultJourneyTool with name 'setDefaultJourney', defines input schema (realm and journeyName), and implements the logic: GET current auth config to preserve adminAuthModule, then PUT the updated config with the new default journey (orgConfig). Returns a success result or error.
    export const setDefaultJourneyTool = {
      name: 'setDefaultJourney',
      title: 'Set Default Journey',
      description:
        'Set the default authentication journey for a realm. This journey will be used when no specific journey is requested during authentication.',
      scopes: SCOPES,
      annotations: {
        destructiveHint: false,
        idempotentHint: true,
        openWorldHint: true
      },
      inputSchema: {
        realm: z.enum(REALMS).describe('The realm to configure'),
        journeyName: safePathSegmentSchema.describe('The name of the journey to set as default')
      },
      async toolFunction({ realm, journeyName }: { realm: string; journeyName: string }) {
        try {
          const authConfigUrl = buildAMRealmUrl(realm, 'realm-config/authentication');
    
          // First, GET the current config to preserve adminAuthModule
          const { data: currentConfig } = await makeAuthenticatedRequest(authConfigUrl, SCOPES, {
            method: 'GET',
            headers: AUTH_CONFIG_HEADERS
          });
    
          const configData = currentConfig as any;
          const adminAuthModule = configData?.core?.adminAuthModule || 'Login';
    
          // PUT the updated config
          const { response } = await makeAuthenticatedRequest(authConfigUrl, SCOPES, {
            method: 'PUT',
            headers: AUTH_CONFIG_HEADERS,
            body: JSON.stringify({
              orgConfig: journeyName,
              adminAuthModule: adminAuthModule
            })
          });
    
          const result = {
            success: true,
            realm,
            defaultJourney: journeyName,
            message: `Default journey for realm "${realm}" set to "${journeyName}"`
          };
    
          return createToolResponse(formatSuccess(result, response));
        } catch (error: any) {
          const category = categorizeError(error.message);
          return createToolResponse(`Failed to set default journey [${category}]: ${error.message}`);
        }
      }
    };
  • Input schema for the setDefaultJourney tool: realm (enum of REALMS) and journeyName (safe path segment).
    inputSchema: {
      realm: z.enum(REALMS).describe('The realm to configure'),
      journeyName: safePathSegmentSchema.describe('The name of the journey to set as default')
    },
  • Re-exports setDefaultJourneyTool from the AM tools index, making it available for registration with the MCP server.
    export { setDefaultJourneyTool } from './setDefaultJourney.js';
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already indicate non-destructive, idempotent, and open-world behavior. The description adds useful context that the default journey affects authentication when no specific journey is requested, which is beyond the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise: two sentences with no redundant words. It is front-loaded with the main action and purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the low complexity (2 parameters, no output schema) and rich annotations, the description is largely complete. It could mention the idempotent nature implied by annotations, but no critical gaps exist.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with both parameters having descriptions. The description does not add additional meaning beyond what the schema already provides, so baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('set'), resource ('default authentication journey for a realm'), and context ('when no specific journey is requested'). It distinguishes from sibling tools like createJourney or setDefaultTheme by specifying the precise behavior.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description does not provide guidance on when to use this tool versus alternatives (e.g., createJourney, updateJourney). No explicit when/when-not conditions or prerequisites are mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/pingidentity/aic-mcp-server'

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