authenticate
Sets the session's target environment and credentials for IBM watsonx SaaS or CPD, so other tools use that current connection; calling it again replaces the active target.
Instructions
Establish (or replace) this session's target environment and credentials.
All other tools operate against the current authenticated session — there is no per-call credential parameter. Calling this again replaces the session's target; v1 supports one active target per session, not multiple concurrent ones.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| stage | No | SaaS only — deployment stage. Each stage pairs a different IAM authority with its dataplatform host (dev's dataplatform uses test's IAM; test's uses prod's IAM) — see spec/01-auth-and-environments.md. This parameter extends the tool beyond 02-tools.md's literal signature, which predates the discovery of this third resolution axis. | prod |
| apikey | No | IBM Cloud apikey (saas) or platform API key (cpd, ZenApiKey/bearer). Never echoed back. | |
| password | No | CPD fallback only, used instead of apikey for /v1/authorize. Never echoed back. | |
| username | No | Required for environment='cpd'. | |
| verify_ssl | No | Verify TLS certificates when calling `region_or_url` (the CPD cluster itself, including its own /v1/authorize) — NOT the SaaS IAM token endpoint, which is a public IBM-operated host and is always verified regardless of this setting. Set to false only for a trusted CPD cluster with a self-signed or internal-CA certificate you cannot otherwise validate. Disabling this removes protection against man-in-the-middle attacks on that connection — prefer `ca_bundle_path` when you have the cluster's CA certificate instead. | |
| environment | Yes | ||
| region_or_url | Yes | SaaS: a region code (us-south [default], eu-de, eu-gb, jp-tok, au-syd, ca-tor). CPD: the full cluster base URL (e.g. https://cpd-cpd-instance.apps.my-cluster.example.com), always supplied in full — there is no derivable pattern for CPD. | |
| ca_bundle_path | No | Path to a CA bundle/certificate file to trust for calls to `region_or_url`, instead of disabling verification outright. Takes precedence over `verify_ssl` when set. | |
| prefer_zen_api_key | No | CPD only: prefer the no-round-trip ZenApiKey header over the /v1/authorize bearer flow when an apikey is supplied. |