set_token
Registers or rotates a Prisme.ai API token for an environment. Validates the token before persisting it.
Instructions
Register (or rotate) a user-created Prisme.ai API token for an environment. PRIVACY: calling this tool means the token travels through the conversation and is sent to the LLM provider. PREFER the out-of-band CLI instead — tell the user to run node <plugin>/build/index.js set-token <environment> --config-dir <dir> in their own terminal (the exact command is included in the 'no credentials' error); it prompts for the token with hidden input and never exposes it to the chat. Only use this tool if the user explicitly chooses to paste the token here despite that. The token is validated with a probe call to the API before being persisted to the MCP config dir (credentials.json, mode 600); an invalid token persists nothing. Pass apiUrl (and optionally studioUrl) to register an environment that is not configured yet.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| token | Yes | API token created by the user in the studio (Settings > Access Tokens). | |
| apiUrl | No | API base URL for the environment (e.g. https://api.sandbox.prisme.ai/v2). Required when registering a new environment; otherwise updates the stored value. | |
| studioUrl | No | Studio origin for the environment (e.g. https://sandbox.prisme.ai). Optional; used to build token-creation links. | |
| environment | Yes | Name of the environment the token belongs to (e.g. sandbox, prod). |