Agents

MCP tools reference

All 113 ulex MCP tools in one table — tool name, purpose, required arguments, return shape, and idempotency — plus full JSON schemas, example arguments, and example results for the 20 tools an agent reaches for first.

113 tools over Streamable HTTP. Every tool takes environment implicitly from the credential — there is no environment argument on any of them.

Note

Idempotency column: yes = safe to repeat. keyed = safe if you pass idempotency_key (or the natural key is already unique). no = every call produces a new side effect; do not retry blindly.

#Transport and auth

Streamable HTTPPOST /api/v1/mcp, GET /api/v1/mcp (SSE), DELETE /api/v1/mcp (terminate session)
stdioulex mcp serve — same tool manifest, for local harnesses
OAuth 2.1RFC 9728 metadata at GET /api/v1/.well-known/oauth-protected-resource
Static tokenAuthorization: Bearer ulex_sk_live_…
Protocol2025-06-18; echo MCP-Protocol-Version; carry Mcp-Session-Id

Raw transcript: quickstart, Path D.


#Bootstrap / lifecycle

ToolPurposeRequired argsReturnsIdem.
ulex_quickstartReturn a ready-to-execute plan: which tools, in which order, with arguments—{ plan[], environment, credential_present, tool_count }yes
ulex_create_tenantCreate an isolated tenantname, slugtenantkeyed
ulex_get_tenantRead the current tenant and compliance flags—{ tenant, compliance }yes
ulex_bootstrap_appOne shot: application + organization + domain + connection + admin user + membership + group + directory + webhookapplication_name, organization_nameapplication, client_secret, organization, domain, connection, user, membership, directory, scim_bearer_token, webhook, environmentkeyed
ulex_reset_tenantDelete every resource in the tenantconfirm{ deleted{…}, kept_api_keys }yes

#Applications

ToolPurposeRequired argsReturnsIdem.
ulex_create_applicationRegister an OIDC/SAML clientname, slugapplicationkeyed
ulex_list_applicationsPage through clients—{ data[], has_more, next_cursor }yes
ulex_get_applicationRead one clientapplication_idapplicationyes
ulex_update_applicationPatch one clientapplication_id + ≥1 fieldapplicationyes
ulex_delete_applicationSoft-delete a clientapplication_id{ id, deleted: true }yes
ulex_get_application_credentialsRead client_id / client_secretapplication_id{ client_id, client_secret, token_endpoint_auth_method, issued_at }yes
ulex_rotate_application_secretMint a new secret, keep the old one valid for a grace windowapplication_id, grace_period_seconds?{ client_id, client_secret, previous_secret_expires_at, grace_period_seconds }no
ulex_get_saml_sp_metadataSP metadata XML for ulex as the service providerapplication_id{ metadata_xml, entity_id, acs_url, slo_url }yes
ulex_get_oidc_discoveryThe ulex OIDC discovery documentapplication_id?discoveryyes

#Organizations

ToolPurposeRequired argsReturnsIdem.
ulex_create_organizationCreate a customer orgname, slugorganizationkeyed
ulex_list_organizationsPage through orgs—{ data[], has_more, next_cursor }yes
ulex_get_organizationRead one orgorganization_idorganizationyes
ulex_update_organizationPatch one orgorganization_id + ≥1 fieldorganizationyes
ulex_delete_organizationSoft-delete an orgorganization_id{ id, deleted: true }yes
ulex_add_domainAttach a domain to an orgorganization_id, domaindomainkeyed
ulex_verify_domainVerify a domaindomain_iddomainyes
ulex_list_domainsList an org's domainsorganization_id{ data[] }yes
ulex_remove_domainDetach a domain from its orgdomain_id{ deleted_id, name }yes

#Users and groups

ToolPurposeRequired argsReturnsIdem.
ulex_create_userCreate a tenant-global useremailuserkeyed
ulex_list_usersPage through users; filter by organization_id, email, status—{ data[], has_more, next_cursor }yes
ulex_get_userRead one useruser_iduseryes
ulex_update_userPatch one useruser_id + ≥1 fielduseryes
ulex_delete_userSoft-delete a useruser_id{ id, deleted: true }yes
ulex_suspend_userSet status: suspended, revoke sessionsuser_id, reason?useryes
ulex_unsuspend_userRestore to status: activeuser_iduserno
ulex_add_organization_memberCreate or update a membershiporganization_id, user_idorganization_membershipyes
ulex_remove_organization_memberDelete a membershiporganization_id, user_id{ id, deleted: true }yes
ulex_list_organization_membersList an org's membersorganization_id{ data[], has_more, next_cursor }yes
ulex_create_groupCreate a group inside an orgorganization_id, name, sluggroupkeyed
ulex_list_groupsList an org's groupsorganization_id{ data[], has_more, next_cursor }yes
ulex_set_group_membersReplace group membership wholesalegroup_id, user_idsgroupyes

#Connections

ToolPurposeRequired argsReturnsIdem.
ulex_create_connectionCreate a connectionname, config.strategyconnectionkeyed
ulex_list_connectionsList; filter organization_id, strategy, state—{ data[], has_more, next_cursor }yes
ulex_get_connectionRead one connection, secrets redactedconnection_idconnectionyes
ulex_activate_connectiondraft/inactive → activeconnection_idconnectionyes
ulex_delete_connectionSoft-delete a connectionconnection_id{ id, deleted: true }yes
ulex_verify_connectionFetch and validate OIDC discovery, or parse the SAML certificate and probe its SSO URL. Activates on successconnection_id{ connection_id, strategy, valid, state, checks[], next_step }yes
ulex_get_saml_idp_metadataThe connection's IdP metadata XMLconnection_id{ metadata_xml, entity_id, sso_url, x509_certificate }yes
ulex_get_saml_login_urlBuild a SP-initiated AuthnRequest URLconnection_id, relay_state?, redirect_uri?{ url, request_id, expires_at }no

#Directories and SCIM

ToolPurposeRequired argsReturnsIdem.
ulex_create_directoryRegister an upstream directoryname, provider, domaindirectorykeyed
ulex_list_directoriesList directories—{ data[], has_more, next_cursor }yes
ulex_sync_directoryTrigger a poll of the upstream directorydirectory_iddirectory_sync (state pending)no
ulex_get_sync_statusPoll a sync rundirectory_id, sync_iddirectory_syncyes
ulex_get_scim_configurationThe SCIM config you would paste into Okta/Entradirectory_id{ base_url, bearer_token, inbound_scim_enabled, poll_interval_seconds, user_filter, group_filter }yes
ulex_provision_scim_userPush one user inbound over SCIMdirectory_id, user_name, emailuserkeyed
ulex_deprovision_scim_userDeactivate or delete one user inbounddirectory_id, user_iduserno

#Auth and tokens

ToolPurposeRequired argsReturnsIdem.
ulex_get_authorization_urlBuild a /oauth2/authorize URL with PKCEapplication_id, redirect_uri{ url, state, nonce, code_challenge, code_challenge_method }no
ulex_exchange_code_for_tokensTrade an authorization code for tokensapplication_id, code, redirect_uri, client_secret?{ access_token, token_type, expires_in, refresh_token, id_token, scope }no
ulex_refresh_tokensRotate a refresh tokenrefresh_token, application_id?, client_secret?{ access_token, refresh_token, expires_in }no
ulex_revoke_tokensRevoke an access or refresh tokentoken{ revoked: true }yes
ulex_introspect_tokenRFC 7662 introspectiontoken{ active, scope, sub, org_id, sid, exp, … }yes
ulex_get_userinfoOIDC /userinfo claimsaccess_token?userinfoyes
ulex_mint_access_tokenForge a token for a user with no login. Requires allow_mocks: true or local modeuser_id, application_id?{ access_token, expires_in, claims }no

#Simulation

ToolPurposeRequired argsReturnsIdem.
ulex_simulate_loginDrive a full SSO login server-side, no browserapplication_id, email{ session_id, grant_id, code, authorization_url, code_expires_at, amr, acr, outcome, stage }no
ulex_simulate_mfaArm or satisfy an MFA challengemode (challenge|satisfy|fail), email?/user_id?{ challenge_id, method, methods, satisfied, amr }no
ulex_simulate_failureForce a specific error code on the next loginmode, application_id?, email?{ armed, mode, next_error }no
ulex_reset_simulationClear armed failures and challengesscope? (tenant|connection|user){ reset: true, scope }yes

mode for ulex_simulate_failure: invalid_credentials, user_not_found, mfa_required, account_locked, connection_error, upstream_timeout, saml_signature_invalid, scim_conflict.

#Deployments

ToolPurposeRequired argsReturnsIdem.
ulex_deployStart a simulated deploymentapplication_id, environmentdeployment (state queued)keyed
ulex_get_deploymentRead a deployment and its stepsdeployment_iddeploymentyes
ulex_list_deploymentsList deployments; filter application_id, state—{ data[], has_more, next_cursor }yes
ulex_cancel_deploymentCancel a non-terminal deploymentdeployment_iddeploymentyes
ulex_rollback_deploymentRoll back to a previous deploymentdeployment_id, to_deployment_id?deployment (state rolled_back)no
ulex_get_deployment_logsStructured, redacted step logsdeployment_id, step?, tail?{ steps[], lines[] }yes
ulex_list_environmentsActive control-plane host and health—{ data[], health }yes
ulex_get_environment_healthDeep health for one environmentenvironment{ environment, status, checks[], region, version }yes

#Operations

ToolPurposeRequired argsReturnsIdem.
ulex_create_webhookRegister an endpoint; returns secret onceurl, events[]{ webhook, secret }keyed
ulex_list_webhooksList endpoints—{ data[], has_more, next_cursor }yes
ulex_send_test_webhookSend a synthetic deliverywebhook_id, event?webhook_deliveryno
ulex_list_webhook_deliveriesDelivery attempts for an endpointwebhook_id, limit?{ data[], has_more, next_cursor }yes
ulex_get_webhook_deliveryOne delivery, with response bodydelivery_idwebhook_deliveryyes
ulex_search_audit_logsQuery the immutable audit log— (all filters optional){ data[], has_more, next_cursor, chain_head }yes
ulex_get_audit_eventOne audit event plus its chain linkaudit_event_id{ audit_event, chain }yes
ulex_verify_audit_chainRecompute every entry_hash over a window—{ valid, checked, broken_at_sequence, reason, truncated, chain_head }yes
ulex_submit_feedbackReport a platform error, bug, or feature request; credentials redacted, screenshots to S3title, description{ feedback, id, status: new }no
ulex_list_feedbackList your reports, newest first, with triage status— (all filters optional){ data[], total, count }yes
ulex_get_feedbackOne report with triage status and staff responsefeedback_id{ feedback }yes
ulex_create_api_keyMint a control-plane key; plaintext oncename, scope[]{ api_key, key }keyed
ulex_list_api_keysList keys, prefixes only—{ data[], has_more, next_cursor }yes
ulex_revoke_api_keyRevoke a keyapi_key_idapi_keyyes
ulex_get_statusAggregate service status—{ status, environment, version, region, degradations[] }yes
ulex_health_checkLiveness + dependency checks—{ healthy, checks[], uptime_seconds }yes
ulex_get_usageRead informational resource counts—{ usage, plan_limits_enforced: false }yes
ulex_get_auth_policyThe tenant's authentication policy, with set[] flags and the inert fields named—{ policy, configured, not_enforced[], next_step }yes
ulex_update_auth_policyChange password, session, MFA or IP-block policy; omitted blocks untouchedany of password, session, mfa, blocked_ip_ranges{ policy, changed[], not_enforced[] }yes
ulex_get_docsFetch a docs page by path or topicpath? or topic?{ title, path, markdown }yes
ulex_explain_errorDecode any error codecode{ type, status, message, causes[], fixes[], docs_url, retryable }yes
ulex_list_toolsThe live tool manifest with schemas—{ tools[], count, server_version }yes
ulex_describe_environmentThe credential's environment, limits, and what is enabled—{ environment, host, features, limits, simulator_enabled }yes

#Detailed reference — the tools you will actually use

#1. ulex_list_tools

Read this first if your client did not ship a schema snapshot. It returns every tool with its full JSON Schema, so you never have to guess an argument name.

json
{ "name": "ulex_list_tools", "arguments": { "include_schemas": true, "filter": "user" } }
json
{
  "tools": [
    {
      "name": "ulex_create_user",
      "description": "Create a tenant-global user. Users are not scoped to an organization; use ulex_add_organization_member for that.",
      "inputSchema": {
        "type": "object",
        "required": ["email"],
        "additionalProperties": false,
        "properties": {
          "email": { "type": "string", "format": "email", "maxLength": 320 },
          "email_verified": { "type": "boolean", "default": false },
          "first_name": { "type": "string", "maxLength": 80, "nullable": true },
          "last_name": { "type": "string", "maxLength": 80, "nullable": true },
          "display_name": { "type": "string", "maxLength": 160, "nullable": true },
          "external_id": { "type": "string", "maxLength": 255, "nullable": true },
          "job_title": { "type": "string", "maxLength": 120, "nullable": true },
          "department": { "type": "string", "maxLength": 120, "nullable": true },
          "status": { "enum": ["active", "inactive", "suspended", "pending"], "default": "active" },
          "metadata": { "type": "object", "additionalProperties": { "type": ["string", "number", "boolean", "null"] } },
          "idempotency_key": { "type": "string", "maxLength": 64 }
        }
      }
    }
  ],
  "count": 113,
  "server_version": "2025.9.1"
}

filter matches against name and description (ulex_, scim_, saml_, deploy). Omit it for everything.


#2. ulex_quickstart

The cheapest possible first call. It writes nothing. It returns a plan, tells you what your credential can do, and tells you what it cannot.

json
{ "name": "ulex_quickstart", "arguments": { "goal": "sso" } }

goal ∈ sso (default), scim, multi_tenant, full.

json
{
  "environment": "prod",
  "credential_present": true,
  "scopes": ["mcp:tools", "read:organizations", "write:organizations", "read:users", "write:users"],
  "plan": [
    { "step": 1, "tool": "ulex_bootstrap_app", "why": "Creates application, organization, connection, admin user and credentials in one call." },
    { "step": 2, "tool": "ulex_simulate_login", "why": "Headless SSO. Returns a real authorization code." },
    { "step": 3, "tool": "ulex_exchange_code_for_tokens", "why": "Turns the code into a real RS256 access token." },
    { "step": 4, "tool": "ulex_introspect_token", "why": "Proves the token is active and bound to the right org." },
    { "step": 5, "tool": "ulex_search_audit_logs", "why": "Evidence for the report." }
  ],
  "tool_count": 113,
  "simulator_endpoints_enabled": true
}

#3. ulex_bootstrap_app

The headline tool. One call, eight resources, fully idempotent on (application_name, organization_domain).

json
{
  "name": "ulex_bootstrap_app",
  "arguments": {
    "application_name": "Acme Support",
    "organization_name": "Acme Corp",
    "organization_domain": "acme.example",
    "admin_email": "dana@acme.example",
    "admin_first_name": "Dana",
    "admin_last_name": "Okafor",
    "connection_strategy": "mock_sso",
    "connection_name": "Acme SSO",
    "sso_only": true,
    "scim_provider": "ulex_mock",
    "webhook_url": "https://hooks.example.com/ulex",
    "webhook_events": ["user.created", "user.deleted", "session.created"],
    "idempotency_key": "1f4c9e2a-3b7d-4a1e-9c58-0f2a6b3d81cc"
  }
}
json
{
  "application": {
    "id": "app_01M3PSV7J8TBSPHG95CYSEX32B",
    "object": "application",
    "name": "Acme Support",
    "slug": "acme-support",
    "type": "first_party",
    "client_id": "client_01M3PSV7J8TBSPHG95CYSEX32B",
    "require_pkce": true,
    "pkce_methods": ["S256"],
    "cross_app_sso_enabled": true,
    "cookie_domain": ".ulexid.com",
    "default_locale": "en",
    "created_at": "2026-09-29T14:42:05.000Z"
  },
  "client_secret": "cs_9fKq2WmB7yLt4NxZ1pRc6HdE0sJg3AuV8",
  "organization": {
    "id": "org_01M3PSV8HGTKQFCAYF9GDWGN3C",
    "object": "organization",
    "name": "Acme Corp",
    "slug": "acme",
    "sso_only": true,
    "connection_id": "con_01M3PSVAG0QFJG99R0M5DXSR5A"
  },
  "domain": {
    "id": "dom_01M3PSVCEGK9H35GZJK25HN08D",
    "object": "domain",
    "name": "acme.example",
    "state": "verified",
    "verified_at": "2026-09-29T14:42:10.000Z"
  },
  "connection": {
    "id": "con_01M3PSVAG0QFJG99R0M5DXSR5A",
    "object": "connection",
    "name": "Acme SSO",
    "state": "active",
    "config": { "strategy": "mock_sso" },
    "domains": ["acme.example"],
    "domains_state": "verified"
  },
  "user": {
    "id": "usr_01M3PSV9GRT8GQGEG686AR1W9S",
    "object": "user",
    "email": "dana@acme.example",
    "email_verified": true,
    "first_name": "Dana",
    "last_name": "Okafor",
    "display_name": "Dana Okafor",
    "status": "active"
  },
  "membership": {
    "id": "mem_01M3PSVDDRC5YN00BRZ8E7CNMT",
    "object": "organization_membership",
    "organization_id": "org_01M3PSV8HGTKQFCAYF9GDWGN3C",
    "user_id": "usr_01M3PSV9GRT8GQGEG686AR1W9S",
    "role": "owner",
    "group_ids": ["grp_01M3PSVED0M9RJTYH5AC72C253"]
  },
  "directory": {
    "id": "dir_01M3PSVBF8038RK2MW2N263Q2B",
    "object": "directory",
    "provider": "ulex_mock",
    "state": "active",
    "scim_base_url": "https://ulexid.com/api/v1/scim/v2",
    "inbound_scim_enabled": true
  },
  "scim_bearer_token": "scim_7Bq4Nxf2Vk9Lc3MdT6hR8wS1yP5aG0eJ",
  "webhook": {
    "id": "whk_01M3PSVK981SXWGKG9JXHC1P0Y",
    "object": "webhook",
    "url": "https://hooks.example.com/ulex",
    "status": "enabled",
    "secret_prefix": "whsec_3Kq9"
  },
  "environment": "prod",
  "warnings": [
    "client_secret and scim_bearer_token are returned once and are not retrievable. Persist them now."
  ]
}
Warning

admin_email must be inside organization_domain or you will get cross_domain_admin as a warning and a pending email_verified. That is not an error; it is a nudge to use a real corporate address.


#4. ulex_create_application

json
{
  "name": "ulex_create_application",
  "arguments": {
    "name": "Acme Support",
    "slug": "acme-support",
    "type": "first_party",
    "description": "Customer support console for Acme",
    "redirect_uris": ["https://app.example.com/auth/callback", "http://localhost:3000/auth/callback"],
    "grant_types": ["authorization_code", "refresh_token"],
    "response_types": ["code"],
    "response_mode": "form_post",
    "token_endpoint_auth_method": "client_secret_post",
    "require_pkce": true,
    "pkce_methods": ["S256"],
    "cross_app_sso_enabled": true,
    "cookie_domain": ".ulexid.com",
    "branding": { "primary_color": "#4f46e5", "logo_url": "https://app.example.com/logo.png", "app_name": "Acme Support" },
    "default_locale": "en",
    "idempotency_key": "1f4c9e2a-3b7d-4a1e-9c58-0f2a6b3d81cc"
  }
}
json
{
  "id": "app_01M3PSV7J8TBSPHG95CYSEX32B",
  "object": "application",
  "name": "Acme Support",
  "slug": "acme-support",
  "type": "first_party",
  "description": "Customer support console for Acme",
  "redirect_uris": ["https://app.example.com/auth/callback", "http://localhost:3000/auth/callback"],
  "grant_types": ["authorization_code", "refresh_token"],
  "response_types": ["code"],
  "response_mode": "form_post",
  "token_endpoint_auth_method": "client_secret_post",
  "require_pkce": true,
  "pkce_methods": ["S256"],
  "grant_access_to_organization": false,
  "organization_usage": "allow",
  "oidc_conformant": true,
  "sign_in_with_email_enabled": true,
  "sign_in_with_social_enabled": false,
  "sign_up_enabled": true,
  "cookie_domain": ".ulexid.com",
  "cross_app_sso_enabled": true,
  "cross_app_sso_redirect_urls": [],
  "branding": { "primary_color": "#4f46e5", "background_color": "#ffffff", "logo_url": "https://app.example.com/logo.png", "app_name": "Acme Support" },
  "default_locale": "en",
  "created_at": "2026-09-29T14:42:05.000Z",
  "updated_at": "2026-09-29T14:42:05.000Z"
}

Notes: redirect_uris accepts http:// only for localhost, 127.0.0.1, ::1. response_types other than code require response_mode: form_post and a nonce. id_token-only is rejected unless tenant.allow_mocks is true.


#5. ulex_get_application_credentials

json
{ "name": "ulex_get_application_credentials", "arguments": { "application_id": "app_01M3PSV7J8TBSPHG95CYSEX32B" } }
json
{
  "client_id": "client_01M3PSV7J8TBSPHG95CYSEX32B",
  "client_secret": "cs_9fKq2WmB7yLt4NxZ1pRc6HdE0sJg3AuV8",
  "token_endpoint_auth_method": "client_secret_post",
  "authorization_endpoint": "https://ulexid.com/api/v1/oauth2/authorize",
  "token_endpoint": "https://ulexid.com/api/v1/oauth2/token",
  "userinfo_endpoint": "https://ulexid.com/api/v1/oauth2/userinfo",
  "jwks_uri": "https://ulexid.com/api/v1/oauth2/keys",
  "introspection_endpoint": "https://ulexid.com/api/v1/oauth2/introspect",
  "revocation_endpoint": "https://ulexid.com/api/v1/oauth2/revoke",
  "scim_base_url": "https://ulexid.com/api/v1/scim/v2",
  "saml_sp_metadata_url": "https://ulexid.com/api/v1/applications/app_01M3PSV7J8TBSPHG95CYSEX32B/metadata",
  "hosted_login_url": "https://ulexid.com/auth/app_01M3PSV7J8TBSPHG95CYSEX32B",
  "issued_at": "2026-09-29T14:42:05.000Z"
}

The client_secret is stored encrypted. This call decrypts it for the tenant-admin scope only. A non-admin key gets 403 insufficient_scope.


#6. ulex_create_organization

json
{
  "name": "ulex_create_organization",
  "arguments": {
    "name": "Acme Corp",
    "slug": "acme",
    "logo_url": "https://cdn.example.com/acme.png",
    "sso_only": true,
    "allow_profiles_outside_organization": false,
    "metadata": { "plan_tier": "enterprise", "csm": "dana@acme.example" },
    "idempotency_key": "1f4c9e2a-3b7d-4a1e-9c58-0f2a6b3d81cc"
  }
}
json
{
  "id": "org_01M3PSV8HGTKQFCAYF9GDWGN3C",
  "object": "organization",
  "name": "Acme Corp",
  "slug": "acme",
  "logo_url": "https://cdn.example.com/acme.png",
  "directory_id": null,
  "connection_id": "con_01M3PSVAG0QFJG99R0M5DXSR5A",
  "sso_only": true,
  "allow_profiles_outside_organization": false,
  "default_connection_id": "con_01M3PSVAG0QFJG99R0M5DXSR5A",
  "metadata": { "plan_tier": "enterprise", "csm": "dana@acme.example" },
  "created_at": "2026-09-29T14:42:06.000Z",
  "updated_at": "2026-09-29T14:42:06.000Z"
}

slug is ^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$, 2–63 chars, unique per tenant. A collision returns 409 resource_exists with details: { slug: "already taken" }.


#7. ulex_add_domain and ulex_verify_domain

json
{ "name": "ulex_add_domain", "arguments": {
  "organization_id": "org_01M3PSV8HGTKQFCAYF9GDWGN3C",
  "domain": "acme.example",
  "verification_strategy": "dns"
} }
json
{
  "id": "dom_01M3PSVCEGK9H35GZJK25HN08D",
  "object": "domain",
  "organization_id": "org_01M3PSV8HGTKQFCAYF9GDWGN3C",
  "name": "acme.example",
  "state": "pending",
  "verification_token": "ulex-verify-9f3b7c1a4d8e2f60a5b9c3d7e1f48260",
  "verification_strategy": "dns",
  "dns_records": [
    {
      "type": "TXT",
      "name": "_ulex-challenge.acme.example",
      "value": "ulex-verify-9f3b7c1a4d8e2f60a5b9c3d7e1f48260",
      "ttl": 3600,
      "purpose": "Domain ownership verification (RFC 8555 style challenge)"
    }
  ],
  "created_at": "2026-09-29T14:42:10.000Z"
}
json
{ "name": "ulex_verify_domain", "arguments": {
  "organization_id": "org_01M3PSV8HGTKQFCAYF9GDWGN3C",
  "domain_id": "dom_01M3PSVCEGK9H35GZJK25HN08D"
} }
json
{
  "id": "dom_01M3PSVCEGK9H35GZJK25HN08D",
  "object": "domain",
  "organization_id": "org_01M3PSV8HGTKQFCAYF9GDWGN3C",
  "name": "acme.example",
  "state": "verified",
  "verification_strategy": "dns",
  "verified_at": "2026-09-29T14:42:10.000Z"
}

When tenant.allow_mocks is true (or on the local in-memory server), verification succeeds immediately. Otherwise with verification_strategy: "dns", publish the TXT record first; otherwise you get 412 domain_not_verified with retryable: false and hint: "Publish the TXT record at _ulex-challenge.<domain> and retry."


#8. ulex_create_connection

json
{
  "name": "ulex_create_connection",
  "arguments": {
    "name": "Acme SSO",
    "organization_id": "org_01M3PSV8HGTKQFCAYF9GDWGN3C",
    "domains": ["acme.example"],
    "config": {
      "strategy": "mock_sso",
      "mock": {
        "seed_users": [
          {
            "email": "dana@acme.example",
            "first_name": "Dana",
            "last_name": "Okafor",
            "job_title": "Support Lead",
            "department": "Customer Success",
            "groups": ["engineering"],
            "mfa_enrolled": false,
            "status": "active"
          }
        ],
        "force_failure": false,
        "latency_ms": 0
      }
    },
    "idempotency_key": "1f4c9e2a-3b7d-4a1e-9c58-0f2a6b3d81cc"
  }
}
json
{
  "id": "con_01M3PSVAG0QFJG99R0M5DXSR5A",
  "object": "connection",
  "name": "Acme SSO",
  "state": "draft",
  "organization_id": "org_01M3PSV8HGTKQFCAYF9GDWGN3C",
  "config": { "strategy": "mock_sso", "mock": { "seed_users": [{ "email": "dana@acme.example" }], "force_failure": false, "latency_ms": 0 } },
  "domains": ["acme.example"],
  "domains_state": "pending",
  "organization_ids": ["org_01M3PSV8HGTKQFCAYF9GDWGN3C"],
  "directory_ids": [],
  "discovery": { "authorization_endpoint": null, "token_endpoint": null, "userinfo_endpoint": null, "jwks_uri": null, "issuer": null, "fetched_at": null, "error": null },
  "last_auth_at": null,
  "last_auth_result": null,
  "last_auth_error": null,
  "created_at": "2026-09-29T14:42:08.000Z",
  "updated_at": "2026-09-29T14:42:08.000Z"
}

OIDC example — config.oidc is where all upstream OIDC lives:

json
{
  "name": "ulex_create_connection",
  "arguments": {
    "name": "Okta Acme",
    "config": {
      "strategy": "okta_oidc",
      "oidc": {
        "issuer": "https://acme.okta.com/oauth2/default",
        "client_id": "0oa3kq9x2mB7cVd1Rf6sT4pW8L",
        "client_secret": "env:ULEX_TEST_OKTA_SECRET",
        "scopes": ["openid", "profile", "email", "groups"],
        "allowed_domains": ["acme.example"],
        "require_jit_provisioning": false,
        "jit_default_role": "member",
        "attribute_mapping": { "email": "email", "groups": "groups", "external_id": "sub" }
      }
    }
  }
}
Warning

Any *_encrypted or secret-shaped argument accepts the env:VAR_NAME form. ulex reads the value from its own environment at request time and never persists the literal. Use it for anything that is not a mock_sso fixture. See Secret handling.


#9. ulex_activate_connection

json
{ "name": "ulex_activate_connection", "arguments": { "connection_id": "con_01M3PSVAG0QFJG99R0M5DXSR5A" } }
json
{
  "id": "con_01M3PSVAG0QFJG99R0M5DXSR5A",
  "object": "connection",
  "name": "Acme SSO",
  "state": "active",
  "domains": ["acme.example"],
  "domains_state": "verified",
  "last_auth_result": null,
  "updated_at": "2026-09-29T14:42:08.000Z"
}

Activation is rejected with 409 invalid_state_transition if any domain is unverified, or if the strategy is saml and the certificate has expired. POST /connections/{id}/activate on an already-active connection is a no-op returning the same object.


#10. ulex_simulate_login

The tool that replaces a browser. It performs the same authorization transaction the hosted UI would, server-side.

json
{
  "name": "ulex_simulate_login",
  "arguments": {
    "application_id": "app_01M3PSV7J8TBSPHG95CYSEX32B",
    "email": "dana@acme.example",
    "organization_id": "org_01M3PSV8HGTKQFCAYF9GDWGN3C",
    "connection_id": "con_01M3PSVAG0QFJG99R0M5DXSR5A",
    "scope": ["openid", "profile", "email", "offline_access"],
    "response_type": "code",
    "redirect_uri": "https://app.example.com/auth/callback",
    "return_pkce": true
  }
}
json
{
  "session_id": "ses_01M3PSVFC8MAB38QYAA8Q1K9MG",
  "grant_id": "grt_01M3PSVGBGJT1ZXC840F2B3NXJ",
  "user_id": "usr_01M3PSV9GRT8GQGEG686AR1W9S",
  "organization_id": "org_01M3PSV8HGTKQFCAYF9GDWGN3C",
  "connection_id": "con_01M3PSVAG0QFJG99R0M5DXSR5A",
  "outcome": "success",
  "stage": "complete",
  "amr": ["pwd"],
  "acr": null,
  "authorization_url": "https://ulexid.com/api/v1/oauth2/authorize?response_type=code&client_id=client_01M3PSV7J8TBSPHG95CYSEX32B&redirect_uri=https%3A%2F%2Fapp.example.com%2Fauth%2Fcallback&scope=openid%20profile%20email%20offline_access&state=st_9Kq2WmB7yLt4NxZ&nonce=nc_3Fq8Lp2XvN9bTm&code_challenge=E9MelhoQ2YvW96fl8sW7aTtZbGd0mY6Xl0e8Q1sCk&code_challenge_method=S256",
  "code": "ac_8Kq2WmB7yLt4NxZ1pRc6HdE0sJg3AuV8",
  "code_expires_at": "2026-09-29T14:46:12.000Z",
  "code_verifier": "dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk",
  "authenticated_at": "2026-09-29T14:45:12.000Z",
  "duration_ms": 214
}

code_verifier is only present when return_pkce: true. Leave it off and the RFC 7636 Appendix B test vector is used, so the same code is valid with that fixed verifier.

Failure shapes are first-class, not exceptions:

ConditionResult
email not in config.mock.seed_users{ "outcome": "failure", "error": { "code": "user_not_found", … } }
connection mock.force_failure: true{ "outcome": "failure", "error": { "code": "connection_error", … } }
ulex_simulate_failure armed{ "outcome": "challenge", "stage": "mfa", "error": { "code": "mfa_required" } }
org sso_only: true, different connection{ "outcome": "failure", "error": { "code": "access_denied" } }
user status: "suspended"{ "outcome": "failure", "error": { "code": "access_denied" } }

#11. ulex_get_authorization_url

Use this instead of ulex_simulate_login when you need the URL for your own app to consume, and you will complete the flow yourself.

json
{
  "name": "ulex_get_authorization_url",
  "arguments": {
    "application_id": "app_01M3PSV7J8TBSPHG95CYSEX32B",
    "redirect_uri": "https://app.example.com/auth/callback",
    "scope": ["openid", "profile", "email", "offline_access"],
    "organization_id": "org_01M3PSV8HGTKQFCAYF9GDWGN3C",
    "connection_id": "con_01M3PSVAG0QFJG99R0M5DXSR5A",
    "state": "st_9Kq2WmB7yLt4NxZ",
    "nonce": "nc_3Fq8Lp2XvN9bTm",
    "code_challenge_method": "S256",
    "prompt": ["login"],
    "max_age": 3600
  }
}
json
{
  "url": "https://ulexid.com/api/v1/oauth2/authorize?response_type=code&client_id=client_01M3PSV7J8TBSPHG95CYSEX32B&redirect_uri=https%3A%2F%2Fapp.example.com%2Fauth%2Fcallback&scope=openid%20profile%20email%20offline_access&state=st_9Kq2WmB7yLt4NxZ&nonce=nc_3Fq8Lp2XvN9bTm&code_challenge=E9MelhoQ2YvW96fl8sW7aTtZbGd0mY6Xl0e8Q1sCk&code_challenge_method=S256&prompt=login&max_age=3600",
  "state": "st_9Kq2WmB7yLt4NxZ",
  "nonce": "nc_3Fq8Lp2XvN9bTm",
  "code_challenge": "E9MelhoQ2YvW96fl8sW7aTtZbGd0mY6Xl0e8Q1sCk",
  "code_challenge_method": "S256",
  "hosted_login_url": "https://ulexid.com/auth/app_01M3PSV7J8TBSPHG95CYSEX32B?organization=acme",
  "expires_at": "2026-09-29T14:46:12.000Z"
}

To get the grant back without a browser, follow it with ulex_simulate_login and read code from the result. There is no other supported way to complete an authorization code flow headlessly.


#12. ulex_exchange_code_for_tokens

json
{
  "name": "ulex_exchange_code_for_tokens",
  "arguments": {
    "application_id": "app_01M3PSV7J8TBSPHG95CYSEX32B",
    "code": "ac_8Kq2WmB7yLt4NxZ1pRc6HdE0sJg3AuV8",
    "redirect_uri": "https://app.example.com/auth/callback",
    "code_verifier": "dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk",
    "client_secret": "cs_9fKq2WmB7yLt4NxZ1pRc6HdE0sJg3AuV8"
  }
}
json
{
  "access_token": "eyJhbGciOiJSUzI1NiIsImtpZCI6ImtleV8wMU0zUFNWSkEwWVAyV0RQTTJSRFIxNU1HSCIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL3VsZXhpZC5jb20iLCJzdWIiOiJ1c3JfMDFNM1BTVjlHUlQ4R1FHRUc2ODZBUjFXOVMiLCJhdWQiOlsiY2xpZW50XzAxTTNQU1Y3SjhUQlNQSEc5NUNZU0VYMzJCIl0sImF6cCI6ImNsaWVudF8wMU0zUFNWN0o4VEJTUEhHOTVDWVNFWDMyQiIsImV4cCI6MTc5MDY5NjcxMiwiaWF0IjoxNzkwNjkzMTEyLCJuYmYiOjE3OTA2OTMxMTIsImp0aSI6Imp0aV8wMU0zUFNXQjJLSjhYUTRSRDdUNVY2VzhZMFoiLCJjbGllbnRfaWQiOiJjbGllbnRfMDFNM1BTVjdKOFRCU1BIRzk1Q1lTRVgzMkIiLCJvcmdfaWQiOiJvcmdfMDFNM1BTVjhIR1RLUUZDQVlGOUdEV0dOM0MiLCJvcmdfc2x1ZyI6ImFjbWUiLCJjb25uZWN0aW9uX2lkIjoiY29uXzAxTTNQU1ZBRzBRRkpHOTlSME01RFhTUjVBIiwic2NvcGUiOiJvcGVuaWQgcHJvZmlsZSBlbWFpbCBvZmZsaW5lX2FjY2VzcyIsInNpZCI6InNlc18wMU0zUFNWRkM4TUFCMzhRWUFBOFExSzlNRyIsImFtciI6WyJwd2QiLCJvdHAiLCJtZmEiXSwiYWNyIjoidXJuOnVsZXg6YWNyOm1mYSIsImh0dHBzOi8vdWxleGlkLmNvbS9jbGFpbXMiOnsib3JnX3JvbGUiOiJvd25lciIsImdyb3VwcyI6WyJlbmdpbmVlcmluZyJdfX0.8JmQ1vZ0Xh4n7cW2sT5yP9rB3kD6fG1aH0mNqU4wE7iO2pL5xC8vB1nMg0jKhR3tFyD7wZq2XvN9bTm4PlS6cGhJ1kWsA5",
  "token_type": "Bearer",
  "expires_in": 3600,
  "refresh_token": "rt_51KpXq8WvN0kTzRb7YcLd2mXe9Pf6Sg3AuV8",
  "refresh_token_expires_in": 2592000,
  "id_token": "eyJhbGciOiJSUzI1NiIsImtpZCI6ImtleV8wMU0zUFNWSkEwWVAyV0RQTTJSRFIxNU1HSCIsInR5cCI6IkpXVCJ9…",
  "scope": "openid profile email offline_access"
}

Decoded access_token payload:

json
{
  "iss": "https://ulexid.com",
  "sub": "usr_01M3PSV9GRT8GQGEG686AR1W9S",
  "aud": ["client_01M3PSV7J8TBSPHG95CYSEX32B"],
  "azp": "client_01M3PSV7J8TBSPHG95CYSEX32B",
  "exp": 1790696712,
  "iat": 1790693112,
  "nbf": 1790693112,
  "jti": "jti_01M3PSWB2KJ8XQ4RD7T5V6W8Y0Z",
  "client_id": "client_01M3PSV7J8TBSPHG95CYSEX32B",
  "org_id": "org_01M3PSV8HGTKQFCAYF9GDWGN3C",
  "org_slug": "acme",
  "connection_id": "con_01M3PSVAG0QFJG99R0M5DXSR5A",
  "scope": "openid profile email offline_access",
  "sid": "ses_01M3PSVFC8MAB38QYAA8Q1K9MG",
  "amr": ["pwd", "otp", "mfa"],
  "acr": "urn:ulex:acr:mfa",
  "https://ulexid.com/claims": { "org_role": "owner", "groups": ["engineering"] }
}

A second exchange with the same code returns invalid_grant (400, retryable: false) because the grant is genuinely consumed. Call ulex_simulate_login again.


#13. ulex_introspect_token

json
{ "name": "ulex_introspect_token", "arguments": { "token": "rt_51KpXq8WvN0kTzRb7YcLd2mXe9Pf6Sg3AuV8", "hint": "refresh_token" } }
json
{
  "active": true,
  "token_type": "refresh_token",
  "scope": "openid profile email offline_access",
  "client_id": "client_01M3PSV7J8TBSPHG95CYSEX32B",
  "sub": "usr_01M3PSV9GRT8GQGEG686AR1W9S",
  "org_id": "org_01M3PSV8HGTKQFCAYF9GDWGN3C",
  "sid": "ses_01M3PSVFC8MAB38QYAA8Q1K9MG",
  "exp": 1793276112,
  "iat": 1790693112,
  "auth_time": 1790693112,
  "amr": ["pwd", "otp", "mfa"]
}

An unknown, expired, or revoked token returns 200 with { "active": false } — RFC 7662 behaviour, not an error. Use this to assert revocation in a test.


#14. ulex_mint_access_token

Forges a token for a user with no login at all. Requires tenant.allow_mocks: true on a non-HIPAA tenant (or local in-memory mode via npx @ulexid/mcp-server).

json
{
  "name": "ulex_mint_access_token",
  "arguments": {
    "user_id": "usr_01M3PSV9GRT8GQGEG686AR1W9S",
    "application_id": "app_01M3PSV7J8TBSPHG95CYSEX32B",
    "organization_id": "org_01M3PSV8HGTKQFCAYF9GDWGN3C",
    "scopes": ["openid", "profile", "email"],
    "ttl_seconds": 900,
    "amr": ["urn:ulex:amr:simulated"]
  }
}
json
{
  "access_token": "eyJhbGciOiJSUzI1NiIsImtpZCI6ImtleV8wMU0zUFNWSkEwWVAyV0RQTTJSRFIxNU1HSCIsInR5cCI6IkpXVCJ9…",
  "token_type": "Bearer",
  "expires_in": 900,
  "expires_at": "2026-09-29T14:56:12.000Z",
  "claims": {
    "iss": "https://ulexid.com",
    "sub": "usr_01M3PSV9GRT8GQGEG686AR1W9S",
    "aud": ["client_01M3PSV7J8TBSPHG95CYSEX32B"],
    "org_id": "org_01M3PSV8HGTKQFCAYF9GDWGN3C",
    "amr": ["urn:ulex:amr:simulated"],
    "acr": "urn:ulex:acr:simulated"
  },
  "warning": "Simulated token. Not a real authentication event; no session or grant was created."
}
Note

The most common use is seeding an application's test fixtures. The second most common is forgetting this tool exists and spending twenty minutes driving logins you did not need.


#15. ulex_create_user

json
{
  "name": "ulex_create_user",
  "arguments": {
    "email": "pat@acme.example",
    "email_verified": true,
    "first_name": "Pat",
    "last_name": "Iyer",
    "display_name": "Pat Iyer",
    "job_title": "Support Engineer",
    "department": "Customer Success",
    "status": "active",
    "scim": { "title": "Support Engineer", "user_type": "Employee", "preferred_language": "en-US", "active": true },
    "metadata": { "source": "bootstrap" },
    "idempotency_key": "3c9d1f77-0b2e-4a58-9d61-5e7a2c40b913"
  }
}
json
{
  "id": "usr_01M3PSWBPGS08FWV4NV7P9VNFN",
  "object": "user",
  "email": "pat@acme.example",
  "email_verified": true,
  "first_name": "Pat",
  "last_name": "Iyer",
  "display_name": "Pat Iyer",
  "external_id": null,
  "directory_id": null,
  "job_title": "Support Engineer",
  "department": "Customer Success",
  "scim": { "title": "Support Engineer", "user_type": "Employee", "preferred_language": "en-US", "active": true },
  "status": "active",
  "last_seen_at": null,
  "metadata": { "source": "bootstrap" },
  "created_at": "2026-09-29T14:47:03.000Z",
  "updated_at": "2026-09-29T14:47:03.000Z"
}

email is unique per tenant, not per organization. Creating pat@acme.example twice returns 409 resource_exists with hint: "Reuse the existing user id, or add them to the second organization with ulex_add_organization_member." This is the correct B2B model: one human, many customers.


#16. ulex_add_organization_member

json
{
  "name": "ulex_add_organization_member",
  "arguments": {
    "organization_id": "org_01M3PSV8HGTKQFCAYF9GDWGN3C",
    "user_id": "usr_01M3PSWBPGS08FWV4NV7P9VNFN",
    "role": "member",
    "group_ids": ["grp_01M3PSVED0M9RJTYH5AC72C253"]
  }
}
json
{
  "id": "mem_01M3PSW0YRNEQQAP9T1JP9FC2Y",
  "object": "organization_membership",
  "organization_id": "org_01M3PSV8HGTKQFCAYF9GDWGN3C",
  "user_id": "usr_01M3PSWBPGS08FWV4NV7P9VNFN",
  "role": "member",
  "group_ids": ["grp_01M3PSVED0M9RJTYH5AC72C253"],
  "created_at": "2026-09-29T14:47:04.000Z",
  "updated_at": "2026-09-29T14:47:04.000Z"
}

role ∈ owner | admin | member | guest. Calling it twice for the same (organization_id, user_id) updates the existing membership rather than creating a second one — that is what makes it safe to call in a loop.


#17. ulex_create_directory

json
{
  "name": "ulex_create_directory",
  "arguments": {
    "name": "Acme (Okta)",
    "provider": "ulex_mock",
    "domain": "acme.example",
    "organization_id": "org_01M3PSV8HGTKQFCAYF9GDWGN3C",
    "inbound_scim_enabled": true,
    "scim_poll_interval_seconds": 900,
    "idempotency_key": "3c9d1f77-0b2e-4a58-9d61-5e7a2c40b913"
  }
}
json
{
  "id": "dir_01M3PSVBF8038RK2MW2N263Q2B",
  "object": "directory",
  "organization_id": "org_01M3PSV8HGTKQFCAYF9GDWGN3C",
  "name": "Acme (Okta)",
  "provider": "ulex_mock",
  "state": "active",
  "domain": "acme.example",
  "scim_base_url": "https://ulexid.com/api/v1/scim/v2",
  "inbound_scim_enabled": true,
  "scim_poll_interval_seconds": 900,
  "has_scim_token": false,
  "has_inbound_scim_token": true,
  "has_client_secret": false,
  "last_synced_at": null,
  "last_sync_status": "never",
  "last_sync_error": null,
  "created_at": "2026-09-29T14:42:09.000Z"
}

Tokens are never returned; only the boolean has_* flags are. Fetch the usable bearer token once with ulex_get_scim_configuration, which requires the scim:provision scope.


#18. ulex_provision_scim_user

Pushes one user inbound over the SCIM endpoint, exactly as Okta or Entra would.

json
{
  "name": "ulex_provision_scim_user",
  "arguments": {
    "directory_id": "dir_01M3PSVBF8038RK2MW2N263Q2B",
    "user_name": "sam@acme.example",
    "email": "sam@acme.example",
    "first_name": "Sam",
    "last_name": "Rivera",
    "job_title": "Support Agent",
    "department": "Customer Success",
    "active": true,
    "groups": ["engineering"],
    "external_id": "okta-00u1sAM2xY8ZQ4H1"
  }
}
json
{
  "user": {
    "id": "usr_01M3PSWCNRG3H18C3A2AHBRYRZ",
    "object": "user",
    "email": "sam@acme.example",
    "email_verified": true,
    "first_name": "Sam",
    "last_name": "Rivera",
    "display_name": "Sam Rivera",
    "external_id": "okta-00u1sAM2xY8ZQ4H1",
    "directory_id": "dir_01M3PSVBF8038RK2MW2N263Q2B",
    "job_title": "Support Agent",
    "department": "Customer Success",
    "status": "active"
  },
  "membership": {
    "id": "mem_01M3PSWCNRG3H18C3A2AHBRYRZ",
    "object": "organization_membership",
    "organization_id": "org_01M3PSV8HGTKQFCAYF9GDWGN3C",
    "user_id": "usr_01M3PSWCNRG3H18C3A2AHBRYRZ",
    "role": "member",
    "group_ids": ["grp_01M3PSVED0M9RJTYH5AC72C253"]
  },
  "webhook_events_emitted": ["dsync.user.created", "user.created"]
}

ulex_deprovision_scim_user takes directory_id and user_id and either soft-deactivates (mode: "deactivate", default) or hard-deletes (mode: "delete"). Both revoke active sessions immediately and emit dsync.user.deleted.


#19. ulex_create_webhook

json
{
  "name": "ulex_create_webhook",
  "arguments": {
    "url": "https://hooks.example.com/ulex",
    "events": ["user.created", "user.deleted", "user.suspended", "session.created", "dsync.user.created", "dsync.user.deleted"],
    "description": "Identity events for the Acme Support pipeline",
    "api_version": "2025-01-01",
    "idempotency_key": "3c9d1f77-0b2e-4a58-9d61-5e7a2c40b913"
  }
}
json
{
  "webhook": {
    "id": "whk_01M3PSVK981SXWGKG9JXHC1P0Y",
    "object": "webhook",
    "url": "https://hooks.example.com/ulex",
    "status": "enabled",
    "events": ["user.created", "user.deleted", "user.suspended", "session.created", "dsync.user.created", "dsync.user.deleted"],
    "secret_prefix": "whsec_3Kq9",
    "failure_count": 0,
    "api_version": "2025-01-01",
    "created_at": "2026-09-29T14:42:17.000Z"
  },
  "secret": "whsec_3Kq9Xa2mB7yLt4NxZ1pRc6HdE0sJg3AuV8",
  "signature_algorithm": "HMAC-SHA256",
  "signature_header": "Ulex-Signature",
  "signature_example": "t=1790693112,v1=8JmQ1vZ0Xh4n7cW2sT5yP9rB3kD6fG1aH0mNqU4wE7iO2pL5xC8vB1nMg0jKhR3tFyD7wZq2"
}

secret is returned exactly once. Signature verification recipe: Webhooks.


#20. ulex_search_audit_logs

The tool that closes every task. Filters are all optional and all AND-combined.

json
{
  "name": "ulex_search_audit_logs",
  "arguments": {
    "action_prefix": "authentication.",
    "outcome": "success",
    "actor_type": "agent",
    "organization_id": "org_01M3PSV8HGTKQFCAYF9GDWGN3C",
    "since": "2026-09-29T00:00:00.000Z",
    "until": "2026-09-30T00:00:00.000Z",
    "request_id": "req_01M3PSW9R0175NAW62NYR403R8",
    "limit": 50,
    "order": "desc"
  }
}
json
{
  "data": [
    {
      "id": "aud_01M3PSVN7R3H0ECRPQVTDF1PY9",
      "object": "audit_event",
      "action": "authentication.succeeded",
      "category": "authentication",
      "actor_id": null,
      "actor_hash": "sha256:3b1f0c9a7d2e4f6a8b0c2d4e6f8a0b2c4d6e8f0a2b4c6d8e0f2a4b6c8d0e2f4a",
      "actor_type": "user",
      "actor_display": "Dana Okafor",
      "target": { "type": "application", "id": "app_01M3PSV7J8TBSPHG95CYSEX32B", "display_name": "Acme Support" },
      "organization_id": "org_01M3PSV8HGTKQFCAYF9GDWGN3C",
      "connection_id": "con_01M3PSVAG0QFJG99R0M5DXSR5A",
      "request_id": "req_01M3PSW9R0175NAW62NYR403R8",
      "session_id": "ses_01M3PSVFC8MAB38QYAA8Q1K9MG",
      "ip_hash": "sha256:9c2e4a6b8d0f2a4c6e8b0d2f4a6c8e0b2d4f6a8c0e2b4d6f8a0c2e4b6d8f0a2c",
      "outcome": "success",
      "error_code": null,
      "metadata": { "amr": ["pwd", "otp", "mfa"], "acr": "urn:ulex:acr:mfa" },
      "timestamp": 1790693112,
      "chain": { "sequence": 41, "previous_hash": "sha256:…", "entry_hash": "sha256:…" }
    }
  ],
  "has_more": false,
  "next_cursor": null,
  "chain_head": "sha256:7d9f1b3a5c7e9f1b3d5f7a9c1e3f5b7d9f1b3a5c7e9f1b3d5f7a9c1e3f5b7d9f1b"
}

Full filter list: action, action_prefix, category, actor_id, actor_type, actor_hash, target_id, organization_id, connection_id, session_id, request_id, correlation_id, outcome, error_code, since, until, limit, order, starting_after.


#Secondary tools worth reading the schema for

These four come up constantly enough to be worth the space.

#ulex_deploy

json
{ "name": "ulex_deploy", "arguments": {
  "application_id": "app_01M3PSV7J8TBSPHG95CYSEX32B",
  "environment": "prod",
  "confirm_production": true,
  "commit_sha": "9f3c1a7b2d4e6f8a0b2c4d6e8f0a2b4c6d8e0f2a4",
  "branch": "main",
  "commit_message": "Add SAML SP wiring",
  "strategy": "simulated",
  "idempotency_key": "3c9d1f77-0b2e-4a58-9d61-5e7a2c40b913"
} }

environment is an argument here (set to "prod" on https://ulexid.com, with confirm_production: true to confirm promotion).

json
{
  "id": "dep_01M3PSVP70YQ9Y1YD8QMC42JXF",
  "object": "deployment",
  "application_id": "app_01M3PSV7J8TBSPHG95CYSEX32B",
  "environment": "prod",
  "state": "queued",
  "domain": "acme-support.ulexid.com",
  "strategy": "simulated",
  "resources": [],
  "issued": {},
  "steps": [],
  "error": null,
  "progress_percent": 0,
  "created_at": "2026-09-29T14:48:20.000Z"
}

Poll ulex_get_deployment until state ∈ {succeeded, failed, cancelled, rolled_back}. Typical wall clock: 1.2s.

#ulex_simulate_mfa

json
{ "name": "ulex_simulate_mfa", "arguments": { "mode": "challenge", "email": "dana@acme.example", "method": "totp" } }
json
{
  "challenge_id": "mfa_01M3PSVS4RVKHQVRPCKNJGYBEZ",
  "armed": true,
  "methods": ["totp", "webauthn", "push"],
  "method": "totp",
  "expires_at": "2026-09-29T14:55:12.000Z",
  "code": "418902"
}

Then {"mode": "satisfy", "challenge_id": "mfa_01M3PSVS4RVKHQVRPCKNJGYBEZ"} → {"satisfied": true, "amr": ["pwd", "otp", "mfa"]}. mode: "fail" produces authentication.mfa_failed. The next ulex_simulate_login succeeds and the resulting token's amr contains mfa.

#ulex_explain_error

json
{ "name": "ulex_explain_error", "arguments": { "code": "domain_not_verified" } }
json
{
  "code": "domain_not_verified",
  "type": "invalid_request_error",
  "http_status": 412,
  "retryable": false,
  "message": "The domain acme.example has not been verified for this organization.",
  "causes": [
    "ulex_verify_domain was never called for this domain.",
    "The DNS TXT record at _ulex-challenge.acme.example is missing or has not propagated.",
    "The domain is verified for a different organization than the one on the connection."
  ],
  "fixes": [
    "Call ulex_verify_domain with the organization_id and domain_id.",
    "With allow_mocks: true (or in local mode) verification resolves immediately; otherwise publish the TXT record and wait for propagation (usually under 60s)."
  ],
  "docs_url": "https://docs.ulexid.com/api-reference/organizations#domain-verification"
}

#ulex_get_scim_configuration

json
{ "name": "ulex_get_scim_configuration", "arguments": { "directory_id": "dir_01M3PSVBF8038RK2MW2N263Q2B" } }
json
{
  "base_url": "https://ulexid.com/api/v1/scim/v2",
  "bearer_token": "scim_7Bq4Nxf2Vk9Lc3MdT6hR8wS1yP5aG0eJ",
  "inbound_scim_enabled": true,
  "poll_interval_seconds": 900,
  "user_filter": "userName eq \"pat@acme.example\"",
  "group_filter": null,
  "deprovision_upstream_removals": true,
  "schemas_supported": ["urn:ietf:params:scim:schemas:core:2.0:User", "urn:ietf:params:scim:schemas:core:2.0:Group"],
  "bulk_supported": true,
  "max_operations_per_bulk": 100
}

Paste base_url + bearer_token into Okta's or Entra's "SCIM provisioning" form verbatim. Full walkthrough: SCIM provisioning.


#Common failure codes from tools

codeHTTPCauseDo this
mcp_tool_not_found404typo or wrong serverulex_list_tools
mcp_unauthorized401no Authorization header, or the key is deadset ULEX_API_KEY
unknown_parameter400you sent environment or another extraread the schema from ulex_list_tools
validation_failed400details maps field → messagefix the named field
insufficient_scope403key scope too narrowmint a new key
resource_exists409slug or email collisionreuse the id or pass an idempotency_key
invalid_state_transition409e.g. cancelled a finished deploymentread state first
directory_not_synced409polling before the first runulex_sync_directory first
password_policy_not_met400password fails the tenant's authPolicy.passwordread error.message — it names every unmet rule at once. Retry with a different value; the same call gets the same refusal
access_denied403source is in blocked_ip_ranges, or the account is suspendedulex_get_auth_policy to see the blocklist; a blocked request is recorded as auth_policy.ip_blocked

Full table: Errors and MCP troubleshooting.