# A2A discovery card (.well-known/agent.json) Source: https://docs.prisme.ai/agent-factory/a2a/a2a-discovery-card-well-knownagentjson /api-reference/agent-factory/swagger.yml get /v1/agents/{agentId}/.well-known/agent.json A2A 0.3 discovery card. Owners (and same-org callers) see the live card; outside callers receive the `published_config` view. # A2A extended card (full agent config) Source: https://docs.prisme.ai/agent-factory/a2a/a2a-extended-card-full-agent-config /api-reference/agent-factory/swagger.yml get /v1/agents/{agentId}/extendedAgentCard Same shape as the public `.well-known/agent.json` plus the agent's `tools`, `guardrails`, `sub_agents`, `model`, and `temperature`. Auth-gated for callers with read access. # A2A JSON-RPC 2.0 dispatch (per-agent) Source: https://docs.prisme.ai/agent-factory/a2a/a2a-json-rpc-20-dispatch-per-agent /api-reference/agent-factory/swagger.yml post /v1/agents/{agentId}/a2a Per-agent JSON-RPC 2.0 entry point. The agent ID is taken from the path - `params.id` is ignored. Recognised methods include `message/send`, `message/stream`, `tasks/get`, `tasks/cancel`, `tasks/sendSubscribe`, `agent/getCard`, `agent/getExtendedCard`. For first-class consumers the dedicated REST endpoints (`/messages/send`, `/messages/stream`, `/tasks/{taskId}`, etc.) are preferred - this endpoint exists for A2A interoperability. Note: `tasks/sendSubscribe` directly streams Server-Sent Events without a JSON-RPC wrapper - it does not produce the `application/json` body documented here. # A2A task snapshot (per-agent, GET) Source: https://docs.prisme.ai/agent-factory/a2a/a2a-task-snapshot-per-agent-get /api-reference/agent-factory/swagger.yml get /v1/agents/{agentId}/a2a Per-agent A2A gateway snapshot endpoint. `GET ?taskId=xxx` validates the task belongs to this agent then forwards to `getTaskSnapshot`. Returns a JSON-RPC error envelope when the task does not belong to the agent. # Legacy A2A gateway - JSON-RPC 2.0 dispatch (POST) Source: https://docs.prisme.ai/agent-factory/a2a/legacy-a2a-gateway--json-rpc-20-dispatch-post /api-reference/agent-factory/swagger.yml post /v1/a2a Backward-compatible legacy JSON-RPC 2.0 gateway. The body MUST include `params.id` (the target agent ID); the gateway forwards the call to `POST /v1/agents/{agentId}/a2a`. Returns the forwarded JSON-RPC response or a JSON-RPC error envelope. Recognised methods on the underlying per-agent endpoint: `message/send`, `message/stream`, `tasks/get`, `tasks/cancel`, `tasks/sendSubscribe`, `agent/getCard`, `agent/getExtendedCard`. # Legacy A2A gateway - task snapshot dispatch (GET) Source: https://docs.prisme.ai/agent-factory/a2a/legacy-a2a-gateway--task-snapshot-dispatch-get /api-reference/agent-factory/swagger.yml get /v1/a2a Backward-compatible legacy gateway. `GET /v1/a2a?taskId=xxx` looks up the task's `_agent_id` and forwards to the per-agent endpoint `GET /v1/agents/{agentId}/a2a?taskId=xxx`. New clients should call the per-agent path directly. # Approve or reject an access request Source: https://docs.prisme.ai/agent-factory/access/approve-or-reject-an-access-request /api-reference/agent-factory/swagger.yml post /v1/agents/{agentId}/access/requests/{requestId} Resolve a pending access request. On `approve`, a binding is created for the requester with `roleSlug: user`. # Change an agent share's role Source: https://docs.prisme.ai/agent-factory/access/change-an-agent-shares-role /api-reference/agent-factory/swagger.yml patch /v1/agents/{agentId}/access/{principalType}/{principalId} Change the role of the binding for the given (principal_type, principal_id) pair, in place. Revoking and re-creating is not equivalent: the two calls have no transaction around them, and the revoke half is refused when the binding is the resource's last one. `owner` is not accepted, although it is a defined agent role: it is the only share role carrying `delete`, and this endpoint is reachable by anyone holding `share`. It also never conferred ownership - an agent's owner is its `owner_id`, and a binding with that role resolves to `admin`. The caller's own access cannot be changed, for the same reason it cannot be revoked: lowering one's own role drops them out of the panel they are acting from, on an agent they may be the only administrator of. # List access bindings for an agent Source: https://docs.prisme.ai/agent-factory/access/list-access-bindings-for-an-agent /api-reference/agent-factory/swagger.yml get /v1/agents/{agentId}/access List user/group/org bindings on this agent. # List access requests for an agent Source: https://docs.prisme.ai/agent-factory/access/list-access-requests-for-an-agent /api-reference/agent-factory/swagger.yml get /v1/agents/{agentId}/access/requests # Request access to a published restricted agent Source: https://docs.prisme.ai/agent-factory/access/request-access-to-a-published-restricted-agent /api-reference/agent-factory/swagger.yml post /v1/agents/{agentId}/access/request Submit an access request for a published `restricted` agent. The agent owner / admins can approve or reject via `/v1/agents/{agentId}/access/requests/{requestId}`. # Revoke an agent access binding Source: https://docs.prisme.ai/agent-factory/access/revoke-an-agent-access-binding /api-reference/agent-factory/swagger.yml delete /v1/agents/{agentId}/access/{principalType}/{principalId} Delete the binding for the given (principal_type, principal_id) pair. The caller's own access cannot be revoked here (`CANNOT_MODIFY_OWN_ACCESS`): it would drop them out of the panel they are acting from, on an agent they may be the only administrator of. # Share an agent with a principal (create binding) Source: https://docs.prisme.ai/agent-factory/access/share-an-agent-with-a-principal-create-binding /api-reference/agent-factory/swagger.yml post /v1/agents/{agentId}/access Create a binding granting a user, group, or org access to this agent. User and group principals are validated against the agent's organization via `ai-governance-v2`. An `org` target may be the agent's own org (no extra requirement), another organization, or the literal wildcard `*` meaning every authenticated member of at least one org. Any target beyond the agent's own org requires the `agent-factory:sharing:cross-org` permission (403 without it), and a specific foreign org is only accepted when the sharer is an active member of it (uniform 400 otherwise; platform admins bypass). Default role when `role_slug` is omitted: `admin` for same-org shares (historical default), `user` for any org target beyond the agent's own org. # Get the activity feed for an agent Source: https://docs.prisme.ai/agent-factory/activity/get-the-activity-feed-for-an-agent /api-reference/agent-factory/swagger.yml get /v1/activity Activity feed of agent interactions, errors, lifecycle and config changes, conversations, artifacts, ratings, access changes, and share events. Backed by Elasticsearch. # Delete a user's data (GDPR erasure) Source: https://docs.prisme.ai/agent-factory/admin/delete-a-users-data-gdpr-erasure /api-reference/agent-factory/swagger.yml post /v1/admin/user-deletion Erases a user's data across the platform: anonymizes their conversations, transfers ownership of their agents to the calling admin, deletes their shares, ratings, access requests, access bindings, tasks and artifacts, then asks the Tools Memories, Knowledges and AI Insights workspaces to delete their data. Each step is best effort: failures are reported in `errors` and do not stop the run. Requires a platform administrator session (`platformRole` `superadmin` or `root`); other callers get `403`. Rate limited to 10 calls per hour per admin. With `dry_run: true`, nothing is deleted and the counts preview what would be affected (cross-workspace counts stay at `0`). # Export a user's data (GDPR access) Source: https://docs.prisme.ai/agent-factory/admin/export-a-users-data-gdpr-access /api-reference/agent-factory/swagger.yml post /v1/admin/user-export Collects a user's data across the platform: conversations, shares, ratings, access requests, access bindings, archived tasks and owned agents, plus their memories (Tools Memories), files and knowledge bases (Knowledges) and insights (AI Insights). Each source is best effort: failures are reported in `errors`. Allowed for a platform administrator (`platformRole` `superadmin` or `root`) on any user, and for any authenticated user on their own `user_id`; other callers get `403`. Rate limited to 10 calls per hour per caller. # Create a new agent Source: https://docs.prisme.ai/agent-factory/agents/create-a-new-agent /api-reference/agent-factory/swagger.yml post /v1/agents Create a new agent in the caller's organization. The agent starts in `draft` status and `private` visibility. A service account is provisioned automatically; failure to provision rolls back the creation. # Delete an agent and its associated data Source: https://docs.prisme.ai/agent-factory/agents/delete-an-agent-and-its-associated-data /api-reference/agent-factory/swagger.yml delete /v1/agents/{agentId} Cascading delete: removes IAM service account, conversations, tasks, access bindings, artifact versions, artifacts, ratings, agent metrics, shares, and retention policy. Cross-workspace storage cleanup runs best-effort. # Export an agent as AGENTS.md Source: https://docs.prisme.ai/agent-factory/agents/export-an-agent-as-agentsmd /api-reference/agent-factory/swagger.yml get /v1/agents/{agentId}/export Returns the agent's portable AGENTS.md document (YAML front matter + markdown instructions). Response media type is `text/markdown`; the response is sent with `Content-Disposition: attachment; filename="agent-export.agents.md"`. # Get a single agent by ID Source: https://docs.prisme.ai/agent-factory/agents/get-a-single-agent-by-id /api-reference/agent-factory/swagger.yml get /v1/agents/{agentId} Returns the agent record. Owners see the full record (including `published_config`). Non-owners with binding receive the record with `published_config` stripped. Restricted agents seen by callers without binding return only public-facing fields. An agent with no published version is served (as its draft) to its editors and to callers it was explicitly shared with; anyone else gets 404. # Get featured agents and categories Source: https://docs.prisme.ai/agent-factory/agents/get-featured-agents-and-categories /api-reference/agent-factory/swagger.yml get /v1/agents/discovery Discovery endpoint for the store homepage. Returns up to 10 featured published agents (sorted by rating), and the list of distinct categories with counts. # Import an agent from AGENTS.md Source: https://docs.prisme.ai/agent-factory/agents/import-an-agent-from-agentsmd /api-reference/agent-factory/swagger.yml post /v1/agents/import Parse an `AGENTS.md` document (YAML front matter + markdown instructions) and either create a new agent from it or patch an existing one. Create vs update is decided solely by `target_agent_id`: - omitted: CREATE (new agent, fresh id, SA provisioned) - present: PATCH the matching agent (404 if not found in the caller's org, 403 if the caller is neither the owner nor an agent-factory admin) Any `id:` carried by the file's frontmatter is ignored - round-trip re-imports always create a new agent unless the caller explicitly opts into a patch. # List agents Source: https://docs.prisme.ai/agent-factory/agents/list-agents /api-reference/agent-factory/swagger.yml get /v1/agents List agents with multi-scope filter. Supported scopes (comma-separated): `own`, `shared`, `published`, `all`. Default `own`. The reserved action `?action=explore` returns all public+restricted published agents in the caller's organization. The `shared` scope also lists agents with no published version that were explicitly shared with the caller, served as their draft at the role the share carries. An agent from another organization is listed under `shared` only when someone else created it and shared it with the caller; agents the caller created in another organization stay in that organization's lists. # List all agents of an organization (admin) Source: https://docs.prisme.ai/agent-factory/agents/list-all-agents-of-an-organization-admin /api-reference/agent-factory/swagger.yml get /v1/orgs/{orgSlug}/agents Org-wide agent listing for administrators (agent-factory admin or platform admin), whatever the owner or visibility. The caller must belong to `orgSlug`. Rows expose the published snapshot when one exists and never carry `published_config`. Sorted descending. # Resolve a file_search citation link (302 redirect) Source: https://docs.prisme.ai/agent-factory/agents/resolve-a-file_search-citation-link-302-redirect /api-reference/agent-factory/swagger.yml get /v1/agents/{agentId}/citations/source_url Stable, permanent link embedded in file_search `url_citation` annotations for `uploaded_file` documents (web pages carry their real `source_url` and never route here). On click: authorizes the end user against the agent (`read`), verifies `knowledge_base_id` is a file_search KB the agent uses (draft or published), resolves a fresh short-lived URL from storage as a trusted source, and 302-redirects to it. Minting happens per click, so this link never expires even though the native URL it resolves to is short-lived. # Update an agent (partial update) Source: https://docs.prisme.ai/agent-factory/agents/update-an-agent-partial-update /api-reference/agent-factory/swagger.yml patch /v1/agents/{agentId} Partially update agent fields. Setting `status: draft` clears the `published_config` snapshot. If the agent is `published`, `has_draft_changes` is automatically set to `true`. # Get analytics (series + summary) for an agent Source: https://docs.prisme.ai/agent-factory/analytics/get-analytics-series-+-summary-for-an-agent /api-reference/agent-factory/swagger.yml get /v1/agents/{agentId}/analytics Returns metrics series and an aggregated summary for a single agent. Series is read from Mongo; summary is cached and recomputed from Elasticsearch on miss/stale (custom date ranges always recompute). # On-demand metrics refresh for an agent Source: https://docs.prisme.ai/agent-factory/analytics/on-demand-metrics-refresh-for-an-agent /api-reference/agent-factory/swagger.yml post /v1/agents/{agentId}/refresh-metrics Re-aggregates the cached analytics for the requested period. The front-end passes `period_start` / `period_end` / `granularity` for the window currently being viewed. The legacy fallback uses `hours_back` (1..168) ending at the current hour boundary at hourly granularity. Available to agent owners and writers. # List agent-scoped API keys Source: https://docs.prisme.ai/agent-factory/apikeys/list-agent-scoped-api-keys /api-reference/agent-factory/swagger.yml get /v1/agents/{agentId}/api-keys List org API keys owned by this agent. Requires `share` on the agent and the `agent-factory:apikeys:read` org permission, owners included (403 otherwise). # Mint a new agent-scoped API key Source: https://docs.prisme.ai/agent-factory/apikeys/mint-a-new-agent-scoped-api-key /api-reference/agent-factory/swagger.yml post /v1/agents/{agentId}/api-keys Create an org-scoped API key owned by this agent. Permissions are prefixed with `agent-factory:` server-side. The secret is returned once on creation. Requires `share` on the agent and the `agent-factory:apikeys:create` org permission, owners included (403 otherwise; a key scoped to an agent is refused unless it also carries the `agent-factory:apikeys:*` scope). # Revoke an agent API key Source: https://docs.prisme.ai/agent-factory/apikeys/revoke-an-agent-api-key /api-reference/agent-factory/swagger.yml delete /v1/agents/{agentId}/api-keys/{keyId} Requires `share` on the agent and the `agent-factory:apikeys:delete` org permission, owners included (403 otherwise). # Rotate (regenerate) an agent API key secret Source: https://docs.prisme.ai/agent-factory/apikeys/rotate-regenerate-an-agent-api-key-secret /api-reference/agent-factory/swagger.yml post /v1/agents/{agentId}/api-keys/{keyId}/rotate Requires `share` on the agent and the `agent-factory:apikeys:create` org permission, owners included (403 otherwise). # Delete an artifact and all of its versions Source: https://docs.prisme.ai/agent-factory/artifacts/delete-an-artifact-and-all-of-its-versions /api-reference/agent-factory/swagger.yml delete /v1/artifacts/{artifactId} # Get an artifact (with current version content) Source: https://docs.prisme.ai/agent-factory/artifacts/get-an-artifact-with-current-version-content /api-reference/agent-factory/swagger.yml get /v1/artifacts/{artifactId} # List artifacts owned by the caller Source: https://docs.prisme.ai/agent-factory/artifacts/list-artifacts-owned-by-the-caller /api-reference/agent-factory/swagger.yml get /v1/artifacts List artifacts the authenticated user owns, optionally filtered by `agent_id`, `conversation_id`, and `artifact_type`. # Update artifact content or restore a version Source: https://docs.prisme.ai/agent-factory/artifacts/update-artifact-content-or-restore-a-version /api-reference/agent-factory/swagger.yml patch /v1/artifacts/{artifactId} Two mutation modes, both creating a new current version: `restore_version` re-commits a historical version's content (it wins when both are sent), otherwise `content` replaces the whole document. `base_version` opts into optimistic concurrency control on the `content` mode. # Create a new conversation Source: https://docs.prisme.ai/agent-factory/conversations/create-a-new-conversation /api-reference/agent-factory/swagger.yml post /v1/agents/{agentId}/conversations # Delete a single conversation (cascades to tasks + artifacts) Source: https://docs.prisme.ai/agent-factory/conversations/delete-a-single-conversation-cascades-to-tasks-+-artifacts /api-reference/agent-factory/swagger.yml delete /v1/agents/{agentId}/conversations/{contextId} # Delete all conversations for the caller on this agent Source: https://docs.prisme.ai/agent-factory/conversations/delete-all-conversations-for-the-caller-on-this-agent /api-reference/agent-factory/swagger.yml delete /v1/agents/{agentId}/conversations Cascades a bulk delete: all caller-owned conversations on this agent, their tasks, and their artifact versions / artifacts. Emits `conversations.deleted.all` for cache invalidation. # Get a single conversation with its message history Source: https://docs.prisme.ai/agent-factory/conversations/get-a-single-conversation-with-its-message-history /api-reference/agent-factory/swagger.yml get /v1/agents/{agentId}/conversations/{contextId} Returns the conversation envelope plus a paginated slice of its task-message history (ordered most-recent first). # List conversations for an agent Source: https://docs.prisme.ai/agent-factory/conversations/list-conversations-for-an-agent /api-reference/agent-factory/swagger.yml get /v1/agents/{agentId}/conversations List the caller's conversations on this agent. Supports filtering by archive/star state and a specific `contextId`. # List the caller's connector accounts for an agent's knowledge bases Source: https://docs.prisme.ai/agent-factory/conversations/list-the-callers-connector-accounts-for-an-agents-knowledge-bases /api-reference/agent-factory/swagger.yml get /v1/agents/{agentId}/connector_accounts For each `file_search` knowledge base the agent draws on, returns the connector accounts the calling user has (or can connect), so a chat surface can offer to connect or disconnect one. Answers about the caller only. A knowledge base whose connector cannot be queried contributes nothing (no error). Disconnecting through `disconnect_url` drops only the credential the reader connected for this agent. # Update conversation metadata (title, archive, star) Source: https://docs.prisme.ai/agent-factory/conversations/update-conversation-metadata-title-archive-star /api-reference/agent-factory/swagger.yml patch /v1/agents/{agentId}/conversations/{contextId} # Usage totals for one conversation Source: https://docs.prisme.ai/agent-factory/conversations/usage-totals-for-one-conversation /api-reference/agent-factory/swagger.yml get /v1/agents/{agentId}/conversations/{contextId}/usage Tokens, cost, carbon and message count for one conversation, aggregated from each turn's `task.metadata.usage` (the same source as the per-message usage shown in chat, so per-message lines always sum to these totals). Broken down per model in `by_model`, an array because model names contain dots. Self-scoped: a user only reads their own conversation. Privileged and trusted-monitoring callers may read any user's conversation of this agent. At most 500 turns are aggregated. # List or fetch an evaluation Source: https://docs.prisme.ai/agent-factory/evaluations/list-or-fetch-an-evaluation /api-reference/agent-factory/swagger.yml get /v1/agents/{agentId}/evaluations Without `eval_id`, returns the page of evaluations owned by the caller for this agent. With `eval_id`, returns that single evaluation (404 if not found). # Start a new evaluation run Source: https://docs.prisme.ai/agent-factory/evaluations/start-a-new-evaluation-run /api-reference/agent-factory/swagger.yml post /v1/agents/{agentId}/evaluations Kicks off an evaluation against a stored input file. Persists a `tasks` record with `_type: evaluation` and emits `evaluation.started` for the worker pool to pick up. # Send a message to an agent (A2A, non-streaming) Source: https://docs.prisme.ai/agent-factory/messages/send-a-message-to-an-agent-a2a-non-streaming /api-reference/agent-factory/swagger.yml post /v1/agents/{agentId}/messages/send A2A-compliant message send. The body follows the A2A flat `MessageSendParams` shape - a `message` envelope with `message_id`, `role`, `parts[]`, and an optional `contextId`. Parts are discriminated by field presence: `TextPart` (`text`), `FilePart` (`url` or `raw`), `DataPart` (`data`). An always-on rate-limit floor (200/h per user) applies, plus any agent-configured limit. The HITL approval flow is supported and will park the task in `input-required` until resolved through `/v1/agents/{agentId}/tasks/{taskId}/resolve`. Send the `x-draft-mode: true` header to bypass `published_config` resolution and exercise live (draft) configuration - owners and agent-factory writers only. **Idempotency (opt-in).** Set `message.metadata.clientMessageId` to a stable per-user key and the send becomes replay-safe: the first call runs normally, and any later call with the same key returns that first answer verbatim with `task.replayed: true`, without running the agent and without opening a second conversation. A replay arriving while the first run is still in flight answers `409 MESSAGE_IN_PROGRESS` and names the conversation it is writing to. The body of a replay is not compared with the first one: a different message under the same key still gets the first answer. Replays count against the rate limits. The body's `message_id` plays no part in this. **Not supported on `messages/stream`**: a streamed send is always executed. # Stream an agent reply via SSE (A2A) Source: https://docs.prisme.ai/agent-factory/messages/stream-an-agent-reply-via-sse-a2a /api-reference/agent-factory/swagger.yml post /v1/agents/{agentId}/messages/stream A2A-compliant streaming send. The request body uses the same `MessageSendParams` shape as `messages/send`. The response is delivered as Server-Sent Events (`text/event-stream`). Each frame is a `data: ` line; the server emits no native SSE `event:` field. Lifecycle frames use `{"event":"","data":{...}}`. The lifecycle sequence starts with `task.status`, emits zero or more `task.output.delta` events, and reaches its terminal state with `task.output.completed`. Clients must inspect `data.status.state` on that event: `completed`, `failed`, or `input-required`. Between frames, the server sends `: keepalive` SSE comment lines to keep the connection open. Ignore every line starting with `:`, as `EventSource` does. Frames without an `event` property are transport frames. Discard only the literal `{"keepAlive": true}` frame, the keep-alive older servers send instead of the comment line. The server closes the stream with a summary frame shaped as `{"error":...,"task":{"status":{"state":...}}}`. Inspect that frame: an early authorization failure is delivered there, with its code in `error.error` and HTTP 200 already committed. Never treat HTTP 200 alone as success. The `x-draft-mode: true` header bypasses `published_config` resolution. The same HITL approval flow as `messages/send` applies - a streaming task may park in `input-required` until resolved. # List available agent profiles (presets) Source: https://docs.prisme.ai/agent-factory/profiles/list-available-agent-profiles-presets /api-reference/agent-factory/swagger.yml get /v1/profiles Returns the catalog of agent profiles (`simple`, `workflow`, `agent_light`, `agent_full`, `orchestrator`) with their feature flags, limits, and recommended use cases. # Discard draft changes and revert to the published snapshot Source: https://docs.prisme.ai/agent-factory/publishing/discard-draft-changes-and-revert-to-the-published-snapshot /api-reference/agent-factory/swagger.yml post /v1/agents/{agentId}/discard-draft Reverts live fields from `published_config`. Requires an agent in `published` status with `has_draft_changes: true`. # Publish an agent Source: https://docs.prisme.ai/agent-factory/publishing/publish-an-agent /api-reference/agent-factory/swagger.yml post /v1/agents/{agentId}/publish Snapshot the agent's current runtime fields into `published_config`, flip status to `published`, and set the visibility (default `public`). # Unpublish an agent Source: https://docs.prisme.ai/agent-factory/publishing/unpublish-an-agent /api-reference/agent-factory/swagger.yml post /v1/agents/{agentId}/unpublish Revert a published agent to `draft`: clears `published_config` and `published_at`, resets visibility to `private` and `has_draft_changes` to `false`. The live agent fields (the current draft) are kept as-is. Requires publish rights on the agent. # Forget one of the signed-in user's devices Source: https://docs.prisme.ai/agent-factory/push/forget-one-of-the-signed-in-users-devices /api-reference/agent-factory/swagger.yml delete /v1/push/devices Called at sign-out. Only the owner of the device can forget it. # Register the signed-in user's mobile device for push notifications Source: https://docs.prisme.ai/agent-factory/push/register-the-signed-in-users-mobile-device-for-push-notifications /api-reference/agent-factory/swagger.yml post /v1/push/devices Stores the device's APNs or FCM token and its notification key (RFC 8291), sealed at rest. Registering again with the same `device_id` updates it. A former registration of the same token, whichever the account, is replaced. The app draws a `device_id` at sign-in and forgets it at sign-out; on `409` it draws a new one and retries. Org API keys are refused. # Rate an agent (1-5) Source: https://docs.prisme.ai/agent-factory/ratings/rate-an-agent-1-5 /api-reference/agent-factory/swagger.yml post /v1/agents/{agentId}/ratings Upserts the caller's rating on the agent and recomputes the average from the ratings collection (source of truth). # Delete the agent-level retention policy (revert to org/defaults) Source: https://docs.prisme.ai/agent-factory/retention/delete-the-agent-level-retention-policy-revert-to-orgdefaults /api-reference/agent-factory/swagger.yml delete /v1/agents/{agentId}/retention # Get an agent's retention policy Source: https://docs.prisme.ai/agent-factory/retention/get-an-agents-retention-policy /api-reference/agent-factory/swagger.yml get /v1/agents/{agentId}/retention Returns the raw agent-level retention policy (or null if none) plus the resolved `effective` values (agent -> org -> platform defaults). # Get the org-level retention policy Source: https://docs.prisme.ai/agent-factory/retention/get-the-org-level-retention-policy /api-reference/agent-factory/swagger.yml get /v1/orgs/{orgSlug}/retention Org-scoped retention policy. Admin-only (platform admin or agent-factory admin). Returns the raw policy document plus the resolved `effective` values (org override -> platform defaults). # Upsert an agent retention policy Source: https://docs.prisme.ai/agent-factory/retention/upsert-an-agent-retention-policy /api-reference/agent-factory/swagger.yml put /v1/agents/{agentId}/retention Upserts the agent-level retention policy. Each field is validated against the org limit; admins (platform admin or agent-factory admin) may set `admin_override: true` to exceed the org limits. # Upsert the org-level retention policy Source: https://docs.prisme.ai/agent-factory/retention/upsert-the-org-level-retention-policy /api-reference/agent-factory/swagger.yml put /v1/orgs/{orgSlug}/retention # Create a share snapshot of a conversation or single message Source: https://docs.prisme.ai/agent-factory/shares/create-a-share-snapshot-of-a-conversation-or-single-message /api-reference/agent-factory/swagger.yml post /v1/agents/{agentId}/conversations/{contextId}/share Creates an immutable snapshot of a conversation (or a single message when `message_id` is provided) plus any artifacts it references. Returns both a UI URL and a public-facing API URL. # Create (or refresh) a share for an artifact Source: https://docs.prisme.ai/agent-factory/shares/create-or-refresh-a-share-for-an-artifact /api-reference/agent-factory/swagger.yml post /v1/artifacts/{artifactId}/shares Returns the existing share for `(artifact_id, user_id)` if one exists, with the snapshot refreshed from the artifact's current version. Otherwise creates a new share. # Delete a share owned by the caller Source: https://docs.prisme.ai/agent-factory/shares/delete-a-share-owned-by-the-caller /api-reference/agent-factory/swagger.yml delete /v1/shares/{shareId} # Get a share owned by the caller Source: https://docs.prisme.ai/agent-factory/shares/get-a-share-owned-by-the-caller /api-reference/agent-factory/swagger.yml get /v1/shares/{shareId} # List shares created by the caller Source: https://docs.prisme.ai/agent-factory/shares/list-shares-created-by-the-caller /api-reference/agent-factory/swagger.yml get /v1/shares # Public-facing share viewer (auth-required) Source: https://docs.prisme.ai/agent-factory/shares/public-facing-share-viewer-auth-required /api-reference/agent-factory/swagger.yml get /v1/shared/{shareId} Returns the share snapshot. Despite the `/shared/` prefix this endpoint still requires authentication - both end-user JWTs (`Authorization: Bearer`) and `iak_*` instance keys (`x-prismeai-api-key`) work, but anonymous callers are rejected. The response sets `is_mine: true` when the caller owns the share. # Cancel a running task (A2A) Source: https://docs.prisme.ai/agent-factory/tasks/cancel-a-running-task-a2a /api-reference/agent-factory/swagger.yml post /v1/agents/{agentId}/tasks/{taskId}/cancel Sets the task `status.state` to `canceled` and stamps a `_completed_at`. Tasks already in `completed` or `canceled` return a 4xx. # Get a single task by ID Source: https://docs.prisme.ai/agent-factory/tasks/get-a-single-task-by-id /api-reference/agent-factory/swagger.yml get /v1/agents/{agentId}/tasks/{taskId} # Get a task snapshot (A2A subscribe - non-streaming) Source: https://docs.prisme.ai/agent-factory/tasks/get-a-task-snapshot-a2a-subscribe--non-streaming /api-reference/agent-factory/swagger.yml get /v1/agents/{agentId}/tasks/{taskId}/subscribe Returns the current task state plus history. Stateless: closes the response immediately. For real-time updates on non-terminal tasks, clients subscribe to the native event-bus SSE channel for `task.output.completed` lifecycle events. The `terminal` flag indicates whether further updates are still possible. # List tasks for an agent Source: https://docs.prisme.ai/agent-factory/tasks/list-tasks-for-an-agent /api-reference/agent-factory/swagger.yml get /v1/agents/{agentId}/tasks List the caller's tasks on this agent, with optional `context_id` and `status` filters. # Push an event into a task from a hook callback Source: https://docs.prisme.ai/agent-factory/tasks/push-an-event-into-a-task-from-a-hook-callback /api-reference/agent-factory/swagger.yml post /v1/agents/{agentId}/tasks/{taskId}/events Callback used by `async` and `stream` hook targets (the `callback.url` they receive) to forward incremental updates to the client that started the task. The event is broadcast to the task's SSE/WebSocket subscribers; `task.status` and `task.output.completed` are persisted, `task.output.delta` is not. Authenticated with the callback token from `callback.token`, sent in `X-Hook-Token` (or `Authorization: Bearer cbt_...`). # Resolve a pending HITL approval (external approver) Source: https://docs.prisme.ai/agent-factory/tasks/resolve-a-pending-hitl-approval-external-approver /api-reference/agent-factory/swagger.yml post /v1/agents/{agentId}/tasks/{taskId}/resolve External approval endpoint for tasks parked in `input-required`. The caller is the approver - distinct from the chatting user - and is authorized via the task's `pending_approval.approvers` list. On `approved: true`, the agent loop resumes; on `approved: false`, the task is failed with the supplied reason. # Update a task from a hook callback Source: https://docs.prisme.ai/agent-factory/tasks/update-a-task-from-a-hook-callback /api-reference/agent-factory/swagger.yml patch /v1/agents/{agentId}/tasks/{taskId} Callback used by `async` and `stream` hook targets (the `callback.patch_url` they receive) to update the task they were invoked for. Authenticated with the callback token from `callback.token`, sent in `X-Hook-Token` (or `Authorization: Bearer cbt_...`). User credentials are not used on this method. When `status` is set, a `task.status` event is emitted to the task's subscribers. # Attach a tool to an agent Source: https://docs.prisme.ai/agent-factory/tools/attach-a-tool-to-an-agent /api-reference/agent-factory/swagger.yml post /v1/agents/{agentId}/tools Adds a tool to the agent's `tools[]`. `type` MUST be one of `file_search`, `mcp`, or `function`. The tool name must match `^[a-zA-Z0-9_-]+$` (OpenAI tool-name constraint). When the agent is published, `has_draft_changes` is set to `true`. # Get a single tool from an agent Source: https://docs.prisme.ai/agent-factory/tools/get-a-single-tool-from-an-agent /api-reference/agent-factory/swagger.yml get /v1/agents/{agentId}/tools/{toolId} # List the tools an attached MCP server exposes Source: https://docs.prisme.ai/agent-factory/tools/list-the-tools-an-attached-mcp-server-exposes /api-reference/agent-factory/swagger.yml get /v1/agents/{agentId}/tools/{toolId}/capabilities Runs the server's `tools/list` and returns each advertised tool with the `canonical_name` the model calls it by (the name a `tool_permissions` rule must target to reach that tool), plus its `inputSchema` and `annotations` exactly as published. `canonical_name` is computed by the runtime's own naming helper: consume it, never derive it. Always `200` once the entry is resolved. `status` says whether the list could be fetched (`ok`), whether the caller has to connect to an OAuth-gated server first (`auth_required`, empty `items`), or whether the server did not answer (`unavailable`, empty `items`, `error`). Only `mcp` entries have capabilities: any other type is a `400`. The list is served from the same per-server cache the runtime uses, with the same rule: never cached for auth-bearing catalog entries. # List the tools attached to an agent Source: https://docs.prisme.ai/agent-factory/tools/list-the-tools-attached-to-an-agent /api-reference/agent-factory/swagger.yml get /v1/agents/{agentId}/tools # Remove a tool from an agent Source: https://docs.prisme.ai/agent-factory/tools/remove-a-tool-from-an-agent /api-reference/agent-factory/swagger.yml delete /v1/agents/{agentId}/tools/{toolId} Removes the tool from `tools[]`. When the agent is published, `has_draft_changes` is set to `true`. # Execution trace of one agent turn Source: https://docs.prisme.ai/agent-factory/traces/execution-trace-of-one-agent-turn /api-reference/agent-factory/swagger.yml get /v1/agents/{agentId}/traces/{correlationId} Assembles the trace of one agent turn (identified by its `correlationId`) for the agent's editor: knowledge-base passages retrieved and their scores, tool calls, the chronology of what ran, errors, and the model, tokens, cost and latency of the turn (merged from the LLM Gateway). Step inputs and outputs are not included; fetch one on demand with `GET /v1/agents/{agentId}/traces/{correlationId}/events/{eventId}`. Requires the `agent-factory:traces:read` org permission (or the `agent-factory:*` / `*` wildcards, or platform admin). Owning or editing the agent is not enough. Caveats reported in the payload: `retrieval` is only populated for turns run from the editing surface, and `summary.details_expired` flags traces older than the 14-day cleanup of step details. The timeline is capped at 2000 events (`summary.timeline_truncated`). # Inputs and outputs of one trace step Source: https://docs.prisme.ai/agent-factory/traces/inputs-and-outputs-of-one-trace-step /api-reference/agent-factory/swagger.yml get /v1/agents/{agentId}/traces/{correlationId}/events/{eventId} Returns the inputs and outputs of one step of a trace, fetched on demand. Same permission as the trace (`agent-factory:traces:read`). The event must belong both to the given correlation and to an execution of the given agent. Known secret keys are stripped from `input` and `output`; the raw event is never served (open it in the Builder activity view, under workspace access control). # Ask a plain-language question Source: https://docs.prisme.ai/ai-collection/ai/ask-a-plain-language-question /api-reference/ai-collection/swagger.yml post /v1/collections/{collection_id}/ask Answers a natural-language question about a collection. The org default LLM turns the question into a query or aggregation plan using only the schema, a few sample rows, and the row count (never the full dataset); the plan runs server-side; a short natural-language answer is generated from the bounded result. Returns `answer`, `plan`, and `data`. Rate limit: 20 requests/min per user. # Suggest a schema from a description Source: https://docs.prisme.ai/ai-collection/ai/suggest-a-schema-from-a-description /api-reference/ai-collection/swagger.yml post /v1/suggest-schema Suggests a typed `properties` schema from a plain-language description of the data to store, using the org default LLM. Feed the result to the collection create endpoint. # Count records Source: https://docs.prisme.ai/ai-collection/analytics/count-records /api-reference/ai-collection/swagger.yml get /v1/collections/{collection_id}/data/count # Get distinct values of a field Source: https://docs.prisme.ai/ai-collection/analytics/get-distinct-values-of-a-field /api-reference/ai-collection/swagger.yml get /v1/collections/{collection_id}/data/distinct Returns up to 1,000 unique values for a field. # Run aggregations Source: https://docs.prisme.ai/ai-collection/analytics/run-aggregations /api-reference/ai-collection/swagger.yml post /v1/collections/{collection_id}/data/aggregate Computes sums, averages, and counts over matching records, with optional grouping. Maximum 10 aggregation steps per call. # Get an API key Source: https://docs.prisme.ai/ai-collection/api-keys/get-an-api-key /api-reference/ai-collection/swagger.yml get /v1/collections/{collection_id}/api-keys/{key_id} Requires `ai-collection-v3:collections:share` and the `ai-collection-v3:apikeys:read` org permission (403 otherwise). # List API keys Source: https://docs.prisme.ai/ai-collection/api-keys/list-api-keys /api-reference/ai-collection/swagger.yml get /v1/collections/{collection_id}/api-keys Lists the API keys scoped to this collection. Raw keys are never returned. Requires `ai-collection-v3:collections:share` and the `ai-collection-v3:apikeys:read` org permission (403 otherwise). # Mint an API key Source: https://docs.prisme.ai/ai-collection/api-keys/mint-an-api-key /api-reference/ai-collection/swagger.yml post /v1/collections/{collection_id}/api-keys Mints an org API key scoped to this collection. The raw key is returned exactly once, in the `secret` field: store it now, it cannot be retrieved again. Requires `ai-collection-v3:collections:share` and the `ai-collection-v3:apikeys:create` org permission (403 otherwise; a key scoped to a collection is refused unless it also carries the `ai-collection-v3:collections:*` and `ai-collection-v3:apikeys:*` scopes, or `ai-collection-v3:*`). # Revoke an API key Source: https://docs.prisme.ai/ai-collection/api-keys/revoke-an-api-key /api-reference/ai-collection/swagger.yml delete /v1/collections/{collection_id}/api-keys/{key_id} Requires `ai-collection-v3:collections:share` and the `ai-collection-v3:apikeys:delete` org permission (403 otherwise). # Rotate an API key Source: https://docs.prisme.ai/ai-collection/api-keys/rotate-an-api-key /api-reference/ai-collection/swagger.yml post /v1/collections/{collection_id}/api-keys/{key_id}/rotate Regenerates the key. The new raw key is returned once, in `secret`. Requires `ai-collection-v3:collections:share` and the `ai-collection-v3:apikeys:create` org permission (403 otherwise). # Create a collection Source: https://docs.prisme.ai/ai-collection/collections/create-a-collection /api-reference/ai-collection/swagger.yml post /v1/collections Creates a named collection, optionally with a typed schema (`properties`). Collection names are unique per owner. Rate limit: 100 requests/min per user. # Delete a collection Source: https://docs.prisme.ai/ai-collection/collections/delete-a-collection /api-reference/ai-collection/swagger.yml delete /v1/collections/{collection_id} Permanently deletes the collection and **all its records**. # Get collection metadata Source: https://docs.prisme.ai/ai-collection/collections/get-collection-metadata /api-reference/ai-collection/swagger.yml get /v1/collections/{collection_id} # Get saved charts Source: https://docs.prisme.ai/ai-collection/collections/get-saved-charts /api-reference/ai-collection/swagger.yml get /v1/collections/{collection_id}/charts Returns the collection's saved chart specs (shared at the collection level). # List collections Source: https://docs.prisme.ai/ai-collection/collections/list-collections /api-reference/ai-collection/swagger.yml get /v1/collections Returns the collections owned by the caller within their organization, paginated. Set `with_counts=true` to include an estimated `row_count` per collection (from database statistics, near-free, ideal for dashboards; the exact count is available via the count endpoint). Rate limit: 100 requests/min per user. # Replace saved charts Source: https://docs.prisme.ai/ai-collection/collections/replace-saved-charts /api-reference/ai-collection/swagger.yml put /v1/collections/{collection_id}/charts Replaces the full set of chart specs (max 50). Send the whole array. # Update collection metadata Source: https://docs.prisme.ai/ai-collection/collections/update-collection-metadata /api-reference/ai-collection/swagger.yml patch /v1/collections/{collection_id} Updates the description, settings, or the `agent_ids` sharing list. To evolve the schema after creation, use the schema and indexes endpoints instead. # MCP endpoint (JSON-RPC 2.0) Source: https://docs.prisme.ai/ai-collection/mcp/mcp-endpoint-json-rpc-20 /api-reference/ai-collection/swagger.yml post /ai-collection/mcp Model Context Protocol endpoint for AI agents and MCP clients. Implements `initialize`, `tools/list`, and `tools/call` over JSON-RPC 2.0. Available tools: `data_discover` (schema + sample rows, call first), `data_create_collection`, `data_insert`, `data_query`, `data_get`, `data_update`, `data_upsert`, `data_delete`, `data_count`, `data_distinct`, `data_aggregate`, `suggest_schema`. Tool arguments mirror the REST payloads documented above. A per-collection scoped endpoint is also available at `/v1/collections/{collection_id}/mcp`: it binds an agent to a single collection (no `collection_id` argument needed on each call). Rate limit: 100 requests/min per user. # Bulk-insert records (large imports) Source: https://docs.prisme.ai/ai-collection/records/bulk-insert-records-large-imports /api-reference/ai-collection/swagger.yml post /v1/collections/{collection_id}/data/bulk Batch-inserts up to 5,000 records in a single call, built for large CSV imports (the client streams the file and posts batches). A batch is a single database flush and is all-or-nothing: if one record violates a column type or constraint the whole batch is rejected with `422` and no per-row error list, so validate and coerce types client-side before posting. Provide `upsert_key` (a column with a unique constraint) for an idempotent re-import that updates instead of duplicating. Rate limit: 120 requests/min per user. # Delete a record Source: https://docs.prisme.ai/ai-collection/records/delete-a-record /api-reference/ai-collection/swagger.yml delete /v1/collections/{collection_id}/data/{record_id} Deletes a single record. Bulk deletion (multiple records in one call) is only available when explicitly enabled in the platform configuration. # Get a record Source: https://docs.prisme.ai/ai-collection/records/get-a-record /api-reference/ai-collection/swagger.yml get /v1/collections/{collection_id}/data/{record_id} # Insert records Source: https://docs.prisme.ai/ai-collection/records/insert-records /api-reference/ai-collection/swagger.yml post /v1/collections/{collection_id}/data Inserts one record or a batch of up to 1,000 records. Rate limit: 20 requests/min per user. # Query records Source: https://docs.prisme.ai/ai-collection/records/query-records /api-reference/ai-collection/swagger.yml get /v1/collections/{collection_id}/data Returns records matching a MongoDB-style filter, with sorting, pagination, and field projection. Operators executing code or cross-referencing data (`$where`, `$function`, `$expr`, `$lookup`, `$merge`, `$accumulator`, `$out`) are rejected. Text equality is exact and case-sensitive: `{"category":"informatique"}` will not match a stored `Informatique`. For case-insensitive matching use a regex, e.g. `{"category":{"$regex":"^informatique$","$options":"i"}}`, or call the distinct endpoint first to get the exact stored value. Rate limit: 100 requests/min per user. # Update a record Source: https://docs.prisme.ai/ai-collection/records/update-a-record /api-reference/ai-collection/swagger.yml patch /v1/collections/{collection_id}/data/{record_id} Updates the record's fields. System fields (`_id`, `created_at`, ownership metadata) are protected and stripped from the payload. # Upsert a record Source: https://docs.prisme.ai/ai-collection/records/upsert-a-record /api-reference/ai-collection/swagger.yml post /v1/collections/{collection_id}/data/upsert Inserts the record, or updates the existing one matching the `match_fields` values (e.g. an email or a SKU). Rate limit: 50 requests/min per user. # Add or merge columns Source: https://docs.prisme.ai/ai-collection/schema/add-or-merge-columns /api-reference/ai-collection/swagger.yml patch /v1/collections/{collection_id}/schema Adds new typed columns to an existing collection by merging the provided `properties` into the current schema. Existing indexes and unique constraints are preserved. # Apply indexes and unique constraints Source: https://docs.prisme.ai/ai-collection/schema/apply-indexes-and-unique-constraints /api-reference/ai-collection/swagger.yml post /v1/collections/{collection_id}/indexes Applies indexes and unique constraints to an existing collection. Provide the full desired set; the constraints are persisted so a later schema change re-applies them. A unique constraint is required to use a column as an upsert key in bulk import. # Change a binding role Source: https://docs.prisme.ai/ai-collection/sharing/change-a-binding-role /api-reference/ai-collection/swagger.yml patch /v1/collections/{collection_id}/access/{principal_type}/{principal_id} # Get an access binding Source: https://docs.prisme.ai/ai-collection/sharing/get-an-access-binding /api-reference/ai-collection/swagger.yml get /v1/collections/{collection_id}/access/{principal_type}/{principal_id} # Grant access Source: https://docs.prisme.ai/ai-collection/sharing/grant-access /api-reference/ai-collection/swagger.yml post /v1/collections/{collection_id}/access Grants a role to a principal within the same organization. The principal must be a member of the caller's org (users and groups are verified via governance). Cross-org principals are rejected. # List access bindings Source: https://docs.prisme.ai/ai-collection/sharing/list-access-bindings /api-reference/ai-collection/swagger.yml get /v1/collections/{collection_id}/access Lists who the collection is shared with (owner, users, groups, org). # Revoke access Source: https://docs.prisme.ai/ai-collection/sharing/revoke-access /api-reference/ai-collection/swagger.yml delete /v1/collections/{collection_id}/access/{principal_type}/{principal_id} # Create an announcement Source: https://docs.prisme.ai/ai-governance-v2/announcements/create-an-announcement /api-reference/ai-governance-v2/swagger.yml post /v1/announcements Creates an announcement with validated audience targets. When the new announcement has `status: active`, a `notifications.new` event is emitted to broadcast the message. Requires `announcements:write` permission. Rate-limited to 50 calls per minute. # Delete an announcement Source: https://docs.prisme.ai/ai-governance-v2/announcements/delete-an-announcement /api-reference/ai-governance-v2/swagger.yml delete /v1/announcements/{announcementId} Deletes the announcement and cascades to per-user `user_announcement_state` rows. Requires `announcements:write` permission. Rate-limited to 50 calls per minute. # Get an announcement by id Source: https://docs.prisme.ai/ai-governance-v2/announcements/get-an-announcement-by-id /api-reference/ai-governance-v2/swagger.yml get /v1/announcements/{announcementId} Returns the full announcement record. Open to any authenticated user; access is scoped to the caller's organization (or platform-wide announcements with `orgSlug: null`). # List announcements for the current organization Source: https://docs.prisme.ai/ai-governance-v2/announcements/list-announcements-for-the-current-organization /api-reference/ai-governance-v2/swagger.yml get /v1/announcements Lists announcements scoped to the current organization (or platform-wide entries with `orgSlug: null`). Excludes archived items by default. Open to any authenticated user; rate-limited to 100 calls per minute. # Update an announcement Source: https://docs.prisme.ai/ai-governance-v2/announcements/update-an-announcement /api-reference/ai-governance-v2/swagger.yml patch /v1/announcements/{announcementId} Partially updates an announcement. Only provided fields are applied. When transitioning from `draft` to `active`, emits a `notifications.new` event. Requires `announcements:write` permission. Rate-limited to 50 calls per minute. # Delete legal content for a type Source: https://docs.prisme.ai/ai-governance-v2/legal/delete-legal-content-for-a-type /api-reference/ai-governance-v2/swagger.yml delete /v1/legal/{type} Removes the legal document for the given type and the caller's organization. Requires the `announcements:write` permission (this endpoint reuses the announcements auth resource). Rate-limited to 50 calls per minute. # Read legal content for a type and the caller's organization Source: https://docs.prisme.ai/ai-governance-v2/legal/read-legal-content-for-a-type-and-the-callers-organization /api-reference/ai-governance-v2/swagger.yml get /v1/legal/{type} Returns the HTML legal content stored for the caller's organization under the given type. Open to any authenticated user; the content is read directly from the workspace's `/files` API using the predictable id `legal-{orgSlug}-{type}`. Returns an empty `content` when no document exists yet. # Upsert legal content for a type Source: https://docs.prisme.ai/ai-governance-v2/legal/upsert-legal-content-for-a-type /api-reference/ai-governance-v2/swagger.yml put /v1/legal/{type} Creates or replaces the legal document for the given type and the caller's organization. Content is uploaded as an HTML file via the workspace's `/files` API using the deterministic id `legal-{orgSlug}-{type}`. Requires the `announcements:write` permission (note: this endpoint reuses the announcements auth resource - the field is not specific to legal). Rate-limited to 50 calls per minute. # Dismiss a notification for the current user Source: https://docs.prisme.ai/ai-governance-v2/notifications/dismiss-a-notification-for-the-current-user /api-reference/ai-governance-v2/swagger.yml post /v1/notifications/{notificationId}/dismiss Upserts `user_announcement_state.dismissed = true` for the caller. The notification will no longer appear in `GET /v1/notifications` results. Open to any authenticated user; rate-limited to 50 calls per minute. # Get a notification and mark it as read Source: https://docs.prisme.ai/ai-governance-v2/notifications/get-a-notification-and-mark-it-as-read /api-reference/ai-governance-v2/swagger.yml get /v1/notifications/{notificationId} Returns the underlying announcement and upserts `user_announcement_state.read = true` for the current user. The first GET creates the per-user state row. Open to any authenticated user; rate-limited to 100 calls per minute. # Get unread notifications count for a product Source: https://docs.prisme.ai/ai-governance-v2/notifications/get-unread-notifications-count-for-a-product /api-reference/ai-governance-v2/swagger.yml get /v1/notifications/unread-count Returns the number of active, non-dismissed, unread announcements that target the current user for the given product. Open to any authenticated user; rate-limited to 100 calls per minute. # List notifications for the current user Source: https://docs.prisme.ai/ai-governance-v2/notifications/list-notifications-for-the-current-user /api-reference/ai-governance-v2/swagger.yml get /v1/notifications Returns the active announcements that target the current user (lazy projection over `announcements` joined with `user_announcement_state`). Filters out dismissed items. Open to any authenticated user; rate-limited to 100 calls per minute. # Detect anomalies in errors, latency, and traffic Source: https://docs.prisme.ai/ai-governance-v2/observability/detect-anomalies-in-errors-latency-and-traffic /api-reference/ai-governance-v2/swagger.yml get /v1/observability/{workspaceId}/issues Compares the most recent hour against a 7-day rolling baseline and surfaces alerts for error spikes, latency regressions, and no-traffic conditions. Sensitivity controls the multiplier on baseline thresholds. Requires `observability:read` permission. Rate-limited to 100 calls per minute. # Get a cross-organization platform observability summary Source: https://docs.prisme.ai/ai-governance-v2/observability/get-a-cross-organization-platform-observability-summary /api-reference/ai-governance-v2/swagger.yml get /v1/observability/platform/summary Aggregated view of platform health, performance, infrastructure, and cost across every active workspace in the requested window. Discovers active workspaces first, then runs the bulk aggregator in `summary_only` mode. Requires `observability_platform:read` permission. Rate-limited to 100 calls per minute. # Get the full trace timeline for a correlationId Source: https://docs.prisme.ai/ai-governance-v2/observability/get-the-full-trace-timeline-for-a-correlationid /api-reference/ai-governance-v2/swagger.yml get /v1/observability/{workspaceId}/traces/{correlationId} Returns the timeline, automation summary, and error list for a given correlation id. Returns 404 when no events exist for that correlation id in the workspace. Requires `observability:read` permission. Rate-limited to 100 calls per minute. # Get the real-time event feed for a workspace Source: https://docs.prisme.ai/ai-governance-v2/observability/get-the-real-time-event-feed-for-a-workspace /api-reference/ai-governance-v2/swagger.yml get /v1/observability/{workspaceId}/feed Returns runtime events (interactions, errors, failed fetches, executions) for the requested window with filtering, pagination, and per-type breakdown. Requires `observability:read` permission. Rate-limited to 100 calls per minute. # Get the unified observability dashboard for a workspace Source: https://docs.prisme.ai/ai-governance-v2/observability/get-the-unified-observability-dashboard-for-a-workspace /api-reference/ai-governance-v2/swagger.yml get /v1/observability/{workspaceId}/dashboard Returns the per-workspace dashboard in a single response: health, metrics, errors, costs, and usage sections. Backed by the per-interval `platform_metrics` rows plus a summary cache; refreshes the current open interval on demand and self-heals gaps in closed intervals. Requires `observability:read` permission. # Get the workspace dependency graph Source: https://docs.prisme.ai/ai-governance-v2/observability/get-the-workspace-dependency-graph /api-reference/ai-governance-v2/swagger.yml get /v1/observability/{workspaceId}/dependencies Returns the call graph between workspace automations and the app-instance automations they invoke, computed from runtime execution events for the requested window. Requires `observability:read` permission. Rate-limited to 100 calls per minute. # List the top N most active workspaces for a period Source: https://docs.prisme.ai/ai-governance-v2/observability/list-the-top-n-most-active-workspaces-for-a-period /api-reference/ai-governance-v2/swagger.yml get /v1/observability/platform/top-workspaces Returns the top N most active workspaces (by interaction count) for the requested period. Reads from the daily-refreshed cache; on first-ever call computes inline and seeds the cache. Requires `observability:read` permission. Rate-limited to 100 calls per minute. # List workspaces visible to observability users Source: https://docs.prisme.ai/ai-governance-v2/observability/list-workspaces-visible-to-observability-users /api-reference/ai-governance-v2/swagger.yml get /v1/observability/workspaces Wraps the platform `/v2/workspaces` API using the workspace's `superAdminToken` so any user with `observability:read` can list every workspace, not only the ones they personally have access to. Returns the raw shape forwarded from the platform API (an array of workspace summaries). Requires `observability:read` permission. Rate-limited to 100 calls per minute. # List active organizations (platform-wide) Source: https://docs.prisme.ai/ai-governance-v2/orgs/list-active-organizations-platform-wide /api-reference/ai-governance-v2/swagger.yml get /v1/orgs/active Returns the list of active organizations by wrapping the platform `GET /orgs?limit=200` call with the workspace's `superAdminToken`. Used by `ai-insights-v2` cron jobs for analytics aggregation; also callable cross-workspace from the configured trusted source workspaces. Requires `observability_platform:read` permission (or trusted source workspace context). Rate-limited to 10 calls per hour. # List audit events for an organization Source: https://docs.prisme.ai/ai-governance-v2/orgs/list-audit-events-for-an-organization /api-reference/ai-governance-v2/swagger.yml get /v1/orgs/{orgSlug}/audit Returns audit events stored as `organizations.audit` events on the platform topic. Filterable by category, action, and date range. Requires `observability:read` permission scoped to the path `orgSlug`. Rate-limited to 100 calls per minute. # Authentication Source: https://docs.prisme.ai/api-reference/authentication Learn how to authenticate with the Prisme.ai API The Prisme.ai API uses a robust authentication system to secure access to resources. This guide explains how authentication works and how to implement it in your API requests. Authentication is part of what makes the platform governed by design: the same identity model spans SSO, service accounts, and per-organization scoping across the unified foundation. ## Authentication Methods > [tab] JWT Authentication > > JSON Web Tokens (JWTs) are the primary authentication method for web clients and interactive sessions. > > **1. Obtain a JWT** > > JWTs are issued in two scenarios: > > 1. **OpenID Connect (OIDC) authentication**: After authenticating with the OIDC server (the api-gateway), clients receive an authorization code that can be exchanged for a JWT. Find your current JWT in the `access-token` cookie sent to the `https://api.studio.prisme.ai/v2/me` API after opening any Prisme.ai page > 2. **Anonymous authentication**: The `/v2/login/anonymous` endpoint initiates unauthenticated sessions and returns a JWT. > > ```bash theme={null} > # Example of anonymous login > curl -X POST "https://api.studio.prisme.ai/v2/login/anonymous" \ > -H "Content-Type: application/json" > ``` > > Response contains a JWT: > > ```json theme={null} > { > "userId": "anon-123456", > "sessionId": "session-789012", > "token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImtleS0xIn0..." > } > ``` > > **2. Use the JWT** > > Include the JWT in the Authorization header for API requests: > > ```bash theme={null} > curl -X GET "https://api.studio.prisme.ai/v2/workspaces" \ > -H "Content-Type: application/json" \ > -H "Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImtleS0xIn0..." > ``` > > > [!WARNING] > > > > JWTs have an expiration time defined by the `ACCESS_TOKENS_MAX_AGE` setting (default is 30 days). Your application should handle token refreshing or re-authentication when tokens expire. > [tab] Access Tokens > > Access tokens are opaque tokens generated for longer-term programmatic access. They are ideal for scripts, integrations, and backend applications. > > > [!NOTE] > > > > Since v27.9.0, creating and using a personal access token requires the `account:access-tokens:use` permission in the organization the request runs in. If you belong to several organizations, send the [`x-prismeai-org-slug` header](#active-organization) to choose it. See [Identity & Access → Permission Format](/products/ai-governance/identity-access#permission-format). > > **1. Generate an Access Token** > > Authenticated users can generate access tokens using the `/v2/user/accessTokens` endpoint: > > ```bash theme={null} > curl -X POST "https://api.studio.prisme.ai/v2/user/accessTokens" \ > -H "Content-Type: application/json" \ > -H "Authorization: Bearer YOUR_JWT" \ > -d '{ > "name": "My Integration Token", > "expiresAt": "2025-04-28T10:13:21.719Z" > }' > ``` > > The response includes the access token: > > ```json theme={null} > { > "name": "My Integration Token", > "expiresAt": "2023-12-31T23:59:59Z", > "userId": "user id", > "token": "at:1234abcd5678efgh", > "id": "token id" > } > ``` > > **2. Use the Access Token** > > Include the access token in the Authorization header the same way as JWTs: > > ```bash theme={null} > curl -X GET "https://api.studio.prisme.ai/v2/workspaces" \ > -H "Content-Type: application/json" \ > -H "Authorization: Bearer at:1234abcd5678efgh" > ``` > > > [!WARNING] > > > > Access tokens cannot be recovered if lost. Store them securely and never expose them in client-side code. > [tab] Workspace API Keys > > Workspace API keys are scoped to a **single workspace**. They let an integration read, update, or execute that specific workspace with elevated privileges, using the CASL `rules` granted at creation. Use them for workspace-local integrations; for organization-wide programmatic access, use Organization API Keys (see the next tab) instead. > > **1. Create an API Key** > > Workspace administrators can create API keys with specific permissions: > > ```bash theme={null} > curl --location 'https://api.studio.prisme.ai/v2/workspaces//security/apikeys' \ > --header 'Authorization: Bearer ' \ > --header 'Content-Type: application/json' \ > --data '{ > "name": "Your ApiKey name", > "rules": [ > { > "action": "read", > "subject": "workspaces" > }, > { > "action": "create", > "subject": "files" > } > ] > }' > ``` > > The response includes the API key: > > ```json theme={null} > { > "apiKey": "", > "name": "Your ApiKey name", > "rules": [ > { > "action": [ > "read" > ], > "subject": "workspaces", > "conditions": { > "id": "" > } > }, > { > "action": [ > "create" > ], > "subject": "files", > "conditions": { > "workspaceId": "" > } > } > ], > "subjectId": "", > "subjectType": "workspaces" > } > ``` > > See [RBAC for more advanced rules](/products/ai-builder/rbac) > > **2. Use the API Key** > > Include the API key in the x-prismeai-api-key header: > > ```bash theme={null} > curl -X GET "https://api.studio.prisme.ai/v2/workspaces/{workspaceId}" \ > -H "Content-Type: application/json" \ > -H "x-prismeai-api-key: " > ``` > > > [!NOTE] > > > > API keys follow the principle of least privilege. They only have the permissions explicitly granted during creation. > [tab] Organization API Keys > > Organization API keys are scoped to an **organization** (not a single workspace) and enable programmatic access from external systems. Unlike workspace API keys, they carry organization-level permissions (`product:resource:action`) and optional resource **scopes**, and are resolved natively by the runtime. > > Crucially, and **unlike workspace API keys**, they let you call the Prisme.ai **product APIs** — such as AI Knowledge, Agent Factory, or the LLM Gateway — rather than only reading/updating/executing a single workspace. > > They use the format `iak_{orgSlug}_{uuid}`; the embedded `orgSlug` lets the auth middleware resolve the organization without a database lookup. Keys are stored hashed and the plaintext key is shown only once at creation. > > **1. Create an Organization API Key** > > Create keys from the **API Keys** section of the organization, selecting permissions (and optionally scopes and an expiration date). Keys are managed under `/v2/orgs/:orgSlug/api-keys`. > > **2. Use the Organization API Key** > > Include the key in the `x-prismeai-api-key` header: > > ```bash theme={null} > curl -X GET "https://api.studio.prisme.ai/v2/workspaces" \ > -H "Content-Type: application/json" \ > -H "x-prismeai-api-key: iak_acme-corp_a1b2c3d4e5f6g7h8..." > ``` > > > [!NOTE] > > > > For full details on scopes, validation, and key rotation, see [Identity & Access — API Keys](https://docs.prisme.ai/products/ai-governance/identity-access#api-keys). > [tab] Token Exchange > > Token exchange lets a client that has **already authenticated against an external identity provider** (OIDC) trade that provider's `id_token` for a nominative Prisme.ai JWT, with **no browser redirect**. It is the headless counterpart of the browser SSO callback and follows the spirit of [RFC 8693](https://datatracker.ietf.org/doc/html/rfc8693). > > Use it for any client that already holds an external IdP token and cannot (or should not) run the interactive browser flow: native and mobile apps, desktop clients, CLIs, and backend / server-to-server integrations. > > **1. Enable the provider for token exchange** > > The target OIDC provider must opt in with `allowTokenExchange: true` in its configuration. See [Enterprise Authentication](/self-hosting/entreprise/authentication) for how to configure providers. > > **2. Exchange the external id\_token** > > Send the provider's `id_token` to the token-exchange endpoint: > > ```bash theme={null} > curl -X POST "https://api.studio.prisme.ai/v2/login/token-exchange" \ > -H "Content-Type: application/json" \ > -d '{ > "provider": "your-oidc-provider-slug", > "subject_token": "" > }' > ``` > > The response contains a Prisme.ai JWT, just like the other login flows: > > ```json theme={null} > { > "id": "user id", > "email": "user@example.com", > "sessionId": "session-789012", > "token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVC...", > "expires": "2025-07-01T10:13:21.719Z" > } > ``` > > Optionally pass `expiresAfter` (seconds) to control the session lifetime. `subject_token_type` and `grant_type` are accepted for RFC 8693 compatibility but are optional. > > **3. Use the JWT** > > Send the returned token as a Bearer token, exactly like a JWT obtained from any other flow: > > ```bash theme={null} > curl -X GET "https://api.studio.prisme.ai/v2/me" \ > -H "Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVC..." > ``` > > > [!NOTE] > > > > The user is matched or provisioned exactly like the browser SSO callback (same identity mapping), **organization resolution included**: the exchange claims pending invitations, auto-joins the provider's organization and syncs the user's `orgSlugs`, exactly as the browser callback does. The first exchange for an unknown user creates the Prisme.ai account, with its membership. > > > [!WARNING] > > > > The `subject_token` is verified against the provider's published keys (`jwks_uri`), and its `aud` claim must match the provider's `client_id` (and `iss` the configured `issuer`). A token minted for a different application is rejected. The endpoint only works for providers that explicitly set `allowTokenExchange: true`. > > > [!WARNING] > > > > A provider tied to an organization must resolve to that organization for the login to succeed. A token that authenticates but resolves no organization is refused rather than producing a member-less account, which used to yield an account that held no permission and answered 403 on every organization-scoped resource, with no way to repair it afterwards. > > > [!NOTE] > > > > The endpoint is rate-limited per source IP (default **60 exchanges/min**, configurable via `RATE_LIMIT_TOKEN_EXCHANGE`). When brokering exchanges server-side, all users share one IP; exceeding the limit returns `429 Too Many Requests`. Self-hosters can raise it; see [Environment Variables](/self-hosting/kubernetes/environment-variables). > [tab] Web Session Ticket > > A native client authenticates with a bearer token, and that token must never reach a browser: there is no API to seed a cookie inside a system web view, and putting the token in a URL would leak it through the `Referer` header, proxy logs and history. Flows that need a real web session, connector OAuth in particular, were therefore unreachable from a mobile app. > > The **web session ticket** solves this the way [RFC 9126](https://datatracker.ietf.org/doc/html/rfc9126) treats `request_uri`: the app states its intent through an authenticated back channel and receives an opaque single-use reference, and that reference is the only thing that ever travels through the browser. > > **1. Mint a ticket** > > Call the endpoint with the API token the app already holds: > > ```bash theme={null} > curl -X POST "https://api.studio.prisme.ai/v2/user/webSessionTicket" \ > -H "Authorization: Bearer " \ > -H "Content-Type: application/json" \ > -d '{ > "redirect": "https://studio.prisme.ai/workspaces", > "expiresIn": 60 > }' > ``` > > ```json theme={null} > { > "ticket": "", > "url": "https://api.studio.prisme.ai/v2/user/webSession?ticket=...", > "expiresIn": 60, > "expires": "2026-08-31T10:00:00.000Z" > } > ``` > > The ticket carries 256 bits of randomness and no information of its own. It is bound to the caller and to its session, lives 60 seconds by default and 300 at most (`WEB_SESSION_TICKET_TTL` and `WEB_SESSION_TICKET_MAX_TTL`), and is forbidden to access tokens and service accounts. > > **2. Open the returned URL in the system browser** > > `GET /v2/user/webSession` burns the ticket, sets the `access-token` cookie under `Referrer-Policy: no-referrer` and `Cache-Control: no-store`, then redirects to your `redirect` target. The window now holds an ordinary Prisme.ai session, so anything that works on web, connector OAuth included, works from there. > > > [!WARNING] > > > > `redirect` must point at this platform (its API, consoles or workspace pages), or be a root-relative path. It is validated when the ticket is minted and again when it is exchanged. Self-hosters can allow extra hostnames with `WEB_SESSION_ALLOWED_REDIRECT_HOSTS`. > > > [!NOTE] > > > > The cookie reuses the caller's `prismeaiSessionId`, so the app and the browser share one session: same MFA state, same lifetime, and nothing extra to revoke. The exchange endpoint is rate-limited per source IP (default **30/min**, `RATE_LIMIT_WEB_SESSION`). Never log a ticket. The SDK exposes the first call as `api.webSessionTicket()`. ## JWT Token Details > [accordion] JWT Structure and Signing > > JWTs issued by Prisme.ai are signed tokens with the following characteristics: > > * **Algorithm**: Defined by `JWKS_ALG` (default: RS256) > * **Key Type**: Defined by `JWKS_KTY` (default: RSA) > * **Key Size**: Defined by `JWKS_SIZE` (default: 2048 bits) > > The JWT contains claims about the authenticated user, session, and permissions. > > Example decoded JWT payload: > > ```json theme={null} > { > "prismeaiSessionId": "session id", > "jti": "...", > "sub": "user id", > "iat": 1744705420, > "exp": 1747297420, > "scope": "events:write events:read webhooks pages:read files:write files:read", > "client_id": "prismeai-studio-client", > "iss": "...", > "aud": "..." > } > ``` > [accordion] JWT Key Rotation > > The api-gateway automatically handles JWT key rotation: > > 1. JWTs are signed using a JSON Web Key (JWK) that is stored in the api-gateway database > > 2. JWKs are automatically rotated according to `JWKS_ROTATION_DAYS` (default: 30 days) > > 3. When a JWK is rotated, it remains available for verification of existing JWTs > > 4. Rotated JWKs are removed after `ACCESS_TOKENS_MAX_AGE` (default: 30 days) once all their signed JWTs should have expired > > 5. Events (`gateway.jwks.updated` and `runtime.jwks.updated`) synchronize all api-gateway and runtime instances when JWKs are rotated or removed > > > [!WARNING] > > > > If a signing JWK is compromised, it must be manually deleted from the database before restarting both api-gateway and runtime services. > [accordion] Public Keys > > Public keys for verifying JWTs are available at: > > ``` > https://api.studio.prisme.ai/oidc/jwks > ``` > > This endpoint returns the public keys in JWKS (JSON Web Key Set) format, which can be used to verify token signatures. ## Authentication Modes Summary | Mode | Caller | Token Format | | - | - | - | | **User Session** | Browser / frontend | OIDC Bearer token or `access-token` cookie | | **Workspace API Key** | Workspace-local integrations | Opaque key in `x-prismeai-api-key` header | | **Organization API Key** | External integrations | `iak_{orgSlug}_{uuid}` in `x-prismeai-api-key` header | | **Access Token** | Programmatic clients | `at:` prefixed token in Authorization header | | **Cross-Workspace Call** | Other workspaces | Identified by `run.sourceWorkspaceId` (injected by runtime) | ### Active Organization Every authenticated request runs in the context of one **active organization**, which scopes permissions and resources (`{{session.org}}` in automations). It is resolved on each request, by priority: 1. The organization in the URL path (`/v2/orgs/:orgSlug/...`) 2. The organization of an organization API key (`iak_...`) 3. The `x-prismeai-org-slug` request header 4. The user's default organization: the one stored in the session, else the first membership Send `x-prismeai-org-slug` with each request to choose the organization explicitly, whatever the credential: browser session, Personal Access Token (`at:...`) or OIDC token. The choice only applies to that request: nothing is stored server-side, so two browser tabs, or two clients sharing a session, can work on two organizations at the same time. The Prisme.ai web app sends it on every call, each tab keeping its own organization. ```bash theme={null} curl https://api.studio.prisme.ai/v2/me \ -H "Authorization: Bearer $TOKEN" \ -H "x-prismeai-org-slug: my-other-org" ``` * **Allowed organizations**: the user must be a member of the organization, and the organization must be active. Platform super admins may target any existing organization, suspended ones included, to administer it. * **Refusal**: any other value (unknown organization, suspended or non-member organization for a regular user, malformed slug) is refused with `403 ForbiddenError`. The request never falls back to another organization. * **Response**: responses carry the organization the request was resolved against in the `x-prismeai-org-slug` response header (exposed to browsers through CORS). * **WebSockets**: browsers cannot set headers on a WebSocket. Pass the organization in the socket.io handshake instead: `auth: { extraHeaders: { 'x-prismeai-org-slug': 'my-other-org' } }`. The `@prisme.ai/sdk` does it when `api.orgSlug` is set. * **Automations**: a `fetch` from an automation to the Prisme.ai API, made with the identity of the user who triggered the run, carries the organization of the run. An automation acting as that user cannot target another of their organizations: an `x-prismeai-org-slug` naming another organization is refused with `403 ForbiddenError` (an app installed in one organization cannot act in the user's other ones). The header still selects the organization of a user token the automation forwards explicitly, and is ignored next to an organization API key. > [!NOTE] > > On a bare `/v2/orgs/:orgSlug` path (no sub-path), permissions are evaluated against the active organization. Send `x-prismeai-org-slug: :orgSlug` along to read or update an organization other than your default one. > [!WARNING] > > `PUT /v2/user/active-org` is **deprecated**. It changes the default organization of the whole session, shared by every tab and device using it, and its responses carry a `Deprecation` header ([RFC 9745](https://www.rfc-editor.org/rfc/rfc9745), deprecation date as `@`). Send `x-prismeai-org-slug` with each request instead. The endpoint will be removed in a future version. ## Authentication Flow 1. **Client Authentication**: The client authenticates via OIDC or anonymous login to obtain a JWT 2. **API Gateway Validation**: Requests are sent to the api-gateway with the JWT or access token 3. **Header Transformation**: The api-gateway validates the token and adds an `x-prismeai-user-id` header 4. **Internal Routing**: The request is forwarded to the appropriate microservice with the user context 5. **Authorization Check**: The target microservice checks if the authenticated user has the required permissions > [!WARNING] > > Backend microservices rely on the `x-prismeai-user-id` header for identification. This header should not be directly set in client requests, as it will be overwritten by the api-gateway. ## Context Available in Automations When building automations, the following context variables are available from the authenticated request: ### Session Context | Variable | Description | | - | - | | `{{session.id}}` | Session ID | | `{{session.org.slug}}` | Active organization slug (see [Active Organization](#active-organization)) | | `{{session.org.name}}` | Organization name | | `{{session.org.role.slug}}` | User's role slug in the active org | | `{{session.org.role.permissions}}` | Role permission strings (array) | | `{{session.org.role.scopes}}` | Role scope strings (array) | | `{{session.org.groups}}` | Groups the user belongs to in this org | | `{{session.org.settings}}` | Org settings (e.g. LLM governance) | | `{{session.org.subscription}}` | Org subscription object | ### User Context | Variable | Description | | - | - | | `{{user.id}}` | User ID (read-only) | | `{{user.email}}` | User email | | `{{user.role}}` | Workspace CASL role (e.g. `owner`, `editor`), **not** the org role | | `{{user.orgSlugs}}` | Array of all org slugs the user belongs to (read-only) | ### Run Context | Variable | Description | | - | - | | `{{run.permissions}}` | Org permissions as a nested object (`{product: {resource: {action: true}}}`) | | `{{run.scopes}}` | Raw scopes array from org role | | `{{run.correlationId}}` | Request correlation ID | | `{{run.sourceWorkspaceId}}` | Source workspace ID (for cross-workspace calls) | > [!NOTE] > > `user.role` is the **workspace-level** role (from CASL security rules), not the organization role. The organization role is in `session.org.role`. ## Token Security > [card] Token Storage > > * Store tokens securely (not in localStorage for browser applications) > * Use HttpOnly cookies where possible > * For mobile apps, use secure storage mechanisms > * For server applications, use environment variables or secure vaults > [card] Token Transmission > > * Always use HTTPS/TLS for API communication > * Use Authorization header rather than query parameters > * Don't include tokens in URLs or log them > * Implement CSRF protection for cookie-based authentication > [card] Token Management > > * Implement token refresh strategies > * Set appropriate token expiration times > * Have processes for token revocation > * Regularly rotate long-lived tokens > [card] Error Handling > > * Handle 401 (Unauthorized) responses properly > * Don't expose detailed error information to clients > * Implement rate limiting for authentication failures > * Log authentication failures for security monitoring ## Authentication Configuration > [tab] Environment Variables > > JWT and authentication behavior can be configured with these environment variables: > > | Variable | Description | Default Value | > | - | - | - | > | `JWKS_ROTATION_DAYS` | Rotation period in days | 30 | > | `JWKS_KTY` | JWK Algorithm family | RSA | > | `JWKS_ALG` | JWK signature algorithm | RS256 | > | `JWKS_SIZE` | JWK size | 2048 | > | `ACCESS_TOKENS_MAX_AGE` | JWT expiration time in seconds | 2592000 (30 days) | > [tab] Authorization Configuration > > Each workspace manages its own permissions system using Role Based Access Control (RBAC). > > > [!NOTE] > > > > See the [Security](/api-reference/security) page for more details on the authorization system. ## Code Examples > [tab] Node.js > > ```javascript theme={null} > const axios = require('axios'); > > async function getPrismeData() { > // Get or refresh your token using your authentication method > const token = 'YOUR_ACCESS_TOKEN'; > > try { > const response = await axios.get('https://api.studio.prisme.ai/v2/workspaces', { > headers: { > 'Content-Type': 'application/json', > 'Authorization': `Bearer ${token}` > } > }); > > return response.data; > } catch (error) { > if (error.response && error.response.status === 401) { > // Handle authentication error, potentially refresh token > console.error('Authentication failed, token may be expired'); > } else { > console.error('API request failed:', error.message); > } > throw error; > } > } > ``` > [tab] Python > > ```python theme={null} > import requests > > def get_prisme_data(): > # Get or refresh your token using your authentication method > token = 'YOUR_ACCESS_TOKEN' > > headers = { > 'Content-Type': 'application/json', > 'Authorization': f'Bearer {token}' > } > > try: > response = requests.get('https://api.studio.prisme.ai/v2/workspaces', headers=headers) > response.raise_for_status() # Raise exception for HTTP errors > return response.json() > except requests.exceptions.HTTPError as err: > if err.response.status_code == 401: > # Handle authentication error, potentially refresh token > print('Authentication failed, token may be expired') > else: > print(f'API request failed: {err}') > raise > ``` > [tab] cURL > > ```bash theme={null} > # Set your token as a variable > TOKEN="YOUR_ACCESS_TOKEN" > > # Make API request > curl -X GET "https://api.studio.prisme.ai/v2/workspaces" \ > -H "Content-Type: application/json" \ > -H "Authorization: Bearer $TOKEN" > ``` ## Next Steps > [card] [Error Handling](/api-reference/errors) > > Learn about common API errors and how to handle them > [card] [Rate Limits](/api-reference/rate-limits) > > Understand the API's rate limiting policies > [card] [Security](/api-reference/security) > > Read about our security recommendations and best practices # Errors Source: https://docs.prisme.ai/api-reference/errors Understanding and handling Prisme.ai API errors The Prisme.ai API uses conventional HTTP response codes to indicate the success or failure of an API request. This page provides a comprehensive guide to understanding and handling errors from the API. Consistent error handling reflects the platform's natively traceable foundation, where a correlation ID follows each request end to end so you can pinpoint failures across the unified system. ## Error Response Format All API errors follow a consistent format: ```json theme={null} { "error": "error_code", "message": "A human-readable error message", "details": { // Additional error-specific information } } ``` As for any request, you will also receive a `x-correlation-id` response header that will help you find relevent activity events or application logs. > [card] code > > A machine-readable string identifier for the error type. Use this for programmatic error handling. > [card] message > > A human-readable description of the error. The message may change over time, so don't rely on exact message matching. > [card] details > > An optional object containing additional information about the error, which varies based on the error type. > [card] requestId > > A unique identifier for the request that can be provided to support for troubleshooting. ## HTTP Status Codes > [tab] 2xx Success > > | Code | Description | > | - | - | > | 200 | OK - The request succeeded | > | 201 | Created - A new resource was successfully created | > | 202 | Accepted - The request has been accepted for processing | > | 204 | No Content - The request succeeded but returns no content | > [tab] 4xx Client Errors > > | Code | Description | > | - | - | > | 400 | Bad Request - The request contains invalid parameters or syntax | > | 401 | Unauthorized - Authentication is required or has failed | > | 403 | Forbidden - The authenticated user doesn't have sufficient permissions | > | 404 | Not Found - The requested resource does not exist | > | 409 | Conflict - The request conflicts with the current state of the resource | > | 422 | Unprocessable Entity - The request was well-formed but contains semantic errors | > | 429 | Too Many Requests - You've exceeded the rate limits | > [tab] 5xx Server Errors > > | Code | Description | > | - | - | > | 500 | Internal Server Error - Something went wrong on our servers | > | 502 | Bad Gateway - A service required to fulfill the request is unavailable | > | 503 | Service Unavailable - The server is temporarily unavailable | > | 504 | Gateway Timeout - A service required to fulfill the request timed out | ## Common Error Codes > [accordion] Authentication Errors > > | Code | HTTP Status | Description | > | - | - | - | > | `invalid_token` | 401 | The provided token is invalid, expired, or has been revoked | > | `missing_token` | 401 | No authentication token was provided | > | `invalid_credentials` | 401 | The provided username/password or API key is incorrect | > | `token_expired` | 401 | The provided token has expired | > [accordion] Authorization Errors > > | Code | HTTP Status | Description | > | - | - | - | > | `permission_denied` | 403 | The authenticated user lacks the necessary permissions | > | `insufficient_scope` | 403 | The token doesn't have the required scopes for this action | > | `workspace_access_denied` | 403 | The user doesn't have access to the specified workspace | > | `organization_access_denied` | 403 | The user doesn't have access to the specified organization | > [accordion] Resource Errors > > | Code | HTTP Status | Description | > | - | - | - | > | `resource_not_found` | 404 | The requested resource does not exist | > | `resource_already_exists` | 409 | A resource with the specified identifier already exists | > | `resource_conflict` | 409 | The request conflicts with the current state of the resource | > | `resource_locked` | 423 | The resource is currently locked and cannot be modified | > [accordion] Validation Errors > > | Code | HTTP Status | Description | > | - | - | - | > | `invalid_request` | 400 | The request body or parameters are invalid | > | `invalid_parameter` | 400 | A specific parameter has an invalid value | > | `missing_parameter` | 400 | A required parameter is missing | > | `validation_failed` | 422 | The input failed validation checks | > [accordion] Rate Limiting Errors > > | Code | HTTP Status | Description | > | - | - | - | > | `rate_limit_exceeded` | 429 | You've exceeded the rate limit for this endpoint | > | `quota_exceeded` | 429 | You've exceeded your usage quota | > | `concurrent_request_limit` | 429 | Too many concurrent requests | > [accordion] Server Errors > > | Code | HTTP Status | Description | > | - | - | - | > | `internal_error` | 500 | An unexpected error occurred on the server | > | `service_unavailable` | 503 | The service is temporarily unavailable | > | `gateway_timeout` | 504 | A dependent service timed out | > | `database_error` | 500 | A database operation failed | ## Error Examples > [tab] Invalid Token > > ```json theme={null} > { > "error": { > "code": "invalid_token", > "message": "The provided token is invalid or has expired", > "requestId": "req-a1b2c3d4e5f6" > } > } > ``` > [tab] Resource Not Found > > ```json theme={null} > { > "error": { > "code": "resource_not_found", > "message": "The requested workspace could not be found", > "details": { > "resourceType": "workspace", > "resourceId": "ws-12345" > }, > "requestId": "req-g7h8i9j0k1l2" > } > } > ``` > [tab] Validation Error > > ```json theme={null} > { > "error": { > "code": "validation_failed", > "message": "The request contains invalid parameters", > "details": { > "errors": [ > { > "field": "name", > "message": "must be between 3 and 50 characters" > }, > { > "field": "description", > "message": "cannot exceed 500 characters" > } > ] > }, > "requestId": "req-m3n4o5p6q7r8" > } > } > ``` > [tab] Rate Limit Exceeded > > ```json theme={null} > { > "error": { > "code": "rate_limit_exceeded", > "message": "Rate limit exceeded", > "details": { > "limit": 100, > "period": "1m", > "resetAt": "2025-04-06T12:30:00Z" > }, > "requestId": "req-s9t0u1v2w3x4" > } > } > ``` ## Handling Errors **1. Check HTTP Status Code** First, check the HTTP status code to understand the general category of the error: ```javascript theme={null} if (response.status >= 400) { // Handle error based on status code if (response.status === 401) { // Authentication issue } else if (response.status === 403) { // Authorization issue } else if (response.status === 429) { // Rate limiting issue } else { // Other error } } ``` **2. Parse Error Code** For more specific error handling, check the error code: ```javascript theme={null} if (response.data && response.data.error) { switch (response.data.error.code) { case 'token_expired': // Refresh the token break; case 'resource_not_found': // Handle missing resource break; case 'validation_failed': // Handle validation errors const validationErrors = response.data.error.details.errors; // Display validation errors to the user break; default: // Handle other errors break; } } ``` **3. Implement Retry Logic** For certain errors, especially 429 (rate limiting) and some 5xx errors, implement retry logic with exponential backoff: ```javascript theme={null} async function apiCallWithRetry(url, options, maxRetries = 3) { let retries = 0; while (retries < maxRetries) { try { const response = await fetch(url, options); if (response.status === 429) { // Get retry after header if available const retryAfter = response.headers.get('Retry-After') || 1; const delay = parseInt(retryAfter, 10) * 1000; await new Promise(resolve => setTimeout(resolve, delay)); retries++; continue; } if (response.status >= 500 && response.status < 600) { // Exponential backoff for server errors const delay = Math.pow(2, retries) * 1000 + Math.random() * 1000; await new Promise(resolve => setTimeout(resolve, delay)); retries++; continue; } return response; } catch (error) { if (retries >= maxRetries - 1) { throw error; } // Exponential backoff for network errors const delay = Math.pow(2, retries) * 1000 + Math.random() * 1000; await new Promise(resolve => setTimeout(resolve, delay)); retries++; } } } ``` **4. Log Errors** Log errors with their requestId for troubleshooting: ```javascript theme={null} if (response.data && response.data.error) { console.error( `API Error: ${response.data.error.code} - ${response.data.error.message}`, `Request ID: ${response.data.error.requestId}`, response.data.error.details ); } ``` > [!NOTE] > > The requestId is particularly important when contacting support, as it allows for quick identification of the specific request in server logs. ## Best Practices > [card] Graceful Degradation > > Design your application to function (perhaps with limited capabilities) even when API requests fail. > [card] User-Friendly Messages > > Translate error codes into user-friendly messages rather than displaying raw API errors to users. > [card] Centralized Error Handling > > Implement a centralized error handling mechanism to ensure consistent handling of errors across your application. > [card] Contextual Recovery > > Provide context-specific recovery options based on the error type (e.g., refresh button, edit form, etc.). > [card] Validation Precheck > > Validate inputs on the client side before sending requests to reduce validation errors. > [card] Error Tracking > > Implement error tracking to monitor error patterns and improve user experience over time. ## Troubleshooting Common Errors > [accordion] Authentication Failed > > If you receive a 401 error: > > 1. Check that your token is correctly formatted in the Authorization header > 2. Verify that your token hasn't expired > 3. Ensure you're using the correct authentication method for the endpoint > 4. Try generating a new token > > ```bash theme={null} > # Example of correct token usage > curl -X GET "https://api.studio.prisme.ai/v2/workspaces" \ > -H "Authorization: Bearer YOUR_TOKEN" > ``` > [accordion] Permission Denied > > If you receive a 403 error: > > 1. Verify that the authenticated user has the necessary permissions > 2. Check if you're using an API key with limited scopes > 3. Ensure you're accessing resources within the correct workspace > 4. Check if the resource has additional access controls > > Common permission errors include attempting to access: > > * Resources in workspaces you're not a member of > * Admin-only functionality without admin privileges > * Resources owned by other users > [accordion] Rate Limit Exceeded > > If you receive a 429 error: > > 1. Implement proper rate limit handling with backoff > 2. Check the `Retry-After` header for guidance on when to retry > 3. Optimize your code to batch requests where possible > 4. Consider upgrading your plan if you consistently hit limits > > See the [Rate Limits](/api-reference/rate-limits) page for more details on rate limiting. > [accordion] Invalid Parameters > > If you receive a 400 or 422 error: > > 1. Check the `details` field in the error response for specific validation failures > 2. Verify that you're sending the correct data types > 3. Check for required fields that might be missing > 4. Ensure values are within acceptable ranges or formats > > ```json theme={null} > // Example validation error details > "details": { > "errors": [ > { > "field": "email", > "message": "must be a valid email address" > } > ] > } > ``` ## Next Steps > [card] [Rate Limits](/api-reference/rate-limits) > > Learn about API usage limits and quotas > [card] [Authentication](/api-reference/authentication) > > Understand how to authenticate with the API > [card] [Security](/api-reference/security) > > Explore security best practices # Overview Source: https://docs.prisme.ai/api-reference/introduction The Prisme.ai API: an API-first, agentic platform you can drive and integrate from anywhere. The Prisme.ai API provides a comprehensive set of endpoints that allow you to programmatically interact with all aspects of the Prisme.ai platform. This reference guide will help you understand how to authenticate, make requests, handle errors, and leverage the full capabilities of the API. As the API-first entry point to the unified foundation, it exposes every product as a facet of one governed, traceable system, giving technical teams the full-code door into the same platform business users reach through no-code interfaces. ## API Overview The Prisme.ai API is organized around RESTful principles. It accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. > [card] Base URL > > All API requests should be made to: > > ``` > https://api.studio.prisme.ai > ``` > > Or your self-hosted instance URL. > [card] API Versioning > > API endpoints are versioned to ensure backward compatibility. Current version is `v2`. > > ``` > https://api.studio.prisme.ai/v2/... > ``` > [card] Content Type > > All requests should include: > > ``` > Content-Type: application/json > ``` > [card] Authentication > > All protected endpoints require: > > ``` > Authorization: Bearer YOUR_TOKEN > ``` ## Key Concepts > [accordion] Microservices Architecture > > The Prisme.ai API is built on a microservices architecture, with each product and major function having its own dedicated service. The api-gateway service handles authentication, routing, and load balancing across these services. > > Main core services include: > > * **API Gateway**: Handles authentication, session management, and request routing > * **Workspaces**: Manages workspaces > * **Runtime**: Executes automations and processes events > * **Events**: Handles event management > * **Console**: Console for the Prisme.ai platform > * **Pages**: Renders end-user pages within workspaces > [accordion] Events System > > Prisme.ai uses an event-driven architecture for many operations. The API allows you to: > > * Subscribe to events via webhooks > * Emit events to trigger automations > * Process events in real-time > > This event system enables complex workflows and integrations between Prisme.ai and external systems. ## Making Your First Request Here's a simple example of making an API request to check the system status: ```bash theme={null} curl -X GET "https://api.studio.prisme.ai/" \ -H "Content-Type: application/json" ``` And a more complex example that requires authentication: ```bash theme={null} curl -X GET "https://api.studio.prisme.ai/v2/workspaces" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" ``` > [!WARNING] > > Replace `YOUR_ACCESS_TOKEN` with a valid access token. See the [Authentication](/api-reference/authentication) page for details on obtaining tokens. ## API Products The Prisme.ai API is organized into several product areas, each with its own set of endpoints: > [card] Builder > > Build custom applications and automations > [card] Knowledges > > Create and query agents with tools capabilities ## Next Steps > [card] [Authentication](/api-reference/authentication) > > Learn how to authenticate with the API > [card] [SDKs](/api-reference/sdks) > > Start from the official Node.js and Python SDK repositories > [card] [Error Handling](/api-reference/errors) > > Understand API error codes and troubleshooting > [card] [Rate Limits](/api-reference/rate-limits) > > Learn about API usage limits and quotas > [card] [Security](/api-reference/security) > > Understand our security practices and recommendations > [card] [Versioning](/api-reference/versioning) > > Learn how we version and maintain the API > [card] [Agent Conversation Tutorial](/resources/tutorials/manage-agent-conversations-via-api) > > List, load, and continue user conversations with the Agent Creator API # Rate Limits Source: https://docs.prisme.ai/api-reference/rate-limits Understanding and working with Prisme.ai API rate limits Prisme.ai implements rate limiting to ensure platform stability and fair usage across all users. This page explains the rate limits in place, how to monitor your usage, and best practices for working within these limits. Rate limiting is one of the governance controls built into the unified foundation, keeping the shared, multi-tenant platform stable and fair for every organization. ## Rate Limit Overview > [tab] API Endpoints > > Most API endpoints have rate limits applied based on: > > * **User or API Key**: Limits are tracked per authenticated user or API key > > * **Endpoint category**: Different endpoint categories have different limits > > * **Workspace**: Some limits are applied per workspace > > > [card] Standard APIs > > > > Most API endpoints: 100 requests per minute > > > [card] Write Operations > > > > Create/update operations: 60 requests per minute > > > [card] Search/List > > > > Search and list operations: 30 requests per minute > > > [!NOTE] > > > > These are general guidelines. Specific endpoints may have custom rate limits based on their resource intensity. > [tab] Runtime Automations > > While executing workspace automations, the Runtime enforces four distinct rate limits: > > > [card] Automations Execution > > > > * Default: 100 automations per second > > * Burst: 400 automations > > * Environment Variable: `RATE_LIMIT_AUTOMATIONS` > > * Workspace Secret: `prismeai_ratelimit_automations` > > > [card] Event Emits > > > > * Default: 30 emits per second > > * Burst: 100 emits > > * Environment Variable: `RATE_LIMIT_EMITS` > > * Workspace Secret: `prismeai_ratelimit_emits` > > > [card] HTTP Fetches > > > > * Default: 50 fetches per second > > * Burst: 200 fetches > > * Environment Variable: `RATE_LIMIT_FETCHS` > > * Workspace Secret: `prismeai_ratelimit_fetchs` > > > [card] Repeat Loops > > > > * Default: 1000 iterations per second > > * Burst: 4000 iterations > > * Environment Variable: `RATE_LIMIT_REPEATS` > > * Workspace Secret: `prismeai_ratelimit_repeats` > > > [!WARNING] > > > > These rate limits are applied per workspace and per Runtime instance. They are not shared across instances in a cluster deployment. ## Understanding Runtime Rate Limits > [accordion] Rate Limit Scoping > > Each workspace has its own rate limits for automations, emits, fetches, and repeat loops. These rate limits are local to each Runtime instance and not shared between multiple Runtime instances. > > For example, with 2 Runtime instances and a workspace that has a 100 automation executions/second rate limit, the workspace might reach 200 automations/second across both instances. To fully utilize this capacity, automations should distribute workload using events. > [accordion] Burst Rate > > The burst rate represents the number of operations that can be executed during a momentary peak before being throttled to the normal rate. > > For example, an automation with a rate limit of 100/second and burst of 400 can execute 400 operations in a burst, after which it will be throttled to 100 operations per second. > [accordion] Rate Limit Distribution > > Rate limits are applied at different scopes: > > ``` > Sequential execution on a single instance: > ``` > > ```yaml theme={null} > slug: thisWillBeThrottled > do: > - repeat: > on: 2000 > do: > - callSomeOtherAutomation: {} > ``` > > This automation will be throttled to the single-instance limit because all operations run on the same instance. > > ``` > Distributed execution across instances: > ``` > > ```yaml theme={null} > do: > - repeat: > on: 2000 > do: > - emit: > event: triggerSomeOtherAutomation > payload: {} > > --- > # The second automation: > > slug: callSomeOtherAutomation > when: > events: > - triggerSomeOtherAutomation > do: [] > ``` > > This approach can leverage multiple instances since events can be processed by any available instance in the cluster. ## Rate Limit Headers When making API requests, rate limit information is returned in the response headers: > [card] X-RateLimit-Limit > > The maximum number of requests allowed in the current time window > [card] X-RateLimit-Remaining > > The number of requests remaining in the current time window > [card] X-RateLimit-Reset > > The time when the current rate limit window resets, in Unix epoch seconds > [card] Retry-After > > Present only when rate limited, indicates seconds to wait before retrying ## Rate Limit Response When you exceed a rate limit, the API returns a 429 "Too Many Requests" response with details about the limit: ```json theme={null} { "error": { "code": "rate_limit_exceeded", "message": "Rate limit exceeded. Please retry after 30 seconds.", "details": { "limit": 100, "period": "60s", "retryAfter": 30 }, "requestId": "req-1234567890abcdef" } } ``` For Runtime automations, a `payload.throttled` field in the `runtime.automations.executed` event indicates the throttling duration. ## Configuration Options > [tab] Global Configuration > > Rate limits can be configured globally using environment variables: > > | Environment Variable | Description | Default Value | > | - | - | - | > | `RATE_LIMIT_AUTOMATIONS` | Automations per second | 100 | > | `RATE_LIMIT_EMITS` | Event emits per second | 30 | > | `RATE_LIMIT_FETCHS` | HTTP fetches per second | 50 | > | `RATE_LIMIT_REPEATS` | Repeat iterations per second | 1000 | > | `RATE_LIMIT_AUTOMATIONS_BURST` | Automations burst limit | 400 | > | `RATE_LIMIT_EMITS_BURST` | Event emits burst limit | 100 | > | `RATE_LIMIT_FETCHS_BURST` | HTTP fetches burst limit | 200 | > | `RATE_LIMIT_REPEATS_BURST` | Repeat iterations burst limit | 4000 | > | `RATE_LIMIT_DISABLED` | Disable all rate limits | false | > > > [!WARNING] > > > > Setting any of these environment variables to 0 disables the corresponding rate limit for all workspaces. > [tab] Workspace Configuration > > Rate limits can be configured per workspace using workspace secrets: > > | Workspace Secret | Description | Default Value | > | - | - | - | > | `prismeai_ratelimit_automations` | Automations per second | 100 | > | `prismeai_ratelimit_emits` | Event emits per second | 30 | > | `prismeai_ratelimit_fetchs` | HTTP fetches per second | 50 | > | `prismeai_ratelimit_repeats` | Repeat iterations per second | 1000 | > | `prismeai_ratelimit_automations_burst` | Automations burst limit | 400 | > | `prismeai_ratelimit_emits_burst` | Event emits burst limit | 100 | > | `prismeai_ratelimit_fetchs_burst` | HTTP fetches burst limit | 200 | > | `prismeai_ratelimit_repeats_burst` | Repeat iterations burst limit | 4000 | > | `prismeai_ratelimit_disabled` | Disable rate limits for this workspace | false | > > > [!NOTE] > > > > These workspace secrets are restricted to super admins. Regular workspace admins cannot modify these values. ## Best Practices **1. Monitor Your Usage** Track your API usage and rate limit headers to understand your consumption patterns: ```javascript theme={null} function checkRateLimits(response) { const limit = response.headers.get('X-RateLimit-Limit'); const remaining = response.headers.get('X-RateLimit-Remaining'); const reset = response.headers.get('X-RateLimit-Reset'); console.log(`Rate limits: ${remaining}/${limit} remaining, reset at ${new Date(reset * 1000).toLocaleTimeString()}`); // Alert if approaching limit if (remaining && parseInt(remaining, 10) < parseInt(limit, 10) * 0.1) { console.warn('Approaching rate limit!'); } } ``` **2. Implement Backoff and Retry** When rate limited, implement exponential backoff with jitter: ```javascript theme={null} async function apiCallWithRetry(url, options, maxRetries = 5) { let retries = 0; while (retries < maxRetries) { try { const response = await fetch(url, options); checkRateLimits(response); if (response.status === 429) { // Get retry after header or default to exponential backoff const retryAfter = response.headers.get('Retry-After'); let delay; if (retryAfter) { delay = parseInt(retryAfter, 10) * 1000; } else { // Exponential backoff with jitter delay = Math.pow(2, retries) * 1000 + Math.random() * 1000; } console.log(`Rate limited. Retrying after ${delay}ms`); await new Promise(resolve => setTimeout(resolve, delay)); retries++; continue; } return response; } catch (error) { retries++; if (retries >= maxRetries) throw error; // Exponential backoff for network errors const delay = Math.pow(2, retries) * 1000 + Math.random() * 1000; await new Promise(resolve => setTimeout(resolve, delay)); } } } ``` **3. Optimize Automation Distribution** Design automations to distribute work effectively: 1. Use events to distribute processing across multiple Runtime instances 2. Batch operations where possible instead of making multiple single calls 3. Implement queuing for high-volume operations 4. Use parallel processing for independent operations ```yaml theme={null} # Example of batched processing do: - repeat: on: '{{workQueue}}' batch: size: 3 # Process 3 items at once interval: 500 # Pause 500ms between batches do: - process: item: '{{item}}' # Rather than: do: - repeat: on: '{{workQueue}}' do: - process: item: '{{item}}' ``` **4. Cache Responses** Implement caching for frequently accessed data: ```javascript theme={null} // Simple in-memory cache const cache = new Map(); async function fetchWithCache(url, options, ttlMs = 60000) { const cacheKey = `${url}:${JSON.stringify(options)}`; if (cache.has(cacheKey)) { const { data, expiry } = cache.get(cacheKey); if (expiry > Date.now()) { return data; } cache.delete(cacheKey); } const response = await fetch(url, options); const data = await response.json(); cache.set(cacheKey, { data, expiry: Date.now() + ttlMs }); return data; } ``` ## Monitoring Throttling You can monitor throttling in Runtime automations through the following methods: > [tab] Automation Events > > Each automation execution generates a `runtime.automations.executed` event that includes throttling information: > > ```json theme={null} > { > "event": "runtime.automations.executed", > "payload": { > "automation": "my-automation", > "workspace": "my-workspace", > "duration": 1250, // Total duration in milliseconds > "throttled": 1000, // Time spent being throttled in milliseconds > "status": "success" > } > } > ``` > > If `throttled` is greater than zero, the automation was rate limited. > [tab] Metrics Dashboard > > The Prisme.ai dashboard provides metrics on automation execution, including: > > * Execution counts > * Average duration > * Throttling rates > * Error rates ## Common Rate Limit Scenarios > [card] High-Volume Data Processing > > When processing large datasets, use batching and distributed processing: > > * Split large datasets into manageable chunks > * Process chunks in parallel using events > * Implement checkpointing to resume interrupted processing > * Consider scheduled automations for very large datasets > [card] User-Generated Events > > For systems handling many user-triggered events: > > * Implement client-side throttling for UI interactions > * Queue events server-side for processing > * Consider debouncing or deduplicating similar events > * Prioritize critical user actions in your processing queue > [card] Integration Synchronization > > When synchronizing with external systems: > > * Use webhooks where possible instead of polling > * Implement incremental synchronization (only changed data) > * Schedule large synchronization jobs during off-peak hours > * Prioritize critical data for real-time sync > [card] Scheduled Reports > > For generating scheduled reports or analytics: > > * Pre-compute and cache common metrics > * Generate reports during off-peak hours > * Split large reports into smaller segments > * Implement progressive loading for user interfaces ## Next Steps > [card] [Security](/api-reference/security) > > Learn about API security best practices > [card] [Authentication](/api-reference/authentication) > > Understand authentication methods > [card] [Error Handling](/api-reference/errors) > > Learn how to handle API errors # SDKs Source: https://docs.prisme.ai/api-reference/sdks Use the Prisme.ai SDKs to build agents and integrate with platform APIs The SDKs are the full-code door into the platform's unified foundation. Use them when you want to automate Agent Creator or Storage workflows from application code instead of calling the REST API directly. > [card] [Node.js SDK](https://github.com/prismeai/sdk-agents-node) > > Official Prisme.ai Node.js SDK for Agent Creator and Storage APIs. > [card] [Python SDK](https://github.com/prismeai/sdk-agents-python) > > Official Prisme.ai Python SDK for Agent Creator and Storage APIs. ## When to use an SDK * Use the **Node.js SDK** when your agent or integration runs in a JavaScript or TypeScript backend. * Use the **Python SDK** when your agent or integration runs in a Python service, notebook, or automation worker. * Use the [REST API reference](/api-reference/introduction) when you need to inspect the underlying endpoints or build an integration in another language. ## Related resources > [card] [Authentication](/api-reference/authentication) > > Configure access tokens before calling protected APIs. > [card] [Agent Creator](/products/agent-factory/overview) > > Learn how agents are created, configured, and published. # Security Source: https://docs.prisme.ai/api-reference/security Security best practices and authorization model for the Prisme.ai API Prisme.ai takes security seriously and provides multiple layers of protection for your data and API interactions. This guide covers security best practices, authentication mechanisms, and authorization models to help you build secure applications with the Prisme.ai API. Security is governed by design across the unified foundation: SSO, service accounts, audit logging, and per-organization scoping apply consistently to every product rather than being bolted onto isolated tools. ## Authentication and Authorization > [tab] Authentication Methods > > Prisme.ai offers several authentication methods: > > > [card] JWT Authentication > > > > * Used for web applications > > * Session-based authentication > > * Handled by api-gateway service > > * Issued after OIDC authentication or anonymous login > > > [card] Access Tokens > > > > * Long-lived authentication > > * Used for integrations and scripts > > * Can be generated by authenticated users > > * UUID-based opaque tokens > > > [card] API Keys > > > > * Scoped to specific workspaces > > * Fine-grained permission control > > * Ideal for third-party integrations > > * Can be created with expiration dates > > For detailed information on these authentication methods, see [Authentication](/api-reference/authentication). > [tab] Authorization Model > > Prisme.ai implements a flexible permission system: > > > [accordion] Defining Roles > > > > The RBAC system consists of several key elements: > > > > * **Roles**: Sets of permissions that can be assigned to users > > * **Subjects**: Resources that can be acted upon (pages, files, events, etc.) > > * **Actions**: Operations that can be performed on subjects (read, create, update, etc.) > > * **Rules**: Define which roles can perform which actions on which subjects > > * **Conditions**: Optional criteria that further restrict when rules apply > > > [accordion] Defining Roles > > > > ``` > > authorizations: > > roles: > > editor: {} # Built-in role > > > > # Custom role for regular users > > user: > > auth: > > prismeai: {} # Automatically assigned to all Prisme.ai users > > > > # Role for API access > > workspace: > > auth: > > apiKey: {} # Can be used with API keys > > ``` > > > [accordion] Creating Rules > > > > Define what each role can do with specific rules: > > > > ``` > > rules: > > # Allow editors to read and update workspaces > > - role: editor > > action: > > - read > > - get_usage > > - aggregate_search > > - update > > subject: workspaces > > > > # Give editors full control over files > > - role: editor > > action: manage # Shorthand for all permissions > > subject: files > > > > ``` > > > > Each rule must include at least: > > > > * **action**: What can be done (a single action or list) > > * **subject**: What it can be done to (a single subject or list) > > > > Rules can optionally specify: > > > > * **role**: Which role this applies to (if omitted, applies to everyone) > > * **conditions**: Restrict the rule to specific cases > > * **inverted**: Set to `true` to make this a deny rule instead of allow > > * **reason**: Documentation string for the rule ## Network Security **1. TLS Encryption** All API communications should use TLS encryption (HTTPS): * Prisme.ai API endpoints only accept HTTPS connections * Self-hosted instances should be configured with valid TLS certificates * Minimum TLS version 1.2 is recommended * Client applications should validate server certificates > [!WARNING] > > Never send sensitive data over unencrypted connections. Always verify you're using `https://` URLs for API calls. **2. Microservices Architecture** Prisme.ai uses a secure microservices architecture: * The api-gateway is the only publicly exposed service * Backend microservices are in a private network * Internal services trust the `x-prismeai-user-id` header from the api-gateway * Service-to-service communication uses internal authentication **3. IP Restrictions** For self-hosted deployments, consider implementing IP restrictions: * Limit API access to specific IP ranges * Use VPNs or private networks for sensitive operations * Configure firewalls to restrict access to the api-gateway * Implement network policies in Kubernetes deployments ```yaml theme={null} # Example Kubernetes Network Policy apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: name: api-gateway-policy namespace: prisme-system spec: podSelector: matchLabels: app: api-gateway ingress: - from: - ipBlock: cidr: 10.0.0.0/24 ports: - protocol: TCP port: 443 ``` ## Data Security > [card] Data Encryption > > * All data in transit is encrypted using TLS > * Sensitive data at rest is encrypted > * Encryption keys are rotated regularly > * JWT signing keys are automatically rotated > [card] Secret Management > > * API keys and secrets are securely stored > * Passwords are hashed with strong algorithms > * Workspace secrets are encrypted at rest > * Environment variables for sensitive configuration > [card] Data Isolation > > * Multi-tenant architecture with data isolation > * Workspace-level data segregation > * Database-level access controls > * Row-level security where appropriate > [card] Audit Logging > > * Authentication events are logged > * API access is recorded > * Permission changes are tracked > * Security-relevant actions are audited ## JWT Security > [accordion] JWT Signing and Rotation > > The api-gateway signs JWTs using JSON Web Keys (JWKs) that are automatically rotated: > > * JWKs are stored in the api-gateway database > > * Keys are rotated based on the `JWKS_ROTATION_DAYS` setting (default: 30 days) > > * When a JWK is rotated, it remains available for verifying existing JWTs > > * Rotated JWKs are removed after `ACCESS_TOKENS_MAX_AGE` (default: 30 days) > > * Key rotation happens during api-gateway startup > > > [!WARNING] > > > > If a signing JWT has leaked, it must be manually deleted from the database before restarting the api-gateway and runtime services. > [accordion] JWT Configuration > > Environment variables for JWT configuration: > > | Variable | Description | Default Value | > | - | - | - | > | `JWKS_ROTATION_DAYS` | Rotation period in days | 30 | > | `JWKS_KTY` | JWK Algorithm family | RSA | > | `JWKS_ALG` | JWK signature algorithm | RS256 | > | `JWKS_SIZE` | JWK size | 2048 | > | `ACCESS_TOKENS_MAX_AGE` | JWT expiration time in seconds | 2592000 (30 days) | > > Public keys are available at `https://api.studio.prisme.ai/oidc/jwks` for JWT verification. ## Security Best Practices **1. Secure Token Handling** Handle authentication tokens securely: * Store tokens in secure HTTP-only cookies or secure storage * Never expose tokens in URLs or client-side code * Implement token refresh mechanisms * Set appropriate token expiration times * Revoke tokens when no longer needed > [!NOTE] > > For web applications, consider using the authorization code flow with PKCE for enhanced security. **2. Implement Least Privilege** Follow the principle of least privilege: * Use API keys with minimal required permissions * Create role-specific tokens for different operations * Regularly audit and revoke unused access * Use workspace-scoped tokens instead of global ones ```javascript theme={null} // Example of creating a minimally privileged API key const response = await fetch('https://api.studio.prisme.ai/v2/workspaces/ws-123/apiKeys', { method: 'POST', headers: { 'Content-Type': 'application/json', 'Authorization': `Bearer ${userToken}` }, body: JSON.stringify({ name: 'Read-only Document Access', permissions: [ {type: 'workspace', id: 'ws-123', action: 'read'}, {type: 'document', id: '*', action: 'read'} ], expiresIn: 7 * 24 * 60 * 60 // 7 days }) }); ``` **3. Input Validation** Always validate input data: * Validate data types and formats * Sanitize inputs to prevent injection attacks * Use schema validation for request bodies * Implement proper error handling for invalid inputs ```javascript theme={null} // Example of input validation function validateWorkspaceId(workspaceId) { // Check for correct format (example: ws-123456) if (!/^ws-[a-zA-Z0-9]{6,}$/.test(workspaceId)) { throw new Error('Invalid workspace ID format'); } return workspaceId; } ``` **4. Secure Automation Development** When developing automations and integrations: * Avoid storing sensitive data in automation code * Use workspace secrets for credentials and tokens * Implement proper error handling and logging * Validate outputs from untrusted sources * Limit HTTP request capabilities to necessary endpoints ```yaml theme={null} # Example of using workspace secrets in automation do: - fetch: method: POST url: ${secrets.API_ENDPOINT} headers: Authorization: Bearer ${secrets.API_TOKEN} body: data: ${input.data} ``` **5. Regular Security Review** Implement a regular security review process: * Audit API keys and access tokens * Review user permissions and roles * Check for unused integrations * Monitor for suspicious activity * Update client libraries and dependencies ## Self-Hosted Security Considerations > [tab] Infrastructure Security > > For self-hosted Prisme.ai deployments: > > > [card] Kubernetes Security > > > > * Enable Pod Security Policies > > * Implement network policies > > * Use [securityContext](/self-hosting/kubernetes/helm#security-context-configuration) settings > > * Keep Kubernetes version updated > > > [card] Container Security > > > > * Use minimal base images > > * Scan containers for vulnerabilities > > * Apply principle of least privilege > > * Don't run containers as root > > > [card] Secret Management > > > > * Use Kubernetes secrets or external vault > > * Implement secrets encryption at rest > > * Rotate secrets regularly > > * Limit secret access to necessary pods > > > [card] Database Security > > > > * Enable authentication and encryption > > * Implement network isolation > > * Apply least privilege for database users > > * Regular backup and recovery testing > [tab] Authentication Integration > > Options for integrating with enterprise authentication: > > > [card] OIDC Integration > > > > Connect Prisme.ai to your OIDC provider: > > > > * Configure OIDC client settings > > * Map identity provider groups to roles > > * Enable single sign-on > > > [card] SAML Integration > > > > Connect to enterprise SAML providers: > > > > * Configure SAML service provider settings > > * Set up attribute mapping > > * Implement JIT provisioning > > Example OIDC configuration: > > ```yaml theme={null} > providers: > : > type: oidc > config: > client_id: "your client id" > client_secret: "your client secret" > authorization_endpoint: "idp authorization_endpoint" > token_endpoint: "idp token_endpoint" > jwks_uri: "idp public certificates endpoint" > scopes: "openid email profile" > ``` ## Security Monitoring and Incident Response **1. Security Monitoring** Implement monitoring for security events: * Authentication failures and successes * Permission changes * API key creation and usage * Rate limit violations * Unusual access patterns For self-hosted deployments, integrate with your SIEM system for centralized monitoring. **2. Logging** Configure comprehensive logging: ```yaml theme={null} # Example logging configuration - emit: event: payload: level: info securityEvents: true accessLogs: true authenticationEvents: true format: json outputs: - type: stdout - type: elasticsearch config: url: https://elasticsearch:9200 index: prisme-logs ``` > [!WARNING] > > Ensure logs don't contain sensitive information like tokens, passwords, or personal data. **3. Incident Response** Prepare for security incidents: * Document incident response procedures * Define roles and responsibilities * Test response plans periodically * Establish communication channels * Implement post-incident reviews ## Compliance and Auditing > [card] Audit Logs > > Prisme.ai maintains audit logs for compliance purposes: > > * User access and actions > * Administrative changes > * Authentication events > * Data access patterns > > Access audit logs through the API or admin console. > [card] Compliance Support > > Prisme.ai helps meet various compliance requirements: > > * Data residency options > * Data retention controls > * Access control documentation > * Security assessment support ## Next Steps > [card] [Authentication](/api-reference/authentication) > > Learn more about authentication methods > [card] [Rate Limits](/api-reference/rate-limits) > > Understand API usage limits > [card] [Versioning](/api-reference/versioning) > > Learn about API versioning strategy # Versioning Source: https://docs.prisme.ai/api-reference/versioning Understanding Prisme.ai API versioning and compatibility Prisme.ai follows a structured approach to API versioning to ensure backward compatibility while enabling evolution of the platform. This guide explains our versioning strategy, how to specify API versions, and our commitment to compatibility. Stable versioning is part of what makes the unified foundation dependable: your integrations keep working as the platform evolves, giving technical teams a resilient, API-first door into every product. ## Versioning Strategy > [card] URL-Based Versioning > > Prisme.ai uses URL path-based versioning: > > ``` > https://api.studio.prisme.ai/v2/workspaces > ``` > > The version identifier (e.g., `v2`) is included in the URL path. > [card] Major Versions > > New major versions (v1, v2, v3) are released when: > > * Introducing breaking changes > * Significantly restructuring resources > * Changing fundamental behavior > [card] Minor Updates > > Updates within a version (v2.1, v2.2) for: > > * Adding new endpoints > * Extending existing endpoints > * Bug fixes and improvements > [card] Version Lifecycle > > Each major version undergoes these phases: > > * Beta: Early access, may change without notice > * Stable: Full support, backward compatible > * Deprecated: Still works but will be removed > * Retired: No longer available ## Current API Versions > [tab] v2 (Current) > > Version 2 is the current stable API version. > > > [card] Status > > > > Stable and fully supported > > > [card] Base URL > > > > `https://api.studio.prisme.ai/v2/` > > > [card] Documentation > > > > This documentation describes the v2 API > > > [card] Retirement Date > > > > No planned retirement date > > **Key Features:** > > * Comprehensive workspace management > * Document and knowledge base operations > * Agent creation and management > * Enhanced automation capabilities > * Fine-grained permissions system > [tab] v1 (Deprecated) > > Version 1 is deprecated but still supported. > > > [card] Status > > > > Deprecated > > > [card] Base URL > > > > `https://api.studio.prisme.ai/v1/` > > > [card] Documentation > > > > Archive documentation available > > > [card] Retirement Date > > > > December 31, 2025 > > > [!WARNING] > > > > The v1 API is deprecated and will be retired on December 31, 2025. We recommend migrating to the v2 API as soon as possible. ## Version Compatibility > [accordion] Backward Compatibility Policy > > Within a major version, Prisme.ai commits to backward compatibility: > > **We Will Never:** > > * Remove endpoints or fields > * Change the meaning of existing fields > * Add required parameters > * Change error codes in a way that breaks existing error handling > > **We May:** > > * Add new endpoints > > * Add optional fields to responses > > * Add optional parameters to requests > > * Extend enum values > > * Fix bugs that don't change intended behavior > > > [!WARNING] > > > > Beta versions do not follow the backward compatibility guarantee and may change without notice. > [accordion] Breaking Changes > > Breaking changes are only introduced in new major versions. Examples of breaking changes include: > > * Removing or renaming fields in responses > * Changing data types of existing fields > * Removing endpoints or resources > * Changing authentication mechanisms > * Modifying error response structures > * Changing the meaning of existing fields > > When a new major version is released, we provide detailed migration guides and support both versions during a transition period. > [accordion] Date-Based Headers > > In addition to URL-based versioning, Prisme.ai supports date-based API version targeting for fine-grained compatibility: > > ``` > X-Prisme-API-Version: 2023-10-15 > ``` > > This header requests the API implementation as it existed on that date, which can help maintain compatibility with a specific behavior even as minor updates are released. > > > [!NOTE] > > > > Date-based versioning is optional. If not specified, you'll get the latest implementation of the requested major version. ## Using API Versions **1. Specify the Version in the URL** Always include the version in the URL path: ```bash theme={null} # Example API request with version in URL curl -X GET "https://api.studio.prisme.ai/v2/workspaces" \ -H "Authorization: Bearer YOUR_TOKEN" ``` **2. Optional: Use Date-Based Versioning** For more precise versioning, add the `X-Prisme-API-Version` header: ```bash theme={null} # Example API request with date-based versioning curl -X GET "https://api.studio.prisme.ai/v2/workspaces" \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "X-Prisme-API-Version: 2023-10-15" ``` **3. Check Version-Specific Documentation** Always refer to the documentation for your specific API version. Features and endpoints may differ between versions. **4. Plan for Version Migrations** Stay informed about version deprecations and plan migrations accordingly: * Subscribe to the Prisme.ai developer newsletter * Check the changelog for deprecation notices * Test your integration with beta versions * Allow time to migrate before version retirement ## Version Lifecycle Prisme.ai API versions go through several stages: > [card] Beta > > * Early access preview > * May change without notice > * Not recommended for production > * Labeled with "beta" in docs > [card] Stable > > * Fully supported > * Backward compatible updates only > * Recommended for production use > * Comprehensive documentation > [card] Deprecated > > * Still functional but will be retired > * No new features added > * Security patches only > * Migration recommendations provided > [card] Retired > > * No longer available > * Returns 410 Gone response > * Redirects to documentation > * No support provided ## Version Deprecation Process **1. Announcement** When a version is deprecated: * Public announcement at least 12 months before retirement * Email notification to active users of the version * Deprecation notice in API responses (via headers) * Documentation updated with migration guidance **2. Sunset Period** During the deprecation period: * Version continues to function normally * Security patches are applied * No new features are added * Warning headers are included in responses ``` X-Prisme-API-Deprecation: This API version is deprecated and will be retired on 2025-12-31. Please migrate to v2. ``` **3. Retirement** When a version is retired: * Endpoints return 410 Gone status code * Response includes migration information * Requests are no longer processed * Documentation moves to archive section ## Best Practices > [card] Specify Exact Versions > > Always explicitly specify the API version in your code: > > ```javascript theme={null} > const API_VERSION = 'v2'; > const API_BASE_URL = `https://api.studio.prisme.ai/${API_VERSION}`; > > async function fetchWorkspaces() { > const response = await fetch(`${API_BASE_URL}/workspaces`, { > headers: { > 'Authorization': `Bearer ${token}` > } > }); > return response.json(); > } > ``` > [card] Handle Version Headers > > Check for version-related response headers: > > ```javascript theme={null} > function checkVersionStatus(response) { > const deprecationNotice = response.headers.get('X-Prisme-API-Deprecation'); > if (deprecationNotice) { > console.warn(`API Version Warning: ${deprecationNotice}`); > } > > const versionUsed = response.headers.get('X-Prisme-API-Version-Used'); > console.log(`API Version Used: ${versionUsed}`); > } > ``` > [card] Test with Beta Versions > > Test your integrations with beta versions early: > > ```javascript theme={null} > // Toggle between stable and beta for testing > const USE_BETA = process.env.NODE_ENV === 'development'; > const API_VERSION = USE_BETA ? 'v3' : 'v2'; > const API_BASE_URL = `https://api.studio.prisme.ai/${API_VERSION}`; > ``` > [card] Monitor Deprecation Notices > > Set up monitoring for deprecation notices: > > ```javascript theme={null} > // Example monitoring function > function monitorDeprecationNotices(response) { > const deprecationNotice = response.headers.get('X-Prisme-API-Deprecation'); > if (deprecationNotice) { > // Log to monitoring system > sendAlert(`API Deprecation Notice: ${deprecationNotice}`); > } > } > ``` ## Next Steps > [card] [Introduction](/api-reference/introduction) > > Return to API overview > [card] [Authentication](/api-reference/authentication) > > Learn about authentication methods > [card] [SDKs](/api-reference/sdks) > > Use the official SDK repositories when building API integrations # API Integrations Source: https://docs.prisme.ai/apps-store/marketplace/api Connect Prisme.ai to external services and systems through powerful API integrations API integrations are a core component of the Prisme.ai App Store, enabling your AI solutions to connect with external services and systems. These integrations allow you to incorporate data from other platforms, trigger actions in external systems, and build comprehensive workflows that span multiple services. Alongside ready-made integrations, in Builder you build your own connectors, MCP servers, and custom code, and declare them as **capabilities** scoped either **platform-level** (the whole platform, every organization) or **tenant-level** (a single organization). This build-once, reuse-everywhere model pools security and quality: credentials are managed once, access is governed by role and scope, and every call is traced, so fast integration never turns into a sprawl of unreviewed, inconsistently-secured connectors. ## Understanding API Integrations API integrations on Prisme.ai provide a standardized way to interact with external services: > [card] Simplified Authentication > > Secure credential management without exposing sensitive information > [card] Standardized Interface > > Consistent patterns for interacting with diverse services > [card] Parameter Validation > > Input validation to prevent errors and ensure proper data format > [card] Error Handling > > Consistent error reporting and recovery mechanisms These features make it easier to connect to external systems without dealing with the complexity of raw API interactions. ## How API Integrations Work API integrations in Prisme.ai follow a consistent pattern: **1. Authentication Configuration** Each API integration requires credentials to access the external service. These are securely stored and managed within the platform. **2. Action Definition** Integrations expose a set of actions (such as "Send Email" or "Create Contact") that represent operations in the external system. **3. Parameter Mapping** When using an action, you map data from your workflow to the parameters required by the external API. **4. Execution** The platform handles the API call, including authentication, request formatting, and response processing. **5. Response Handling** The response from the external system is parsed and made available to your workflow for further processing. This standardized approach simplifies integration with external systems while maintaining flexibility and control. ## Example: Mailjet Integration Let's look at an example of an API integration with Mailjet, a popular email service: > [tab] Installation > > **1. Open Imports** > > In Builder, open any workspace and click **+** next to **Imports** in the sidebar. > > **2. Find the Mailjet App** > > Search for "Mailjet" or browse the Communication category > > **3. Install the App** > > Click "Install" to add the Mailjet app to your workspace > > **4. Configure Authentication** > > Enter your Mailjet API Key and Secret Key when prompted > > ``` > API_KEY: your_mailjet_api_key > SECRET_KEY: your_mailjet_secret_key > ``` > > These credentials are encrypted and securely stored. > [tab] Configuration > > The Mailjet app provides several configuration options: > > ```yaml theme={null} > config: > schema: > base64_encoded_credentials: > title: Base64 encoded credentials > description: Base64 encoded credentials > type: string > ``` > > This configuration schema allows for secure credential storage and management. The credentials are stored in base64 encoded format for additional security. > [tab] Using in Automations > > Once configured, you can use the Mailjet app in your automations: > > ```yaml theme={null} > slug: send-email > name: SendMail > do: > - Mailjet.sendMail: > to: '{{recipient}}' > replyTo: '{{payload.email}}' > subject: New Contact Form Submission > body: 'Message: {{payload.message}}, Name: {{payload.name}}, Attachment: {{payload.attachment}}' > ``` > > This example shows an automation that sends an email through Mailjet based on form submission data. > [tab] Advanced Options > > The Mailjet integration supports advanced features: > > * **HTML Content**: Send rich HTML emails with formatting > * **Attachments**: Include files with your emails > * **Templates**: Use Mailjet templates for consistent messaging > * **Tracking**: Monitor email opens and clicks > * **Custom Headers**: Add specialized email headers for advanced use cases > > These capabilities allow for sophisticated email communication directly from your Prisme.ai workflows. ## Common API Integration Types The App Store includes API integrations across several categories: > [accordion] Communication Services > > Integrations with email, messaging, and notification platforms: > > * **Email Services**: Mailjet, SendGrid, SMTP providers, Gmail > * **Messaging Platforms**: Slack, Microsoft Teams, Discord, Telegram > * **SMS Gateways**: Twilio, Vonage, MessageBird > * **Push Notification Services**: Firebase, OneSignal, Pushwoosh > > These integrations allow your AI solutions to communicate through various channels, reaching users where they are most active. > [accordion] CRM and Customer Engagement > > Integrations with customer relationship management and engagement tools: > > * **CRM Platforms**: Salesforce, HubSpot, Microsoft Dynamics, Zoho > * **Support Systems**: Zendesk, Freshdesk, ServiceNow > * **Marketing Automation**: Marketo, Mailchimp, Braze, Iterable > * **Survey Tools**: SurveyMonkey, Typeform, Google Forms > > These connections enable AI-driven customer engagement across the entire customer lifecycle. > [accordion] Productivity and Collaboration > > Integrations with work management and collaboration tools: > > * **Project Management**: Jira, Asana, Trello, Monday.com > * **Document Storage**: Google Drive, Dropbox, Box, OneDrive > * **Knowledge Bases**: Confluence, Notion, SharePoint > * **Calendar Services**: Google Calendar, Outlook, Calendly > > These integrations allow AI solutions to participate in and enhance team workflows. > [accordion] Data and Analytics > > Integrations with data storage and analysis platforms: > > * **Analytics Tools**: Google Analytics, Mixpanel, Amplitude > * **Business Intelligence**: Tableau, Power BI, Looker > * **Data Warehousing**: Snowflake, BigQuery, Redshift > * **Data Enrichment**: Clearbit, ZoomInfo, FullContact > > These connections enable data-driven AI solutions with access to rich analytics and insights. ## Building Custom API Integrations While the App Store includes many pre-built integrations, you can also create custom API integrations for your specific needs: **1. Create a New Workspace** Start by creating a dedicated workspace for your API integration **2. Define the API Interface** Create an automation that encapsulates the API interaction: ```yaml theme={null} slug: api-action-name name: Descriptive Action Name do: - fetch: emitErrors: true outputMode: body headers: Content-Type: application/json Authorization: "Bearer {{config.api_token}}" url: https://api.example.com/endpoint method: post body: key1: "{{param1}}" key2: "{{param2}}" output: response arguments: param1: type: string title: Parameter 1 description: Description of parameter 1 param2: type: string title: Parameter 2 description: Description of parameter 2 ``` **3. Configure Authentication** Set up the workspace configuration schema to handle authentication credentials: ```yaml theme={null} config: schema: api_token: title: API Token description: Authentication token for the API type: string ``` **4. Create Documentation** Add a documentation page to explain how to use your integration: ```yaml theme={null} slug: _doc name: fr: Documentation en: Documentation blocks: - slug: RichText content: |-

API Integration Name

Description of what this integration does and how to use it.

``` **5. Publish as a Capability** Publish your workspace as an app and declare it as a capability, platform-level for the whole enterprise, or tenant-level for a single organization, so any authorized workspace or agent can reuse it This approach allows you to create standardized interfaces for any API, making them available across your organization. ## Authentication Methods API integrations in Prisme.ai support various authentication methods: > [card] API Keys > > Simple key-based authentication used by many services > [card] OAuth 2.0 > > Token-based authentication with user consent flows > [card] Basic Auth > > Username/password authentication encoded in headers > [card] JWT > > JSON Web Token based authentication The platform securely manages these credentials, protecting sensitive information while enabling authenticated API access. ## Best Practices for API Integrations Follow these recommendations when working with API integrations: > [accordion] Security Considerations > > * Use the minimum permissions necessary for your integration > * Rotate credentials regularly for sensitive integrations > * Consider OAuth for user-specific operations where applicable > * Review API permissions and scopes carefully > * Monitor API usage for unusual patterns > * Follow the principle of least privilege when configuring access > [accordion] Performance Optimization > > * Implement caching for frequently accessed data > * Batch operations when possible to reduce API calls > * Consider rate limits and implement appropriate throttling > * Monitor response times and optimize slow operations > * Use pagination for large data sets > * Implement retry logic with exponential backoff for transient failures > [accordion] Error Handling > > * Implement comprehensive error handling for API calls > * Provide meaningful error messages to users > * Log detailed error information for troubleshooting > * Handle rate limiting and quota errors gracefully > * Implement circuit breakers for unreliable services > * Consider fallback options for critical operations > [accordion] Maintenance and Updates > > * Stay informed about API changes and deprecations > * Test integrations regularly to ensure functionality > * Update authentication credentials before expiration > * Document integration details for future reference > * Monitor for security advisories related to integrated services > * Maintain version compatibility with API providers ## Using API Integrations with Knowledges and Agents API integrations can significantly enhance your Knowledges bases and agents: > [card] Dynamic Information > > Incorporate real-time data from APIs into AI responses > [card] Action Capabilities > > Enable AI agents to perform actions through API calls > [card] Data Enrichment > > Enhance knowledge bases with information from external sources > [card] Process Automation > > Allow agents to initiate and manage business processes These capabilities transform AI from passive information providers to active participants in business workflows. ## Example Use Cases > [tab] Customer Support > > A customer support agent that can: > > * Retrieve customer information from CRM > * Check order status from e-commerce platform > * Create support tickets in ticketing system > * Send confirmation emails to customers > * Schedule follow-up calls in calendar > > This provides a comprehensive support experience within a single conversation. > [tab] Sales Assistance > > A sales assistant that can: > > * Look up product information in catalog > * Check inventory levels in real-time > * Create quotes in CRM > * Send proposals via email > * Schedule demos with prospects > > This enables sales acceleration through AI-driven process automation. > [tab] Research Companion > > A research assistant that can: > > * Search academic databases > * Retrieve company financial data > * Access market research reports > * Compile data into structured formats > * Share findings through collaboration tools > > This enhances research productivity through integrated information access. > [tab] Operational Workflow > > An operations assistant that can: > > * Monitor system status from monitoring tools > * Create and update tickets for issues > * Notify team members through messaging platforms > * Access documentation systems for troubleshooting > * Update status dashboards with current information > > This streamlines operational workflows through automated coordination. ## Next Steps > [card] [Crawler](/apps-store/marketplace/crawler) > > Learn about web content extraction capabilities > [card] [Custom Code](/apps-store/marketplace/custom-code) > > Explore executing custom logic within workflows > [card] [Collection](/apps-store/marketplace/collection) > > Discover simplified database access > [card] [Building Custom Apps](/apps-store/marketplace/extending-apps) > > Create your own API integrations # App Categories Source: https://docs.prisme.ai/apps-store/marketplace/categories Explore the diverse categories of apps available in the Prisme.ai App Store The Prisme.ai App Store offers a wide range of integrations and extensions organized into logical categories. This organization helps you discover relevant apps based on your specific needs and use cases. This page provides an overview of the major app categories and explains the types of functionality available within each. ## Category Overview The App Store is organized into several primary categories: > [card] External Integrations > > Connections to third-party services and systems > [card] Platform Infrastructure > > Access to core Prisme.ai platform capabilities > [card] UI Components > > Interface elements for building rich experiences > [card] Data Processing > > Tools for manipulating and analyzing data > [card] AI Enhancements > > Extensions that enhance AI capabilities > [card] Industry Solutions > > Specialized apps for specific sectors ## External Integrations External integrations connect Prisme.ai to third-party services and systems, enabling data exchange and process automation across platforms. > [tab] Communication & Collaboration > > > [card] Email Services > > > > * Mailjet > > * SendGrid > > * SMTP Connector > > * Microsoft Exchange > > > [card] Messaging Platforms > > > > * Slack > > * Microsoft Teams > > * Discord > > * Telegram > > > [card] Video Conferencing > > > > * Zoom > > * Google Meet > > * Microsoft Teams > > * Webex > > > [card] Project Management > > > > * Jira > > * Asana > > * Monday.com > > * Trello > > These integrations enable AI solutions to communicate through preferred channels and collaborate with existing workflow tools. > [tab] Business Systems > > > [card] CRM > > > > * Salesforce > > * Microsoft Dynamics > > * HubSpot > > * Zoho CRM > > > [card] ERP > > > > * SAP > > * Oracle > > * NetSuite > > * Microsoft Dynamics 365 > > > [card] HR Systems > > > > * Workday > > * BambooHR > > * ADP > > * SuccessFactors > > > [card] Ticketing Systems > > > > * Zendesk > > * ServiceNow > > * Freshdesk > > * JIRA Service Management > > These connections allow AI agents to interact with mission-critical business systems, accessing and updating information as needed. > [tab] Content & Knowledge > > > [card] Document Storage > > > > * Google Drive > > * Microsoft OneDrive > > * Dropbox > > * Box > > > [card] CMS > > > > * WordPress > > * Drupal > > * Contentful > > * Strapi > > > [card] Knowledge Bases > > > > * Confluence > > * Notion > > * SharePoint > > * GitBook > > > [card] Media Services > > > > * YouTube > > * Vimeo > > * Cloudinary > > * Unsplash > > These integrations provide access to content repositories, enabling AI solutions to leverage existing organizational knowledge. > [tab] Data & Analytics > > > [card] Analytics Platforms > > > > * Google Analytics > > * Mixpanel > > * Amplitude > > * Matomo > > > [card] BI Tools > > > > * Tableau > > * Power BI > > * Looker > > * Qlik > > > [card] External Databases > > > > * PostgreSQL > > * MySQL > > * MongoDB > > * Elasticsearch > > > [card] Data Enrichment > > > > * Clearbit > > * ZoomInfo > > * FullContact > > * Hunter.io > > These connections enable AI solutions to access and analyze data from various sources, enhancing insight generation. ## Platform Infrastructure Platform infrastructure apps provide access to core Prisme.ai capabilities, extending functionality without requiring external services. > [card] [Crawler](/apps-store/marketplace/crawler) > > Web content extraction and processing: > > * Website crawling and indexing > * Content extraction and structuring > * Scheduled crawling jobs > * Selective content targeting > [card] [Custom Code](/apps-store/marketplace/custom-code) > > Execute custom logic within workflows: > > * JavaScript execution > * Python processing > * Data transformation > * Complex calculations > [card] [Collection](/apps-store/marketplace/collection) > > Simplified database access: > > * Structured data storage > * Document-based collections > * Query capabilities > * Schema management > [card] Authentication > > Advanced authentication services: > > * Multi-factor authentication > * SSO integration > * OAuth flows > * JWT handling These infrastructure apps are essential building blocks for many sophisticated solutions on the platform, providing foundational capabilities that can be combined with other components. ## UI Components UI components enhance the presentation and interaction aspects of your applications with specialized interface elements. > [accordion] Data Visualization > > Components for presenting data visually: > > * **Chart Components**: Line, bar, pie, and area charts > * **Map Visualizations**: Geographic data representations > * **Data Tables**: Interactive grid displays > * **Dashboards**: Configurable data dashboards > * **Gauges and Metrics**: Visual indicators for KPIs > > These components help present complex information in an intuitive, visual format. > [accordion] Input and Forms > > Specialized input components for collecting information: > > * **Rich Text Editors**: Advanced content creation > * **File Upload**: Document and media handling > * **Advanced Selectors**: Complex option selection > * **Date and Time**: Calendar and time-based inputs > * **Multi-step Forms**: Guided input sequences > > These components enhance the data collection experience beyond basic form elements. > [accordion] Interaction Patterns > > Components that implement common interaction patterns: > > * **Dialog Systems**: Modal and non-modal interactions > * **Tour Guides**: Product tours and walkthroughs > * **Notifications**: Toast and alert systems > * **Wizards**: Step-by-step processes > * **Drag and Drop**: Interactive interfaces > > These elements provide sophisticated interaction capabilities for complex interfaces. > [accordion] Specialized Displays > > Components for specific content types: > > * **Document Viewers**: PDF and document display > * **Media Players**: Audio and video playback > * **Code Displays**: Syntax-highlighted code blocks > * **3D Viewers**: Three-dimensional object display > * **Timeline Views**: Chronological data presentation > > These components enable rich content viewing experiences within your applications. ## Data Processing Data processing apps help transform, analyze, and manage information within your workflows. **1. Data Transformation** Apps that convert data between formats and structures: * CSV Processing * XML/JSON Transformation * Data Mapping Tools * Format Conversion **2. Data Enrichment** Apps that enhance data with additional information: * Entity Recognition * Geocoding * Sentiment Analysis * Metadata Extraction **3. Data Analysis** Apps that derive insights from information: * Statistical Analysis * Pattern Recognition * Trend Detection * Anomaly Identification **4. Data Storage** Apps that manage persistent data: * Specialized Databases * File Storage Systems * Caching Mechanisms * Archive Solutions These apps enable sophisticated data operations, enhancing the intelligence and capability of your AI solutions. ## AI Enhancements AI enhancement apps extend the capabilities of the platform's AI systems with specialized functionality. > [card] Specialized Models > > Domain-specific AI models: > > * Legal Text Analysis > * Medical Terminology Processing > * Financial Document Parsing > * Technical Documentation Understanding > [card] Multi-modal Processing > > Capabilities beyond text: > > * Image Recognition > * Audio Processing > * Video Analysis > * Document Layout Understanding > [card] Reasoning Extensions > > Enhanced cognitive capabilities: > > * Logical Reasoning > * Decision Trees > * Causal Analysis > * Hypothesis Testing > [card] Specialized Tools > > Targeted AI capabilities: > > * Calendar Management > * Email Summarization > * Meeting Notes Generation > * Research Assistance These enhancements allow you to extend the AI capabilities of the platform in specific directions that align with your use cases. ## Industry Solutions Industry-specific apps address the unique needs and workflows of particular sectors. > [tab] Financial Services > > > [card] Compliance > > > > * KYC/AML Processing > > * Regulatory Reporting > > * Fraud Detection > > * Risk Assessment > > > [card] Banking Operations > > > > * Transaction Processing > > * Account Management > > * Loan Origination > > * Financial Analysis > > > [card] Investment > > > > * Portfolio Management > > * Market Analysis > > * Investment Research > > * Wealth Management > > > [card] Insurance > > > > * Claims Processing > > * Policy Management > > * Underwriting Assistance > > * Risk Evaluation > [tab] Healthcare > > > [card] Patient Care > > > > * Clinical Documentation > > * Care Coordination > > * Patient Engagement > > * Treatment Planning > > > [card] Operations > > > > * Scheduling > > * Resource Management > > * Inventory Control > > * Facility Optimization > > > [card] Research > > > > * Literature Analysis > > * Clinical Trial Management > > * Research Coordination > > * Data Collection > > > [card] Administration > > > > * Billing > > * Compliance > > * Records Management > > * Staff Coordination > [tab] Manufacturing > > > [card] Production > > > > * Quality Control > > * Process Optimization > > * Inventory Management > > * Production Planning > > > [card] Supply Chain > > > > * Logistics Coordination > > * Supplier Management > > * Distribution Optimization > > * Demand Forecasting > > > [card] Equipment > > > > * Maintenance Planning > > * Performance Monitoring > > * Failure Prediction > > * Asset Management > > > [card] Engineering > > > > * Design Assistance > > * Documentation Management > > * Project Coordination > > * Specification Analysis > [tab] Retail > > > [card] Customer Experience > > > > * Personalization > > * Product Recommendations > > * Customer Service > > * Loyalty Programs > > > [card] Inventory > > > > * Stock Management > > * Demand Forecasting > > * Product Catalog > > * Pricing Optimization > > > [card] Operations > > > > * Staff Scheduling > > * Store Management > > * Process Optimization > > * Performance Analysis > > > [card] Marketing > > > > * Campaign Management > > * Customer Segmentation > > * Promotion Optimization > > * Market Analysis These industry-specific solutions provide accelerated time-to-value by addressing common use cases within particular sectors. ## Hybrid Apps Many apps in the App Store combine multiple aspects, creating comprehensive solutions that address complex needs. > [card] Customer Service Suite > > Combines: > > * Ticketing integration > * Knowledge base connection > * Email communication > * Customer data access > [card] Document Processing > > Combines: > > * Content extraction > * Data transformation > * Storage management > * Visualization components > [card] Employee Onboarding > > Combines: > > * HR system integration > * Document management > * Process automation > * Training delivery > [card] Marketing Automation > > Combines: > > * CRM integration > * Social media connection > * Analytics processing > * Campaign management These hybrid approaches demonstrate how different app categories can be combined to create powerful, integrated solutions. ## Finding the Right App To help you navigate the App Store and find apps that match your needs: **1. Define Your Requirements** Clearly identify what functionality you need for your project **2. Browse Relevant Categories** Explore the categories that align with your requirements **3. Compare Similar Apps** When multiple options exist, compare features, ratings, and complexity **4. Check Compatibility** Verify that an app works with your existing systems and other apps **5. Review Documentation** Examine usage instructions and examples to understand capabilities ## Next Steps > [card] [API Integrations](/apps-store/marketplace/api) > > Learn about connecting to external APIs > [card] [Crawler](/apps-store/marketplace/crawler) > > Discover web content extraction capabilities > [card] [Custom Code](/apps-store/marketplace/custom-code) > > Execute custom logic within your workflows > [card] [Collection](/apps-store/marketplace/collection) > > Manage data with simplified database access > [card] [Extending Apps](/apps-store/marketplace/extending-apps) > > Create your own custom integrations # Collection Source: https://docs.prisme.ai/apps-store/marketplace/collection Collection: a database abstraction (MongoDB or PostgreSQL) for your workspaces, mutualized or dedicated, used from Builder. No UI of its own. The **Collection** app is an infrastructure module: a **database abstraction** that gives your workspaces a real database without provisioning one, and with **no UI of its own**. Depending on your platform configuration it is backed by **MongoDB or PostgreSQL**, and it can use a **mutualized database** on your enterprise cluster or a **dedicated database** when a use case needs isolation. In [Builder](/products/ai-builder/overview), you import Collection and read, write, and query structured data from your automations. > [!NOTE] > > **Collection (this app) vs the Collections product.** Collection is the low-level database module, used from Builder in code, with no interface. The [Collections product](/products/ai-collection/overview) is built on top of it and adds a no-code, spreadsheet-like interface for business users. Same data layer, two levels of abstraction. ## Overview Collection serves as a managed database service integrated directly into the Prisme.ai platform: > [card] Data Storage > > Store structured data in document collections > [card] Query Capabilities > > Retrieve and filter data with powerful query options > [card] Data Management > > Create, update, and delete records with simple operations > [card] Integration Ready > > Seamlessly connect with automations and workflows This infrastructure app is particularly valuable for persistently storing information, managing application state, and building data-driven automations without external database dependencies. ## Release Note: Collection with PostgreSQL With this new release, **Collection** instructions become compatible with postgresql database and the same MongoDB queries / updates syntax as usual.\ This also brings performance improvements and new features, but with a few breaking changes and mongodb/postgres subtle differences to note. *** > [card] Schema Configuration > > Collections now require explicit schema definitions in the application config. > [card] Cross-Database Compatibility > > Collections can now work across **MongoDB** and **PostgreSQL**, with some differences detailed below. > [card] Breaking Changes > > Some MongoDB options were deprecated or modified. See below for full details. > [card] New Features > > Support for new **aggregate** instruction across both MongoDB and PostgreSQL. Existing **distinct** improved with new features *** ### Breaking Changes > [!WARNING] > > These breaking changes may affect your existing MongoDB-based Collections.\ > Please update your configuration and code accordingly. **1. Connection Pooling** * Since mongodb requests were previously executed by prismeai-functions microservice, the total number of mongodb clients opened were directly tied to the prismeai-functions replicas number & scaling * Now that collections clients are only opened from `prismeai-runtime` (which supports multithreading), `minPoolSize` and `maxPoolSize` must be scaled relative to `RUNNER_MAX_THREADS`. * Example: if `RUNNER_MAX_THREADS=2`, then divide your pool sizes by 2. **2. Required permissions** * The new collection schemas enforcement now requires 3 more mongodb user permissions (& their equivalent SQL) : * **listCollections**, **listIndexes**, **dropIndexes** **3. Update Instructions** * `Collection.updateMany` no longer supports `options.upsert` * `Collection.updateOne` deprecates `options.upsert` : Use the dedicated `Collection.upsert` instruction instead. * `Collection.updateOne` and `Collection.updateMany` no longer supports `options.replace`. **4. Allowed Update Operators** Only the following MongoDB update operators are supported: **\$push, \$set, \$inc, \$addToSet, \$pull** **5. Safer Deletes and Updates** * `updateOne`, `updateMany`, `deleteOne` and `deleteMany` now raise an error if the query is empty/undefined. * To allow matching all documents, use the `overrideSecurity: true` parameter. **6. Schema Enforcement** * All collections must now define **collectionName** and **properties** inside their app config, see an example config below. * Queries referencing unknown fields will raise errors. * Insert/update operations with unknown fields will also fail. * All properties defined in the schema will now be initialized to null and returned as-is by `find` if they were not initialized (and nullable) *** ### 🆕 New Features > [tab] Aggregate > > Use **aggregate** instruction to easily calculate sums, average or count optionally groupped by a column, on both MongoDB and PostgreSQL collections. > [tab] Distinct > > Use **distinct** to return unique values for a field.\ > Supports additional options to return each value with their `count`, and sort by these counts. *** ## Key Features > [tab] Document Storage > > Store flexible document structures: > > * **Schema enforcement**: Ensure your data respect a predefined schema > * **Nested Data Support**: Store complex, hierarchical data > * **Data Types**: Support for strings, numbers, booleans, arrays, objects, dates > * **Automatic Indexing**: Optimized for fast retrieval > > This flexible storage model accommodates a wide range of data needs. > [tab] Query Capabilities > > Find exactly the data you need: > > * **Equality Queries**: Match specific field values > * **Comparison Operators**: Greater than, less than, etc. > * **Logical Operators**: AND, OR, NOT conditions > * **Array Operations**: Query array contents and properties > * **Text Search**: Search within text fields > * **Regular Expressions**: Pattern matching in strings > > These query capabilities make it easy to retrieve precisely the data you need. > [tab] Data Manipulation > > Manage data with comprehensive operations: > > * **Insert**: Add new documents > * **Find**: Retrieve documents with filtering > * **Update**: Modify existing documents > * **Delete**: Remove documents > * **Count**: Get document counts > * **Distinct**: Find unique values > * **Aggregation**: Group and analyze data > > These operations provide complete control over your data. > [tab] Advanced Features > > Leverage powerful database capabilities: > > * **Indexing**: Create indexes for better performance > * **Transactions**: Ensure data consistency > * **Pagination**: Manage large result sets > * **Sorting**: Order results by specified fields > * **Update Operators**: Specialized field updates > > These advanced features enable sophisticated data management. ## How Collection Works Collection provides a MongoDB-compatible interface integrated directly into the Prisme.ai platform: **1. Collections Organization** Data is organized into collections, similar to tables in relational databases: * Each collection contains related documents * Collections are created automatically when used * No schema definition is required * Each workspace has its own collection namespace **2. Document Structure** Documents are stored as JSON-like objects: * Each document has a unique `_id` field * Documents can have any structure * Fields can contain various data types * Nested objects and arrays are supported * Documents in the same collection can have different structures **3. Data Operations** Operations are performed through simple, intuitive methods: * Commands follow MongoDB syntax and patterns * Results are returned in standard formats * Operations are executed in a secure environment * Performance is optimized for common use cases **4. Integration** Collection integrates with the rest of the Prisme.ai ecosystem: * Direct usage in automations * Connection to AI agents through tools * Data exchange with other platform components * Role-based access control This approach provides the power of a document database with the simplicity of a fully managed service. ## ⚖️ MongoDB vs PostgreSQL Differences > [tab] \$in Operator > > * MongoDB: `$in: []` matches nothing. > * PostgreSQL: `$in: []` matches everything!\\ > > > [!CAUTION] > > > > Always check your input array before running `$in` queries on PostgreSQL. > [tab] NULL vs \$ne > > * PostgreSQL does not consider NULL values when using `$ne`. > * Initialize values explicitly if you expect `$ne` to work. > [tab] Array Queries > > * MongoDB allows `{ "myArrayCol": "value" }` to search for "value" in the text array column `myArrayCol`. > * In PostgreSQL, use `{ "myArrayCol": { $in: ["value"] } }`. > [tab] Array order on updates > > * PostgreSQL array columns may lose value ordering when using `$push`, `$pull`, or `$addToSet`. > * In MongoDB, order is preserved. > [tab] Nested JSON Array Queries > > * MongoDB allows `{ "someObject.field": "foo" }`, even if `someObject` is an array. > * The literal postgres translation would only work if `someObject` is an **object** > * If `someObject` is an array, PostgreSQL requires the more explicit `$elemMatch` operator : > > ```json theme={null} > { "someObject": { "$elemMatch": { "field": "foo" } } } > ``` > [tab] Upserts > > * Upserts with PostgreSQL require a **unique** index matching all **onConflictFields** > * Upserts cannot target a document with any query operator other than the single field list **onConflictFields**. > [tab] \$addToSet > > * Nullable fields that are not initialized during insertion are always initialized to `null` with both MongoDB and PostgreSQL > * MongoDB cannot process $addToSet to null values, so these columns must be initialized to `[]` before using $addToSet > * PostgreSQL graciously handles this situation and does not need these arrays to be set to `[]` for using \$addToSet *** # 🛠️ Configuring a Collection Schema > [!TIP] > > Defining a schema is now **mandatory** for collections in order to enforce validation and ensure cross-database compatibility. ```yaml theme={null} slug: Messages config: collectionName: Messages indexes: - properties: children - properties: - conversationId - from.id - name: msg_conv_from_tags_idx properties: - conversationId - from.id - tags uniques: - properties: conversationId properties: conversationId: type: text nullable: false children: type: text nullable: false content: type: text nullable: true from: type: json nullable: false tags: type: array nullable: false messagesCount: type: number ``` * The **array** type only supports text arrays * Use **json** type for both objects and arrays of objects * Non-**nullable** properties must be set on inserts **and upserts**. Otherwise the given query will fail > [!TIP] > > The **name** field on indexes is optional: by default it is generated automatically from the list of `properties`.\ > However, some databases enforce a maximum length on index names (**PostgreSQL** truncates names above **63 characters**), which can cause collisions or errors on compound indexes with many/long property names.\ > In those cases, it is **imperative** to explicitly set a shorter `name` to avoid conflicts and ensure the index is created reliably. > [!NOTE] > > Available property types include: `string, text, date, time, datetime, number, double, float, integer, decimal, boolean, uint8array, array, enum, enumArray, json, blob, time` ## 🔄 Changing a Property Type Changing the `type` of a property that already holds data means converting every existing row. The default conversion fails as soon as one value does not fit the new type: a `text` column switched to `json` chokes on the first row that is not valid JSON. > [!WARNING] > > When that conversion fails, **the whole schema update fails with it**: every > other column added in the same change is silently missing from the database. > The symptom appears much later, and somewhere else: writing to one of those > columns returns `Invalid update on unknown field .`. ### Text converted to json automatically On PostgreSQL, a property now declared `json` whose column is still text is converted **without declaring anything**, when the platform knows how its rows were written. It decides from what the collection's schema said **before** the update: | The property was | What happens to existing values | | - | - | | `string` or `text` | JSON objects and arrays are parsed; everything else stays the string it was (`123` stays `"123"`) | | `json` already | every value the platform serialized comes back as written (`"abc"` → `abc`, `123` → `123`, objects and arrays parsed); text that is not valid JSON stays a string. See below for collections moved from MongoDB | | unknown (no previous schema, not declared, or another type) | **nothing is converted**, see below | A column that is neither text nor json (a number, a boolean or a date column, for instance) is never converted automatically either: see below. A column that used to be an `array` (text array) is always converted, each array becoming the same JSON array. > [!NOTE] > > The conversion changes what you read: a string holding `{"en":"Hello"}` is > read as the object `{ en: 'Hello' }` from then on. Until it is converted, a > `json` property stored in a text column is read as the raw text. > [!WARNING] > > **Collections moved from MongoDB to PostgreSQL.** The migration creates a > field that held only strings as a text column, with the strings as they > were. If the property is declared `json`, a string such as `123`, `true` or > `null` in that column is read as a number, a boolean or `null` once the > column is converted, like the values the platform serialized itself. The > `workspaces.collections.migrated` event counts these values in `retyped`, so > you can check whether a collection is affected. When the platform cannot tell, or cannot convert the column type, it leaves the column alone and emits a `workspaces.collections.notMigrated` event in the activity feed: the column, the reason, and the migration to declare (`skipped[].howTo`). The collection keeps working on its previous schema until you declare it, as described below. ### Declaring a migration Declare a **migration** next to your properties to choose how the existing values are converted, or to convert a column the platform left alone. Add it to the configuration of the Collection instance: ```yaml theme={null} config: collectionName: agents properties: description: type: json # was `text` until now migrations: - op: alterColumnType column: description from: [text, character varying] to: jsonb cast: auto description: Localized descriptions, 2026-07-21 ``` A declared migration takes precedence over the automatic one, for the column types listed in its `from`. The migration runs **before** the schema is synchronized, and **in the same transaction**: if the synchronization then fails (a new unique index on duplicate values, for instance), the conversion is rolled back with it and the column keeps its previous type. ### It only runs once, by itself The `from` list is a guard checked against the column's **current** type in the database. Once the column has been converted, `from` no longer matches and the migration is skipped. > [!TIP] > > Leave the declaration in place once it has run. There is no migration history > to maintain: the database itself is the record, so the same declaration is > safe on an instance that has already migrated, on a fresh one where the column > was created with the right type, and on every later update. > [!WARNING] > > Never list the **target** type in `from`. With `from: [text, jsonb]` and > `to: jsonb`, the guard keeps matching after the conversion and the table is > rewritten on every single schema update. The conversion rewrites the table while locking it. If the table stays locked by something else for more than 5 seconds (`COLLECTIONS_MIGRATION_LOCK_TIMEOUT_MS` on a self-hosted runtime), the conversion gives up rather than block every request on the collection, and runs again at the next update. ### Converting to json | `cast` | What happens to existing values | | - | - | | `auto` *(default)* | JSON objects and arrays are parsed, anything else is wrapped as a JSON string | | `lenient` | every valid JSON value is parsed, scalars included (`123` becomes a number); anything else is wrapped | | `wrap` | every value is wrapped as a JSON string, even valid JSON | | `parse` | every value is parsed, and the migration fails on the first one that is not valid JSON | `auto` is what you want for a column that accumulated both plain text written before the type change and JSON written after it. Use `lenient` only for a column whose values were all written as JSON. > [!NOTE] > > `auto` and `lenient` work on every supported PostgreSQL version; they are > faster from **PostgreSQL 16**. ### Following what happened A migration that actually converts data emits a `workspaces.collections.migrated` event in the activity feed, reporting the column, the type it had, the type it became, the number of rows rewritten (`rows`, an estimate when `rowsEstimated` is true), how many of them now read as a number, a boolean or `null` instead of a string (`retyped`, with `lenient` only) and how long it took. A migration that matches nothing emits nothing. If a declared migration fails, the collection keeps working on its previous schema and the `workspaces.collections.notMigrated` event tells you which column refused and why (`failed`), so the failure is visible immediately instead of surfacing weeks later. A conversion undone because the rest of the schema update failed after it is listed in `rolledBack`. ### Checking and converting from an automation Without access to the database, two functions of the [collections module](/products/ai-builder/module-collections) let an automation of your workspace do the same, on its own collections only: * `getSchemaDrift` lists the collections whose table no longer matches their configuration: a column of the wrong type, a column that was never created. * `runSchemaMigrations` converts the columns of one collection with the migrations you give it, then synchronizes the collection with its configuration, exactly like an update of the Collection instance. With `dryRun: true`, it only tells you what it would convert, and how. ```yaml theme={null} - run: module: collections function: getSchemaDrift output: drift # drift.collections[0]: { collection: agents, columns: [{ column: description, from: text, to: jsonb, changes: [type] }, ...] } - run: module: collections function: runSchemaMigrations parameters: collection: agents dryRun: true migrations: - op: alterColumnType column: description from: [text, character varying] to: jsonb cast: auto output: plan ``` Check `plan.planned` (the cast, the number of rows, `retyped`), then run the same call without `dryRun`: the conversion emits the same `workspaces.collections.migrated` event, and `getSchemaDrift` no longer lists the collection. To keep the migration for the instances you have not converted yet, declare it in the configuration as well. A few rules: * declare the property `json` in the configuration first: only conversions to `jsonb` of `json` properties are accepted, since the synchronization brings every other column back to its declared type; * run it once, from a manual or one-shot automation: each call synchronizes the collection, even with nothing to convert, and never take the `migrations` from a request payload; * PostgreSQL only: on MongoDB there are no column types, so no drift. ## Basic Operations Let's explore the core operations you can perform with Collection: > [accordion] Inserting Data > > Add documents to a collection: > > ```yaml theme={null} > # Insert a single document > - Collection.insert: > data: > name: "John Doe" > email: "john.doe@example.com" > age: 30 > active: true > output: result > > # Insert multiple documents > - Collection.insertMany: > data: > - name: "Jane Smith" > email: "jane.smith@example.com" > age: 28 > - name: "Bob Johnson" > email: "bob.johnson@example.com" > age: 35 > output: result > ``` > > The operation returns information about the inserted documents, including their assigned `_id` values. > [accordion] Finding Data > > Retrieve documents from a collection: > > ```yaml theme={null} > # Find documents matching criteria > - Collection.find: > query: > age: { $gt: 25 } > output: users > > # Find a single document > - Collection.find: > query: > email: "john.doe@example.com" > output: user > > # Find + sort + pagination > - Collection.find: > query: > active: true > sort: > age: -1 # Descending > options: > limit: 10 > skip: 0 > output: activeUsers > ``` > > These operations allow you to retrieve documents with precise filtering and control over the results. > [accordion] Updating Data > > By default, **updates** use mongo `$set` operator to only update given fields without removing other fields already existing in the matched record : > > ```yaml theme={null} > # Update a single document > - Collection.updateOne: > query: > email: "john.doe@example.com" > data: > age: 31 > lastUpdated: "{{run.date}}" > output: updateResult > ``` > > But you can also use the MongoDB operators you want : > > ```yaml theme={null} > # Update a single document > - Collection.updateOne: > query: > email: "john.doe@example.com" > data: > $set: > age: 31 > lastUpdated: "{% now() %}" > output: updateResult > > # Update multiple documents > - Collection.updateMany: > query: > active: false > data: > $set: > status: "inactive" > lastChecked: "{{run.date}}" > output: updateResult > > # Update with advanced operators > - Collection.updateOne: > query: > _id: "{{userId}}" > data: > $inc: > loginCount: 1 > $push: > loginHistory: > date: "{{run.date}}" > ip: "{{userIp}}" > output: updateResult > ``` > > These operations enable precise updates to documents, including field modifications, additions, and array operations. > [accordion] Upserts > > **Upserts** allow you to create **or** update a document if it already exists, based on a list of properties (**onConflictFields**) that must stay unique accros the collection : > > ```yaml theme={null} > - Collection.upsert: > data: > type: city > name: Toulouse > options: > onConflictFields: > - name > onInsertValues: > createdAt: '...' > output: upsert > ``` > > **onInsertValues** is optional and let you specify data that will be only included upon document creation but not on update. > > > [!NOTE] > > > > With **PostgresSQL**, a **compound unique** index is required for all **onConflictFields**. > [accordion] Deleting Data > > Remove documents from a collection: > > ```yaml theme={null} > # Delete a single document > - Collection.deleteOne: > query: > email: "john.doe@example.com" > output: deleteResult > > # Delete multiple documents > - Collection.deleteMany: > query: > active: false > lastLogin: { $lt: "{% dateAdd('now', -90, 'days') %}" } > output: deleteResult > ``` > > These operations allow you to remove documents based on specific criteria. > [accordion] Distinct values > > Easily retrieve all distinct values for a column with their counts and sorting : > > ```yaml theme={null} > # Aggregate data > - Collection.distinct: > query: > projectId: '{{projectId}}' > userDocument: > $ne: true > createdAt: > $gt: '{{dateStart}}' > $lt: '{{dateEnd}}' > field: 'tags' > opts: > count: true > valueField: distinctTags > sort: > count: -1 > output: res > ``` > [accordion] Aggregation Operations > > Perform complex data analysis. Supported aggregate types: `sum`, `avg`, `count`, `max`, `min`. > > `max` and `min` work on any orderable field type: numbers, datetimes (BSON dates and ISO 8601 strings), and strings (lexicographic order). > > ```yaml theme={null} > # Aggregate data > - Collection.aggregate: > query: > projectId: '{{projectId}}' > isArchived: > $ne: true > createdAt: > $gt: '{{dateStart}}' > $lt: '{{dateEnd}}' > opts: > groupBy: department > groupField: departmentGroup > sort: > count: -1 > steps: > - inputField: size > type: sum > outputField: totalSize > - inputField: age > type: avg > outputField: avgAge > - inputField: age > type: max > outputField: oldestAge > - inputField: age > type: min > outputField: youngestAge > - inputField: _id > type: count > outputField: count > output: res > ``` > > **Example: latest activity timestamp per agent** (single pass, no `find` + `sort` + `limit`): > > ```yaml theme={null} > - Collection.aggregate: > query: > agent_id: '{{agent_id}}' > steps: > - inputField: last_message_at > type: max > outputField: latest_message_at > output: res > # res[0].latest_message_at → ISO string of the most recent message > ``` > [accordion] Find pagination & fields selection > > Pagination is enforced by returning only the first 50 matching entries by default. This number is configurable with **options.limit**.\ > You can then choose which page you are interested in using **options.page**, starting at **1** for the first page : > > ```yaml theme={null} > # First page : > - Collection.find: > query: {} > options: > limit: 50 > page: 1 > output: firstPage > - Collection.find: > query: {} > options: > limit: 50 > page: 2 > output: secondPage > ``` > > Alternatively, you can use **options.skip** to finely select the matching page : > > ```yaml theme={null} > # Retrieve from the 11th to the 51th record > - Collection.find: > query: {} > options: > limit: 50 > skip: 10 > output: firstPage > ``` > > You can also limit the document properties you will have in return : > > ```yaml theme={null} > - Collection.find: > query: {} > options: > fields: > - projectId > - userDocument > - createdAt > ``` ## Advanced Features Collection includes several advanced features that enable sophisticated data management: > [card] Indexing > > Create indexes to optimize query performance: > > * Single-field indexes > * Compound indexes > * Text indexes for full-text search > * Unique indexes for constraint enforcement > [card] Transactions > > Ensure data consistency with multi-document transactions: > > * Atomic operations across multiple documents > * Rollback on error > * Consistent reads within a transaction > * Isolation levels > [card] Geospatial > > Store and query location data: > > * GeoJSON format support > * Proximity queries > * Geospatial indexing > * Area containment queries > [card] Schema Validation > > Optional schema validation for data consistency: > > * JSON Schema validation > * Custom validation rules > * Validation actions (error or warning) > * Field restriction These advanced features provide additional capabilities for specific use cases and requirements. ## Common Use Cases Collection enables a wide range of use cases: > [card] User Management > > Store and manage user information: > > * User profiles > * Preferences > * Activity history > * Authentication data > [card] Content Management > > Manage structured content: > > * Articles and posts > * Product information > * Media metadata > * Categorization and tagging > [card] Workflow State > > Track process and workflow state: > > * Status tracking > * Approval flows > * Stage information > * Audit history > [card] Data Collection > > Collect and store form submissions: > > * Survey responses > * Application data > * Contact requests > * Registration information ## Integration with Prisme.ai Products Collection works seamlessly with other Prisme.ai products: > [tab] Knowledges > > Enhance knowledge bases with Collection: > > * Store metadata about knowledge base documents > * Track usage patterns and popular queries > * Maintain user feedback on responses > * Save and manage test results > > This integration improves knowledge management and quality assurance. > [tab] Builder > > Use Collection in your automations: > > * Store and retrieve workflow state > * Maintain configuration settings > * Log events and activities > * Implement data-driven decision processes > > This enables sophisticated, data-driven automations. > [tab] Custom Code > > Combine Collection with Custom Code for advanced operations: > > * Implement complex query logic > * Process and transform data > * Perform batch operations > * Create specialized aggregations > > This combination provides maximum flexibility for data operations. > [tab] API Integrations > > Connect Collection with external systems: > > * Store data retrieved from APIs > * Buffer information for external systems > * Maintain synchronization state > * Cache external data for performance > > This integration bridges internal and external data sources. ## Example: Contact Management System Here's an example of using Collection to build a contact management system: **1. Define Data Structure** Plan your data organization: * Contacts collection for individual contacts * Companies collection for organization information * Interactions collection for communication history * Tags collection for categorization **2. Create Storage Operations** Implement data storage automations: ```yaml theme={null} # Add a new contact slug: add-contact name: Add Contact do: - Collection.insert: data: firstName: "{{payload.firstName}}" lastName: "{{payload.lastName}}" email: "{{payload.email}}" phone: "{{payload.phone}}" company: "{{payload.company}}" title: "{{payload.title}}" tags: "{{payload.tags}}" createdAt: "{% now() %}" output: result - emit: event: contact-added payload: contact: "{{result}}" ``` **3. Implement Query Operations** Create data retrieval automations: ```yaml theme={null} # Search for contacts slug: search-contacts name: Search Contacts do: - set: name: query value: {} - conditions: '{{payload.searchTerm}}': - set: name: query value: $or: - firstName: { $regex: "{{payload.searchTerm}}", $options: "i" } - lastName: { $regex: "{{payload.searchTerm}}", $options: "i" } - email: { $regex: "{{payload.searchTerm}}", $options: "i" } - company: { $regex: "{{payload.searchTerm}}", $options: "i" } '{{payload.tags}}': - set: name: query.tags value: { $in: "{{payload.tags}}" } default: [] - Collection.find: query: "{{query}}" sort: lastName: 1 firstName: 1 options: limit: "{{payload.limit || 20}}" skip: "{{payload.skip || 0}}" output: contacts - emit: event: search-results payload: contacts: "{{contacts}}" query: "{{query}}" ``` **4. Create User Interface** Build a UI to interact with your data: * Contact list view * Contact detail view * Add/edit contact forms * Search and filtering **5. Implement Business Logic** Add specialized functionality: * Duplicate detection * Contact merging * Import/export capabilities * Notification system This example demonstrates how Collection can serve as the data layer for a complete application. ## Best Practices Follow these recommendations to get the most from Collection: > [accordion] Data Modeling > > Design your data structure effectively: > > * Use descriptive collection names > * Choose between embedding and referencing based on access patterns > * Keep document size reasonable (under 1MB when possible) > * Normalize data when it changes frequently > * Denormalize data to optimize common queries > * Use consistent field names across collections > > Effective data modeling improves performance and maintainability. > [accordion] Query Optimization > > Optimize your queries for better performance: > > * Create indexes for frequently queried fields > * Write specific queries that use indexes > * Limit the number of documents returned > * Avoid complex regex patterns when possible > * Use aggregation for data processing, not application code > > These practices ensure efficient data retrieval. > [accordion] Data Validation > > Ensure data quality and consistency: > > * Validate input data before storage > * Consider using schema validation for critical collections > * Implement application-level validation for complex rules > * Use unique indexes to prevent duplicates > * Include creation and update timestamps > * Maintain audit trails for sensitive data > > Validation helps maintain data integrity. > [accordion] Security Considerations > > Protect your data with proper security practices: > > * Apply proper access controls > * Validate input to prevent injection attacks > * Don't store sensitive data without encryption > * Implement appropriate backup strategies > * Audit access to sensitive collections > * Follow the principle of least privilege > > Security should be a fundamental consideration in all data operations. ## Limitations and Considerations When using Collection, be aware of these considerations: * **Document Size**: Individual documents are limited to 16MB * **Nested Depth**: Deep nesting of objects can impact performance * **Query Complexity**: Very complex queries may have performance implications * **Transaction Limits**: Transactions have time and size limitations * **Indexing Overhead**: Indexes improve query performance but increase storage requirements and write overhead * **Consistency Model**: Collection uses an eventually consistent model in some scenarios ## Next Steps > [card] [API Integrations](/apps-store/marketplace/api) > > Learn about connecting to external APIs > [card] [Crawler](/apps-store/marketplace/crawler) > > Discover web content extraction capabilities > [card] [Custom Code](/apps-store/marketplace/custom-code) > > Execute custom logic within your workflows > [card] [Extending Apps](/apps-store/marketplace/extending-apps) > > Create your own custom integrations # Connector Architecture Source: https://docs.prisme.ai/apps-store/marketplace/connectors/architecture Reference architecture and security model for Prisme.ai App + MCP connectors Prisme.ai connectors integrate workspaces and AI agents with third-party APIs. A connector is built as a Prisme.ai workspace, published as an app, and installed as an **app instance** in each workspace that uses it. This page documents the **current reference architecture for App + MCP connectors**. It describes the implementation model used to build connectors, including tenant-context execution, an optional global MCP endpoint, authentication flows, trust domains, and security controls. > [!NOTE] > > This document describes the current reference model. It is not a compatibility matrix or an inventory of every connector already deployed. ## High-level architecture The reference architecture supports two execution topologies: * **Tenant endpoint (default)**: App calls and workspace-specific MCP calls execute in the installed app instance. The connector resolves configuration, credentials, and the agent allowlist from that tenant workspace only. * **Global core MCP endpoint (optional)**: a connector using central per-user OAuth can expose one MCP endpoint from its core workspace for organization-wide catalog registration. This endpoint does not use a tenant workspace's configuration or agent allowlist. Its authorization gates are the end user's OAuth connection and the provider's scopes, roles, and policies. The optional global MCP endpoint is distinct from the central OAuth token service. The token service can provide public OAuth metadata and proxy token exchanges without exposing the central `client_secret`, whether MCP calls use a tenant endpoint or the optional global endpoint. A connector can expose two invocation modes: * **App mode**: a Builder automation calls a connector operation directly in the installed app instance. * **MCP mode**: an AI agent discovers and calls entity-grouped tools through a JSON-RPC 2.0 endpoint. Depending on the connector deployment, that endpoint is tenant-specific or the optional global core endpoint. In the tenant topology, the connector calls the provider with configuration and credentials owned by the installed workspace and never retrieves credentials from another customer workspace. In the optional global topology, execution remains in the connector core and relies on per-user delegated OAuth rather than tenant-held service credentials. **Diagram legend:** `TB` identifies a trust domain; every arrow between different `TB` domains crosses a trust boundary. `F` identifies a data or control flow, and `C` identifies a security control. Arrows carry only stable flow IDs; the flow inventory below describes their content. ### Control plane: configuration and secrets ```mermaid theme={null} %%{init: {"themeVariables": {"fontSize": "20px"}, "flowchart": {"nodeSpacing": 45, "rankSpacing": 65, "wrappingWidth": 480}}}%% flowchart TB Admin["TB1: User and caller domain
Studio administrator · authenticated browser session
"] ConfigAPI["TB2: Prisme.ai platform services
Configuration API · session validation · workspace RBAC
"] Stores["TB3: Tenant workspace domain
config.value · configuration secrets · agent allowlist
"] Connector["TB3: Tenant workspace domain
Installed connector runtime · local reference resolution
"] Admin -->|"F1"| ConfigAPI ConfigAPI -->|"F2"| Stores Stores -.->|"F3"| Connector ``` ### Runtime data plane: tenant and optional global MCP endpoints ```mermaid theme={null} %%{init: {"themeVariables": {"fontSize": "20px"}, "flowchart": {"nodeSpacing": 45, "rankSpacing": 65, "wrappingWidth": 480}}}%% flowchart TB Caller["TB2: Prisme.ai platform services
Agent Creator or Builder runtime
"] Context["TB2: Prisme.ai platform services
App: workspace identity
MCP: context_id · agent_id · user_id
"] Tenant["TB3: Tenant workspace domain
Installed App/MCP endpoint · allowlist · tenant credentials
"] Core["TB4: Connector core workspace domain
Optional global MCP endpoint · per-user OAuth
"] Provider["TB5: External provider domain
OAuth endpoints · business API · authorization policy
"] Caller -->|"F4"| Context Context -->|"F5"| Tenant Context -.->|"F5"| Core Tenant -->|"F6"| Provider Core -.->|"F6"| Provider ``` Solid arrows show the default tenant path. Dashed arrows show the optional global MCP path; App mode always follows the tenant path. ### Flow inventory | Flow | Source → destination | Security-relevant content | | - | - | - | | `F1` | Studio administrator → configuration API | Authenticated session, CSRF protection, requested connector configuration | | `F2` | Configuration API → workspace stores | RBAC-authorized configuration, secret values, and agent allowlist | | `F3` | Tenant workspace stores → tenant connector runtime | Local secret references resolved within the same tenant trust domain while an automation executes | | `F4` | Agent Creator or Builder runtime → execution context | MCP `tools/call` or explicit App instruction with business arguments | | `F5` | Execution context → tenant endpoint or optional global endpoint | Workspace identity; for MCP, `context_id`, `agent_id`, and `user_id` | | `F6` | Active connector endpoint ↔ external provider | HTTPS request with server-side credentials and the provider response | ### Trust domains and boundary crossings | Trust domain | Responsibility | Security implication | | - | - | - | | TB1: User and caller domain | Submit configuration, App, or MCP requests | Business arguments are untrusted; provider credentials are never accepted from the LLM | | TB2: Prisme.ai platform services | Authenticate callers, enforce platform access, and attach execution identity | MCP scope injects `context_id,agent_id,user_id`; workspace RBAC protects configuration | | TB3: Tenant workspace domain | Store tenant configuration and execute the installed App or workspace-specific MCP endpoint | Tenant secrets resolve only in this workspace; the agent allowlist applies to its MCP endpoint | | TB4: Connector core workspace domain | Host central OAuth services and, optionally, a global MCP endpoint | The central `client_secret` stays in the core; a global endpoint uses per-user OAuth rather than a tenant allowlist | | TB5: External provider domain | Authenticate the external principal and authorize API operations | Provider scopes, roles, policies, and audit logs remain authoritative | ## Core security properties > [card] Tenant-endpoint isolation > > App calls and tenant-specific MCP calls run in the installed app instance, so their configuration and secrets come from the workspace that owns that instance. > [card] Credentials stay server-side > > The connector attaches credentials only when calling the provider. They are not included in MCP tool schemas or tool results. > [card] Topology-specific authorization > > Tenant MCP endpoints validate the injected `agent_id` against the workspace allowlist. Optional global endpoints rely on per-user OAuth and provider authorization instead. > [card] Deterministic API surface > > Tools map to a generated registry of known methods and paths. The LLM does not construct an arbitrary outbound request. ## Low-level request processing ### MCP handshake and tool call Both MCP endpoint variants serve `initialize` and `tools/list` through MCP Core and return HTTP `202` for notifications without an `id`. The following flow shows the controls applied to `tools/call` in either endpoint context: ```mermaid theme={null} %%{init: {"themeVariables": {"fontSize": "20px"}, "flowchart": {"nodeSpacing": 45, "rankSpacing": 65, "wrappingWidth": 480}}}%% flowchart TB Caller["TB2: Agent Creator caller
tools/call + injected caller IDs
"] Gate["TB2 / C1: Endpoint authorization
Protocol validation · tenant allowlist or global OAuth gate
"] Auth["TB3 or TB4 / C2: Credential resolver
Workspace service auth or user OAuth
"] Dispatch["TB3 or TB4 / C3: Request allowlist
entity + action → registered operation and approved base source
"] Provider["TB5: External provider domain
Server-side credential attachment
"] Guard["TB3 or TB4 / C4: Response guard
Error normalization · size limits · MCP envelope
"] Caller --> Gate Gate --> Auth Auth --> Dispatch Dispatch --> Provider Provider --> Guard ``` On a tenant endpoint, an allowlist failure is returned as an MCP error result with an actionable reason. On either endpoint variant, authentication errors are passed through without replacing them with a generic configuration error, so a revoked OAuth grant can trigger reconnection rather than an administrator workflow. ### App-mode call In App mode, a DSUL automation calls a public connector instruction such as `Connector.getRecord`. The instruction uses the same `buildAppAuth` and operation registry as MCP mode, but returns the provider's raw JSON data instead of the MCP `content` envelope. This keeps authentication and request construction consistent across deterministic workflows and agent-driven calls. ## Operation registry and outbound request control The connector's supported API surface originates from a versioned OpenAPI specification: | Artifact | Security function | | - | - | | OpenAPI specification | Source of approved provider operations and stable operation IDs | | `ENTITY_OPS` | Maps an MCP entity and action to one operation | | `OPERATIONS` | Fixes the method, path, parameter positions, content type, and, when applicable, a per-operation provider base | | App wrappers | Expose explicit Builder instructions and return raw API data | | MCP schemas and guards | Restrict LLM arguments and return bounded MCP content | MCP tools are grouped by business entity, for example `records`, `files`, or `messages`. Each tool accepts an `action` enum rather than exposing one LLM function for every provider endpoint. This reduces the exposed tool count and makes the permitted operation set explicit. The runtime request builder accepts only registered operations. `OPERATIONS` fixes the method, path, parameter positions, and content type. It either fixes a per-operation provider base or selects a base returned by the authentication resolver. Depending on the provider, that base can be static, derived and normalized from a provider-issued instance URL, or supplied through administrator-managed connector configuration. Standard MCP arguments cannot override it. Tool schemas follow additional LLM-safety constraints: * no unresolved JSON Schema `$ref`; * descriptions remain within provider limits; * every array declares `items`; * tool responses are bounded before entering the model context; * binary responses are not transported inline through the DSUL fetch path. ## Authentication models A tenant endpoint stores one authentication configuration object with a `mode` discriminator in the installed workspace. An optional global endpoint instead uses the connector core's central OAuth configuration and user-scoped token state. A connector exposes only the modes supported by its provider. | Mode | Principal | Credential location | Typical use | | - | - | - | - | | `oauthCentral` | End user | User-scoped tokens in the active endpoint context (tenant or core); central client secret in the connector core | Preferred delegated OAuth with no customer-managed OAuth client | | `oauth` | End user | User-scoped tokens and a workspace-managed OAuth client configuration | Delegated OAuth with a dedicated OAuth client | | `clientCredentials` | Service identity | Installed workspace secret | Machine-to-machine provider access | | `jwt` | Service account | Installed workspace secret, including the signing key | Signed service-account exchange | | `apiKey` | Service identity | Installed workspace secret | APIs using a static key in a header or query parameter | | `accessToken` | Configured identity | Installed workspace secret | Testing or externally managed token lifecycle | ### Per-user OAuth with PKCE For delegated access, the connector uses the OAuth 2.0 authorization-code flow with PKCE and state validation: 1. `oauthConnect` generates a verifier, challenge, and state in the user's scope, then redirects the browser to the provider. 2. `oauthCallback` validates the pending state and exchanges the code using the original verifier. 3. The access and refresh tokens are stored in user scope in the active endpoint context. On a tenant endpoint, the refresh token is also copied best-effort to a workspace secure-secret entry keyed by user ID for trusted scheduled execution. This copy requires an Owner, Editor, or SuperAdmin; interactive OAuth remains usable if the copy is not permitted. 4. `oauthStatus` proactively checks expiry and refreshes when necessary. A non-transient refresh failure marks the connection as disconnected so the user is prompted to reconnect. 5. `oauthDisconnect` removes local state and, when supported, revokes the provider token. The server-controlled `targetUserId` used by a scheduled automation must never come from MCP or LLM arguments. ### Central OAuth token service For `oauthCentral`, a platform maintainer configures one provider OAuth client in the connector's core workspace. Installed connector instances can obtain the public client ID and scopes, but never the client secret. The core workspace exposes two narrowly scoped functions: * a public metadata endpoint that returns the client ID and default scopes; * a token exchange proxy that injects the central client secret server-side for authorization-code and refresh-token grants. The OAuth redirect is registered once against the core callback. For a tenant endpoint, the installed workspace callback is packed into the OAuth flow state and validated against the Prisme.ai API host before redirection, preventing the callback proxy from becoming an open redirect. The PKCE verifier and resulting user tokens remain attached to the user in the active endpoint context: the tenant workspace for a tenant endpoint, or the connector core for a global endpoint. Token exchange requests disable automatic fetch-error event emission so a provider error cannot copy a `client_secret` into runtime failure events. ```mermaid theme={null} %%{init: {"themeVariables": {"fontSize": "20px"}, "flowchart": {"nodeSpacing": 45, "rankSpacing": 65, "wrappingWidth": 480}}}%% flowchart TB Connect["TB3: Tenant workspace domain
OAuth handler · public client ID · PKCE · packed state
"] Authorize["TB5: External provider domain
Authorization endpoint · user authentication and consent
"] CoreCallback["TB4 / C5: Core callback validation
Validate the packed tenant callback target
"] TenantCallback["TB3 / C5: Tenant callback validation
Validate pending state and PKCE verifier
"] Proxy["TB4 / C6: Core token proxy
Inject the central client secret server-side
"] TokenEndpoint["TB5: External provider domain
Authorization-code or refresh-token exchange
"] Tokens["TB3: Tenant workspace domain
User access token · refresh token · expiry
"] Connect --> Authorize Authorize --> CoreCallback CoreCallback --> TenantCallback TenantCallback --> Proxy Proxy --> TokenEndpoint TokenEndpoint --> Tokens ``` This diagram shows central OAuth used by a tenant endpoint. With the optional global core endpoint, OAuth pending state and user tokens also remain in TB4: there is no packed tenant callback and no TB3 agent allowlist. C5 becomes core-local state and PKCE validation, while C6 remains the only component allowed to use the central client secret. ## Credential and secret boundaries ### Workspace configuration binding Installed app configuration uses a two-hop reference: `app instance config.auth → workspace config.value → workspace secret`. | Security asset | Storage location | Runtime reader | Permitted exposure | | - | - | - | - | | Service credential or API key | Workspace configuration secret | `buildAppAuth` | Provider request only | | User OAuth tokens | User-scoped state in the active endpoint context; optional tenant runtime secure refresh token | `buildAppAuth`, `oauthStatus` | Provider token/API endpoints only | | Central OAuth `client_secret` | Connector core configuration secret | Central token proxy | Provider token endpoint only | | Agent allowlist | Workspace configuration secret | `validateAgent` | Never sent to the provider | The installation automation provisions the secret declarations, preserves the workspace's existing configuration, and writes both bindings idempotently. Secret references resolve only inside the workspace configuration context; they are not portable references to the connector core workspace. ### Two separate secret mechanisms Prisme.ai connectors can use two distinct mechanisms: * **Configuration secrets** back the installed app configuration through `config.value` bindings. * **Runtime secure secrets** support scoped `set`, `get`, and `delete` operations, including per-user refresh-token lookup for trusted scheduled jobs. Runtime secret reads return opaque references. DSUL expressions and Custom Code cannot inspect or decrypt them. A reference must be passed directly into a supported `fetch` field, where the runtime resolves it server-side. > [!WARNING] > > A webhook invoked anonymously by an external provider has no Prisme.ai principal and must not be assumed to read workspace or user secret stores. Push-driven connectors require a separate threat model, authenticated or signed webhook validation where available, and an explicit review of any alternative token storage. They are not covered by the standard interactive or scheduled-call assumptions on this page. ## Configuration application and administrative access The connector configuration UI is a React application delivered by the published app and rendered inline in the workspace's Builder when `config.block` is supported. A direct configuration link remains available as a fallback. The UI calls Prisme.ai APIs with the administrator's existing session, including bearer, CSRF, and cookie protections. Native workspace RBAC remains authoritative for reading or changing connector secrets. The UI does not receive a privileged connector-specific backend key. Typical administrative actions include: * selecting an authentication mode and minimum provider scopes; * testing the provider connection; * connecting or disconnecting delegated OAuth; * selecting authorized agents, persisted immediately on each change; * installing the MCP capability on an agent; * registering the MCP server in the organization capability catalog. Central OAuth credential management is protected server-side by workspace role checks. Catalog publication is different: the connector UI exposes it only to active-organization owners and administrators, but this client-side gate is not a security boundary. The current catalog write endpoint does not enforce the same role restriction server-side. Treat this as a known control gap until the authorization gate is implemented in the capabilities API. ## Authorization layers Connector access is the intersection of several independent controls: | Layer | What it controls | | - | - | | Prisme.ai organization and workspace RBAC | Who can install, configure, or use the app instance | | MCP capability scope | Which identity attributes Agent Creator injects into the call | | Connector agent allowlist | Which agents can use a workspace-specific MCP endpoint | | User OAuth session or service credential | Which external principal the connector acts as | | Provider scopes and roles | Which provider resources and operations that principal can access | | Agent tool permissions | Whether the agent can invoke the MCP automatically or requires user approval | The allowlist supports an explicit `*` option for workspaces that authorize every agent, including calls without an `agent_id`. This is a deliberate administrative choice and should be reviewed like any broad access grant. The agent allowlist gates **tool calls**. **MCP resources** are authorized by the workspace role of the caller instead: a resource read is a read of workspace-held content, so it follows the workspace's own RBAC rather than the list of agents allowed to invoke the connector's tools. For a connector's optional global core endpoint, the workspace-specific agent allowlist is not applicable. The security gate is the end user's OAuth connection and the provider's authorization policy. Security teams should review global and workspace-specific endpoints as different exposure models. ## Data flow and retention considerations A normal tool call processes the following data: 1. The user's request and tool arguments enter Agent Creator. 2. The active endpoint in the tenant workspace or connector core receives the selected tool, business arguments, and execution identity. 3. The connector attaches credentials server-side and sends an HTTPS request to the provider. 4. The provider response passes through the Prisme.ai runtime and is returned to the workflow or model context. Provider credentials do not need to enter the LLM context. Provider data does enter it when required to answer the user's request, so the model provider, Prisme.ai event/log retention, and the third-party system must all be included in the data-processing assessment. The reference MCP path applies three response bounds: `pageSize` and `page_size` are clamped to 100; array responses are capped at 100 items and nested reference-like objects are collapsed to a compact representation; text bodies are truncated at approximately 20,000 characters on a complete line with guidance to use narrower filters. Operations listed by `isBinaryOperation` are rejected before the provider call and must be documented as unavailable inline. These MCP bounds do not apply to App-mode wrappers, which deliberately return raw provider JSON. ## Security review checklist Use this checklist for each connector and environment: * [ ] Identify every inbound endpoint: MCP, OAuth callbacks, configuration webhooks, and provider push webhooks. * [ ] Inventory every outbound host and classify its source as a fixed OAuth endpoint, per-operation registry base, provider-issued instance URL, or administrator-managed base. Verify connector-specific normalization or allowlisting and confirm that MCP arguments cannot override the destination. * [ ] Confirm all network traffic uses HTTPS and that provider certificates are validated. * [ ] Identify whether MCP uses a tenant endpoint, the optional global core endpoint, or both. * [ ] For tenant endpoints, confirm execution stays in the installed workspace and cannot fetch another customer workspace's configuration. * [ ] For global endpoints, confirm the tenant allowlist is not presented as a control and verify the per-user OAuth and provider authorization gates. * [ ] Verify the capability scope is exactly the required identity set and cannot accept a caller-supplied `targetUserId`. * [ ] For tenant endpoints, test allowlisted, non-allowlisted, and missing-`agent_id` calls; review the `*` allow-all option separately. * [ ] Review provider OAuth scopes or service-account permissions for least privilege. * [ ] Confirm refresh-token revocation and self-invalidation behavior after provider `4xx` responses. * [ ] Confirm central OAuth endpoints never return or log the `client_secret`. * [ ] Validate OAuth state, PKCE, and callback target checks, including exact redirect URI matching. * [ ] Review workspace and organization RBAC for connector configuration and catalog publication. * [ ] Inspect live `tools/list` output for valid schemas and an intentionally limited tool surface. * [ ] Verify pagination clamps and `trimToolResponse` against arrays and nested objects. * [ ] Exercise raw text responses and confirm they bypass `formatToolOutput` before line-safe truncation. * [ ] Compare `isBinaryOperation` with the OpenAPI surface and confirm binary rejection occurs before the provider call. * [ ] Verify events and error paths do not contain authorization headers, tokens, private keys, or provider secrets. * [ ] Document the model provider and platform retention controls for provider data returned to an agent. * [ ] Perform a dedicated review for external anonymous webhooks, if the connector exposes any. ## Deployment and verification evidence The connector is maintained as two versioned artifacts: * `workspaces//`: DSUL automations, imports, MCP Core configuration, security rules, and the OpenAPI source of truth; * `pages//`: the configuration UI source and deployable bundle. The app is published before installation so installed instances receive a stable, reviewed snapshot. Frontend deployment updates both bundle pointers and republishes the app before obsolete bundles are removed. For a security handoff, provide at least: * the connector version and published app identifier; * the workspace-specific and optional global MCP endpoint patterns; * allowed outbound hosts, their provenance, and their normalization or validation rules; * supported authentication modes and requested provider scopes; * secret names, scopes, owners, and rotation procedures; * the live `tools/list` schema audit; * MCP handshake evidence, including HTTP `202` for notifications; * successful and denied tool-call evidence; * OAuth connect, refresh, revoke, and reconnect evidence; * relevant audit-event and incident-response procedures. ## Related documentation > [card] [App Store Security](/apps-store/security) > > Review platform-wide controls and integration security practices. > [card] [Capabilities Catalog](/products/ai-governance/capabilities) > > Understand how MCP servers and other capabilities are governed. > [card] [MCP Connections and OAuth](/products/ai-securechat/mcp-connections) > > See how end users connect delegated accounts from Chat. > [card] [Connector Catalog](/apps-store/marketplace/connectors/overview) > > Browse the connectors available in the App Store. # Azure OCR Source: https://docs.prisme.ai/apps-store/marketplace/connectors/azure-ocr Extract text and structured data from images and documents with Azure Computer Vision and Document Intelligence, from Agent Creator agents and Builder workflows ![Azure OCR](https://mintcdn.com/prismeai/Oqq72tWGTtxufvRl/images/connectors/azure-ocr.png?fit=max\&auto=format\&n=Oqq72tWGTtxufvRl\&q=85\&s=f101e205ad0cc393cd92b5c472196eb6) The Azure OCR app exposes two Azure AI services behind a single Prisme.ai connector: **Azure Computer Vision** for lightweight image OCR and visual analysis (Read, Caption, Tags, Objects, People) and **Azure Document Intelligence** for structured extraction of documents (layouts, invoices, receipts, ID documents). It can be consumed two ways: as a remote MCP server that **Agent Creator** agents call through two entity tools (`image`, `document`), or as a Builder app whose instructions you call directly from DSUL. It runs in the **tenant app-instance context**: each workspace pastes its own per-service Azure credentials (endpoint hostname + API key), resolved server-side and never exposed to the agent. Agents are identified by the capability **Scope** `context_id,agent_id,user_id` and gated by a per-workspace authorized-agents allowlist. > [card] Computer Vision > > Fast image OCR and visual analysis through a single synchronous `image` tool (Read, Caption, Tags, Objects, People). > [card] Document Intelligence > > Structured extraction for PDFs and complex layouts via the `document` tool, with prebuilt models (layout, read, invoice, receipt, ID document); async submit-and-poll is handled internally. > [card] LLM-ready output > > Return flattened text or markdown for LLM pipelines, or the structured Azure response with tables, key-value pairs and pages. ## Who is this for? This connector is used by three different roles. Jump to the section that matches yours; each one is self-contained. > [card] Agent builder > > You build agents in **Agent Creator** and want them to extract text from images and documents. → *Agent builder* tab. > [card] Platform admin > > You run the platform and want to know what to set up once for everyone. → *Platform admin setup* accordion below. > [card] Workspace builder > > You write Builder automations (DSUL) that call Azure OCR operations directly. → *Workspace builder* tab. ## Prerequisites * An **Azure subscription** with access to Azure AI services. * A **Computer Vision** (or Multi-Service Cognitive) resource, for the `image` tool. From the Azure portal, under the resource's **Keys and Endpoint** page, note its **endpoint hostname** (e.g. `az-aismsa-xxx.cognitiveservices.azure.com`) and one of its **API keys**. * A **Document Intelligence** resource, for the `document` tool. Same **Keys and Endpoint** page: note the **endpoint hostname** (e.g. `az-di-xxx.cognitiveservices.azure.com`) and an **API key**. * A **publicly accessible URL** for the files you analyze (see below), or base64 content for documents. > [!NOTE] > > You can configure only one of the two services; each tool only requires the service it targets to be configured. The Computer Vision and Document Intelligence keys are independent and not interchangeable. ## The `source` URL must be publicly accessible > [!WARNING] > > Azure downloads the file itself: the connector only forwards the URL. Intranet hosts, `localhost` and anything behind a login or an `Authorization` header fail. Microsoft requires a [publicly accessible image URL](https://learn.microsoft.com/en-us/azure/ai-services/computer-vision/how-to/call-analyze-image-40) for Computer Vision, and for Document Intelligence a blob URL with a **SAS token** on a storage account open to public networks — never one behind a VNet or firewall ([FAQ](https://learn.microsoft.com/en-us/azure/ai-services/document-intelligence/faq)). > > Use a signed URL (SAS, S3 pre-signed) for private files, or `sourceType: base64` on `document`. The `image` tool has **no base64 mode**, so an unreachable image must first be made reachable. > [accordion] Platform admin (Governance): one-time platform setup > > **Goal:** Azure OCR is a **per-workspace** connector: each workspace pastes its own Azure endpoints and API keys in the connector's configuration app (see the *Workspace builder* tab), so there is **no platform-wide credential to provision** and **no central OAuth client**. > > > [!NOTE] > > > > There is no shared Azure credential for this connector. The Computer Vision and Document Intelligence keys always live in the consuming workspace's secrets, written by the connector's configuration app. The platform operator has nothing to register centrally. > > ## Declare the capability in AI Governance (optional) > > If you want agent builders to pick Azure OCR from the capability catalog instead of pasting an MCP endpoint URL by hand, expose it as a reusable **capability** in AI Governance, pointing at the MCP endpoint of the workspace that runs the connector. > > **1. Open AI Governance > Capabilities** > > Create (or edit) the **Azure OCR** capability. > > **2. Point it at the MCP endpoint** > > Set the capability's MCP server URL to the **MCP Endpoint** of the workspace running the connector, and set its **Scope** to: > > ```text theme={null} > context_id,agent_id,user_id > ``` > > The `agent_id` in the scope is what lets the connector identify and authorize the calling agent. > > **3. Make it available to agent builders** > > Once created, the capability appears in the capability picker for agent builders in your organization. Access to the catalog follows your organization's existing roles; there is **no per-capability role grant** for this tenant-context connector. > > > [!NOTE] > > > > The connector's configuration app also offers a one-click **Add to catalog** button (owner / admin only) that publishes the capability to the organization-wide Capabilities catalog for you, the easiest way to expose Azure OCR to agent builders without hand-editing Governance. > > > [!WARNING] > > > > Declaring the capability makes the connector **available** to agent builders; it does not authorize a specific agent and does not provision any Azure credential. Per-agent gating remains the config-app **authorized-agents allowlist**, and the Computer Vision / Document Intelligence keys still live in the workspace running the connector. There is **no OAuth auth-config JSON** to attach here: authentication is a server-side Azure API key, not a per-user OAuth flow. *** > [tab] Agent builder (Agent Creator) > > ## Agent builder > > **Goal:** let an agent you build in Agent Creator extract text and structured data from images and documents through the `image` and `document` MCP tools. > > > [!NOTE] > > > > Before an agent can call the connector, a *Workspace builder* must have installed and configured the Azure OCR app in a workspace (see the *Workspace builder* tab), or a *Platform admin* must have published an Azure OCR capability in AI Governance (see the *Platform admin setup* accordion above). > > This connector runs in the **tenant app-instance context**: your agent is identified by the `agent_id` that Agent Creator injects through the capability *Scope*, and that agent must appear in the connector's **authorized-agents allowlist** (managed in the configuration app). The Azure credentials themselves are resolved server-side and never exposed to the agent. > > **1. Install and configure the connector in your workspace** > > Follow the *Workspace builder* tab: install **Azure OCR** in your workspace, open its **Configuration app**, and paste the Azure endpoint hostname + API key for the service(s) you use (Computer Vision, Document Intelligence, or both). > > **2. Allowlist your agent** > > In that workspace's config app, open **Authorized agents** and tick your agent (the **Install capability** button does this for you), or enable **Allow all agents**. > > **3. Add the MCP capability to your agent** > > In your agent, add a capability pointing at **your workspace's MCP Endpoint** URL, and set its **Scope** to: > > ```text theme={null} > context_id,agent_id,user_id > ``` > > The `agent_id` is what lets the connector identify and authorize your agent; without it, every call is rejected with an explicit "agent could not be identified" message. > > **4. Brief the agent** > > Tell the agent the tools exist and when to use each (see *Brief the agent in its system prompt* below). > > > [!NOTE] > > > > **Easiest path: Add to catalog.** Instead of wiring the capability by hand, a workspace owner can click **Add to catalog** in the connector's configuration app to publish Azure OCR to the organization-wide Capabilities catalog (see the *Platform admin setup* accordion). Agent builders then enable it from the catalog with the endpoint and Scope already wired. > > ## Brief the agent in its system prompt > > Azure OCR exposes two tools with distinct strengths. A short brief avoids the agent guessing: > > ```text theme={null} > You have access to the Azure OCR MCP server (tools: image, document). Each tool takes an `action: analyze` argument. > - image: for a single image (photo, screenshot, receipt picture). Pass a PUBLICLY ACCESSIBLE image URL as `source` — Azure downloads it itself, so intranet or login-protected URLs fail. Default feature is Read (OCR); add Caption, Tags, Objects or People only when the user asks for visual analysis. Synchronous. > - document: for PDFs and multi-page or structured documents. Pass a publicly accessible document URL (or base64 with sourceType: base64 when the file is private) as `source`, and pick the model by intent: prebuilt-read for plain text, prebuilt-layout for tables and structure, prebuilt-invoice / prebuilt-receipt / prebuilt-idDocument for those specific document types. > Prefer outputContentFormat: markdown when feeding the result back into your own reasoning. Always pass a public URL when you have one; base64 inflates the request. Never retry an unreachable URL — ask for a signed link, or fall back to document + base64. > ``` > > > [!NOTE] > > > > **Legacy AI Knowledge agents** (no native MCP picker): add the connector under **Advanced > Tools > MCP** and paste the **MCP Endpoint** URL. The agent still has to be allowlisted in the config app and its identity propagated so the connector can read its `agent_id`. > > ## Available Tools > > Each tool takes an `action` argument (currently `analyze`) plus per-action parameters. > > | Tool | Description | > | - | - | > | `image` | Azure Computer Vision: image OCR and visual analysis. `action: analyze` sends a **publicly accessible** image URL and returns the extracted read text, captions, tags, objects and people. Synchronous. | > | `document` | Azure Document Intelligence: structured document extraction. `action: analyze` submits a document (**publicly accessible** URL, or base64) to a prebuilt model, polls for completion, and returns the analysis (content, pages, tables, key-value pairs, paragraphs). Asynchronous. | > > ## Output Formats > > Both tools accept an `outputFormat` argument that controls the MCP response shape: > > * **`both`** (default): the structured payload, with its JSON also rendered as text. > * **`verbose`**: a human-readable text view, optimized for LLM consumption. > * **`structured`**: concise machine-readable JSON in `structuredContent`. > > The underlying analysis is unchanged by `outputFormat`; it only wraps the result: > > * **`image`** returns the Azure Image Analysis body (`readResult`, `captionResult`, `tagsResult`, `objectsResult`, `peopleResult`, depending on the requested `features`). > * **`document`** returns a simplified `analyzeResult` (flattened `content` in text or markdown, plus `pages`, `tables`, `keyValuePairs`, `paragraphs`). > > ## Tool Details > > ### image: analyze > > Synchronous OCR and visual analysis of a single image via Azure Computer Vision (Image Analysis API `2024-02-01`). > > ```json theme={null} > { > "name": "image", > "arguments": { > "action": "analyze", > "source": "https://example.com/receipt.jpg", > "features": "Read,Caption,Tags", > "language": "fr" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | `analyze`. | > | `source` | Yes | **Publicly accessible** URL of the image to analyze. No base64 alternative on this tool. | > | `features` | No | Comma-separated Computer Vision features (default `Read`). Accepted: `Read`, `Caption`, `Tags`, `Objects`, `People`. | > | `language` | No | Language hint (default `en`, e.g. `fr`). | > | `outputFormat` | No | `both` (default), `verbose`, or `structured`. | > > ### document: analyze > > Submit a document to Azure Document Intelligence, poll for completion (2s interval, 60s timeout), and return the extraction. Uses Document Intelligence API `2024-11-30`. > > ```json theme={null} > { > "name": "document", > "arguments": { > "action": "analyze", > "source": "https://example.com/invoice.pdf", > "model": "prebuilt-invoice", > "locale": "fr-FR", > "outputContentFormat": "markdown" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | `analyze`. | > | `source` | Yes | **Publicly accessible** document URL, or base64 content when `sourceType` is `base64`. | > | `sourceType` | No | `url` (default) or `base64`. Use `base64` whenever the document is not reachable from Azure's network. | > | `model` | No | Document Intelligence model (default `prebuilt-layout`); see model table below. | > | `pages` | No | Pages to analyze, e.g. `1-3,5,7-9`. | > | `locale` | No | Locale hint, e.g. `fr-FR`. | > | `outputContentFormat` | No | `text` (default) or `markdown`. | > | `outputFormat` | No | `both` (default), `verbose`, or `structured`. | > > Available **prebuilt models**: > > | Model | Use case | > | - | - | > | `prebuilt-read` | Pure text extraction (fastest, lightweight) | > | `prebuilt-layout` | Text + tables + structure (default) | > | `prebuilt-invoice` | Structured invoice fields | > | `prebuilt-receipt` | Structured receipt fields | > | `prebuilt-idDocument` | Passports, IDs, driver's licences | > | `prebuilt-businessCard` | Business card fields | > [tab] Workspace builder (DSUL) > > ## Workspace builder > > **Goal:** install the connector in a workspace, configure the per-service Azure credentials and the agent allowlist through its configuration app, and call its instructions from your automations. > > ## Installation > > 1. Go to **Apps** in your workspace > 2. Search for **Azure OCR** and install it > 3. Open the **Configuration app** (the link auto-populated on install) to paste the Azure endpoint hostname + API key for the service(s) you use, and to allow the agents that may call the connector > > ## Configuration > > | Field | Description | > | - | - | > | **Configuration app** | Auto-populated on install; open this link to set the per-service Azure credentials (Computer Vision and/or Document Intelligence endpoint + API key) and manage the authorized-agents allowlist. | > > The configuration app drives everything; the app instance itself has no per-field credential form. Credentials are stored as a workspace secret (`azureOcrAuth`) shaped as `{ computervision: { endpoint, apiKey }, documentIntelligence: { endpoint, apiKey } }`, and the allowlist as a second secret (`azureOcrAuthorizedAgents`). Both are resolved server-side at call time. > > This connector uses a single auth mode: > > | Auth mode | What you provide | Best for | > | - | - | - | > | **Static API key (per service)** | The Azure endpoint hostname + an API key for each service you use (Computer Vision, Document Intelligence) | All workspaces; each pastes its own Azure keys; no platform-level setup | > > > [!NOTE] > > > > Endpoints are stored as **hostnames only**: the connector automatically strips `https://` and trailing slashes, so both `https://xxx.cognitiveservices.azure.com/` and `xxx.cognitiveservices.azure.com` work. The agent allowlist (**Authorized agents**) gates which Agent Creator agents may call the MCP endpoint; see the *Agent builder* tab. > > ## Available Instructions > > Every instruction resolves the Azure endpoint and API key from the workspace configuration. > > ### Computer Vision > > | Instruction | Description | Returns | > | - | - | - | > | `analyzeImage` | Synchronous OCR and visual analysis of an image by **publicly accessible** URL (`source`). `features` selects analysis (default `Read`; also `Caption`, `Tags`, `Objects`, `People`); `language` is a hint. | Raw Azure Image Analysis body: `{ readResult, captionResult, tagsResult, objectsResult, peopleResult }` (subset per requested features) | > > ### Document Intelligence > > | Instruction | Description | Returns | > | - | - | - | > | `analyzeDocument` | Submit a document (**publicly accessible** `source` URL, or base64 when `sourceType: base64`) to a prebuilt `model`, poll to completion, and return the extraction. `pages`, `locale`, `outputContentFormat` (`text`/`markdown`) and `outputFormat` (`simple`/`raw`) tune the output. | `simple`: flattened text/markdown + key fields. `raw`: full Azure `analyzeResult` `{ pages, tables, keyValuePairs, paragraphs, content }` | > > > [!NOTE] > > > > `Returns` shows the shape of the operation output. These DSUL instructions return the provider body directly (or, on failure, a structured error payload; see *Error Handling*). The MCP `image` / `document` tools wrap the same operations in an MCP tool-result envelope. > > ## DSUL Examples > > Analyze an image (OCR only): > > ```yaml theme={null} > - Azure OCR.analyzeImage: > source: '{{photo_url}}' > features: Read > language: fr > output: ocr > ``` > > Extract structured invoice data from a PDF by URL: > > ```yaml theme={null} > - Azure OCR.analyzeDocument: > source: https://example.com/invoice.pdf > model: prebuilt-invoice > locale: fr-FR > outputContentFormat: markdown > output: invoice > ``` > > Analyze a base64 document with a page range — the fallback when the file has no public URL: > > ```yaml theme={null} > - Azure OCR.analyzeDocument: > source: '{{pdf_base64}}' > sourceType: base64 > model: prebuilt-layout > pages: 1-3 > output: layout > ``` > > Run KYC-style extraction on a passport scan, then branch on the result: > > ```yaml theme={null} > - Azure OCR.analyzeDocument: > source: '{{scan_base64}}' > sourceType: base64 > model: prebuilt-idDocument > output: id > - conditions: > '{{id.error}}': > - emit: > event: id.ocr.failed > payload: '{{id}}' > default: > - emit: > event: id.parsed > payload: '{{id}}' > ``` *** ## Error Handling Both operations return a structured error payload (and emit an `error` event) instead of raising. The MCP `image` / `document` tools surface the same failure as an `isError` tool result. The payload shape is: ```json theme={null} { "error": "ConfigurationError | ValidationError | NetworkError | AzureError | Unauthorized | Forbidden | NotFound | RateLimited | ServerError | ProcessingFailed | Timeout", "message": "Human-readable explanation", "details": { "service": "computervision | documentIntelligence", "automation": "analyzeImage | analyzeDocument", "status": 401, "body": {} } } ``` | Error | Typical cause | | - | - | | `ConfigurationError` | The targeted service has no endpoint or API key in the connector config | | `ValidationError` | `source` argument is empty | | `AzureError` | Azure rejected the request (typically HTTP 400); often a `source` URL Azure could not download | | `NetworkError` | Endpoint unreachable; check hostname format (no scheme, no path) | | `Unauthorized` | Invalid or revoked API key (HTTP 401) | | `Forbidden` | The resource exists but the key lacks access, or the API is not enabled (HTTP 403) | | `NotFound` | `prebuilt-` does not exist, or a wrong endpoint hostname (HTTP 404) | | `RateLimited` | Azure throttling; retry with back-off (HTTP 429) | | `ServerError` | Azure 5xx | | `ProcessingFailed` | Document Intelligence could not process the document (corrupted, password-protected, unsupported format) | | `Timeout` | Document Intelligence polling exceeded 60s; try `prebuilt-read` or fewer pages | ### Common Issues * **"This agent is not authorized to use this connector"**: The calling agent is not in the allowlist. Open the configuration app → **Authorized agents** → tick this agent (or enable **Allow all agents**) and Save. The **Install capability** button does this for you. * **"The calling agent could not be identified"**: The MCP capability *Scope* does not declare `agent_id`, so Agent Creator never injects the agent identity. Set the Scope to `context_id,agent_id,user_id` on the capability, then allow the agent in the config app. * **`ConfigurationError` ("… is not configured")**: The targeted service has no endpoint or API key in the connector configuration. Each workspace must paste its own Azure endpoint and key in the config app; there is no platform-level credential to fall back on. Configure only the service(s) you call. * **`Unauthorized` (401, invalid key)**: Azure rejected the key. Regenerate or copy a current key from the resource's **Keys and Endpoint** page, and confirm it matches the service you are calling (Computer Vision keys do not work on Document Intelligence and vice versa). * **`Forbidden` (403, API not enabled)**: The key is valid but the resource does not expose the requested API. Confirm the resource type (a Document Intelligence key cannot serve Image Analysis) and that the feature is enabled on the Azure resource. * **`NetworkError` / `NotFound` (404, bad endpoint)**: Almost always a malformed endpoint. Store the **hostname only** (no `https://`, no path); the connector strips a leading scheme and trailing slash but cannot recover a wrong host. * **Azure cannot download the `source` URL**: a URL that works in your browser is not necessarily one Azure can reach. Symptom: a 4xx in `details.body`, e.g. `InvalidRequest - Image URL is badly formatted or not accessible`. Check it needs no authentication, is not on an intranet, and — for blob storage — carries an unexpired SAS token on a publicly reachable account. For documents, `sourceType: base64` sidesteps it. * **`Timeout` on `document`**: Document Intelligence is asynchronous: the connector submits the document, then polls for up to 60s. Long or heavy PDFs can exceed this limit. Reduce `pages`, switch to the lighter `prebuilt-read` model, or split the document upstream. * **Service-specific gotcha**: `image` is synchronous and `document` is an async submit-and-poll cycle handled internally; both return their error payload instead of raising. After a DSUL call, always branch on `{{result.error}}`; a failed extraction is a normal value, not an exception, so a missing check silently passes the error object downstream. ## External Resources > [card] [Azure Computer Vision](https://learn.microsoft.com/en-us/azure/ai-services/computer-vision/overview-image-analysis) > > Image Analysis 4.0 reference, prebuilt features and supported languages. > [card] [Azure Document Intelligence](https://learn.microsoft.com/en-us/azure/ai-services/document-intelligence/overview) > > Document Intelligence overview, prebuilt models and the analyze API. > [card] [Image URL requirements](https://learn.microsoft.com/en-us/azure/ai-services/computer-vision/how-to/call-analyze-image-40) > > Microsoft's Analyze API guide: the image URL must be publicly accessible. > [card] [Tool Agents](/products/agent-factory/capabilities) > > How Agent Creator agents consume MCP tools and capabilities. # Bing Search Source: https://docs.prisme.ai/apps-store/marketplace/connectors/bing-search Search the web from AI agents through Bing Grounding in Azure AI Foundry ![Bing Search](https://mintcdn.com/prismeai/Oqq72tWGTtxufvRl/images/connectors/bing-search.svg?fit=max\&auto=format\&n=Oqq72tWGTtxufvRl\&q=85\&s=feb658a936c9acc1d9c27bdcc317e226) The Bing Search connector exposes web search as a remote MCP server for AI agents. It uses **Bing Grounding** through **Azure AI Foundry** and returns sourced search results in the standard MCP `content` response format. > [card] Current Web Search > > Retrieve recent information from the web with source URLs > [card] Azure Foundry > > Uses Azure AI Foundry Assistants with a configured Bing Grounding connection > [card] MCP Native > > Exposes a JSON-RPC MCP endpoint that Knowledges agents can call directly ## Prerequisites * An **Azure subscription** with access to Azure AI Foundry * An **Azure AI Foundry project** with a Bing Grounding connection * An Azure AD application using the **client credentials** flow * Workspace secrets for the Azure tenant, client ID, client secret, and token scope > [!NOTE] > > This connector is designed for agent web-search scenarios and exposes the > `bing_search` MCP tool. ## Instance Configuration The **Bing Web Search (Azure Foundry)** connector is available in your Prisme.ai instance. Before using it from an agent: 1. Open the connector configuration 2. Verify the Azure Foundry project settings in the connector configuration 3. Set the required Azure credentials in workspace secrets ## Azure App Registration The connector authenticates to Azure AI Foundry with Microsoft Entra ID client credentials. You can create a dedicated app registration or reuse an existing service principal. 1. In Microsoft Entra ID, create an **App registration** 2. Copy the **Directory (tenant) ID** and **Application (client) ID** 3. Create a **client secret** in **Certificates & secrets** 4. Assign the service principal the **Azure AI User** role on the Azure AI Foundry resource or project used by the connector 5. Make sure the Azure AI Foundry project has access to the Bing Grounding connection configured below > [!NOTE] > > Unlike Microsoft Graph connectors such as Outlook, SharePoint, or Excel, this > connector does not require Graph API permissions or Graph admin consent. Access > is controlled through Azure AI Foundry RBAC and the configured Bing Grounding > connection. ## Connector Configuration Set these values in the connector configuration. They define which Azure Foundry project, model, and Bing Grounding connection the connector uses. | Field | Description | | - | - | | **Provider** | `bing` | | **Foundry Base URL** | Azure AI Foundry service URL, for example `https://.services.ai.azure.com` | | **Foundry Project** | Azure AI Foundry project name | | **Foundry API Version** | Azure AI Foundry Assistants API version | | **Foundry Model** | Model used by the temporary search assistant | | **Bing Connection ID** | Full Azure resource ID of the Bing Grounding connection | Default search options can also be configured: | Field | Default | Description | | - | - | - | | **Default Count** | `5` | Number of search results when `num_results` is omitted | | **Default Market** | `en-US` | Market code when `market` is omitted | | **Default Freshness** | `Week` | Recency filter when `freshness` is omitted | | **Token Cache TTL** | `3300` | Azure access token cache duration in seconds | ## Workspace Secrets Set these values in the workspace secrets panel. They are referenced by the connector configuration and are used to request Azure AD access tokens with the client credentials flow. | Secret | Description | | - | - | | `AZURE_TENANT_ID` | Azure AD directory tenant ID | | `AZURE_CLIENT_ID` | Azure AD application client ID | | `AZURE_CLIENT_SECRET` | Azure AD application client secret | | `AZURE_TOKEN_SCOPE` | OAuth scope used when requesting the Azure access token, usually `https://ai.azure.com/.default` | > [!NOTE] > > Keep Azure credentials in workspace secrets. Do not paste client secrets into > the visible connector configuration fields. ## MCP Setup 1. Open your **Knowledges project** 2. Go to **Advanced > Tools** 3. Click **Add** and select the **MCP** tab 4. Paste the MCP endpoint URL from the connector configuration 5. Save the tool and let the agent discover the `bing_search` tool ## Available Tool | Tool | Description | | - | - | | `bing_search` | Search the web through Bing Grounding and return sourced results | ### Tool Arguments | Argument | Type | Required | Description | | - | - | - | - | | `query` | string | Yes | Search query | | `num_results` | number | No | Number of results to request, from 1 to 10 | | `market` | string | No | Market code, for example `en-US` or `fr-FR` | | `freshness` | string | No | Recency filter: `Day`, `Week`, or `Month` | ## MCP Examples ### Search with Defaults ```json theme={null} { "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "bing_search", "arguments": { "query": "latest Azure AI Foundry Bing Grounding documentation" } } } ``` ### Search a French Market with Fresh Results ```json theme={null} { "jsonrpc": "2.0", "id": 2, "method": "tools/call", "params": { "name": "bing_search", "arguments": { "query": "actualites intelligence artificielle entreprise", "num_results": 5, "market": "fr-FR", "freshness": "Day" } } } ``` ## Response Format Successful calls return an MCP tool result: ```json theme={null} { "content": [ { "type": "text", "text": "Search results with titles, URLs, snippets, and source annotations" } ], "isError": false } ``` If the query is missing or Azure authentication fails, the connector returns `isError: true` with a text error message. ## Troubleshooting **`Error: query parameter is required`** - The MCP call did not include `params.arguments.query`. **`Authentication error`** - Check the Azure tenant ID, client ID, client secret, and token scope secrets in the connector workspace. **`Failed to create assistant`** - Verify the Foundry base URL, project name, API version, model, and Bing Grounding connection ID. **`Search did not complete`** - The Azure Foundry assistant run did not finish before the connector timeout. Retry with a narrower query or fewer requested results. ## Related > [card] [Connectors Overview](/apps-store/marketplace/connectors) > > Compare App and MCP connector usage modes > [card] [Knowledges Tools](/products/ai-knowledge/connectors) > > Add MCP tools to an Knowledges agent # Brave Search Source: https://docs.prisme.ai/apps-store/marketplace/connectors/brave-search Web search and LLM-ready grounding context for AI agents through the Brave Search API ![Brave Search](https://mintcdn.com/prismeai/XFeloI0KUwlSVgSt/images/connectors/brave-search.svg?fit=max\&auto=format\&n=XFeloI0KUwlSVgSt\&q=85\&s=8b424a2ea463d8be193152b10f4ea17e) The Brave Search connector exposes the **Brave Search API** as a remote MCP server for AI agents. It bundles two complementary tools (`brave_search` for raw web results and `brave_llm_context` for pre-structured grounding snippets) and returns them in the standard MCP `content` response format. > [card] Current Web Search > > Retrieve recent results from the open web with titles, URLs and snippets > [card] LLM Grounding > > Get token-budgeted, pre-formatted context ready to inject into an agent prompt > [card] Brave Goggles > > Apply site whitelist / re-ranking rules per call or workspace-wide > [card] MCP Native > > Exposes a JSON-RPC MCP endpoint that Agent Creator agents can call directly ## Prerequisites * A **Brave Search API account** with an active subscription token ([api-dashboard.search.brave.com](https://api-dashboard.search.brave.com/)) * A plan that exposes both `/res/v1/web/search` **and** `/res/v1/llm/context` (the **Data for AI** plan is required for the LLM Context endpoint) * Your Brave subscription token > [!NOTE] > > This connector targets agent web-search scenarios and exposes two MCP tools: > `brave_search` and `brave_llm_context`. ## Instance Configuration The **Brave Search** connector is available in your Prisme.ai instance. Before using it from an agent: 1. Open the connector configuration 2. Set the Brave API key in workspace secrets 3. **Add your Brave Goggle in the `Default Goggles` field** (see the "Brave Goggles" section below); this is required if you want every Brave Search call to be scoped to your whitelist 4. Adjust the other default search options if needed (count, market, token budget…) ## Connector Configuration Set these values in the connector configuration. They define the provider and the default search options used when the agent omits them. | Field | Default | Description | | - | - | - | | **Provider** | `brave` | Search provider identifier | | **Default Count** | `5` | Number of web search results when `num_results` is omitted (`brave_search`) | | **Default Market** | `US` | Country code when `market` is omitted (`brave_search`) | | **Default LLM Context Count** | `20` | Number of grounding entries when `count` is omitted (`brave_llm_context`) | | **Default LLM Context Market** | `us` | Country code when `country` is omitted (`brave_llm_context`) | | **Default Max Tokens** | `8192` | Token budget for the LLM context response when `max_tokens` is omitted | | **Default Context Threshold Mode** | `balanced` | Relevance filter for `brave_llm_context` (`strict`, `balanced`, `lenient`, `disabled`) | | **Default Goggles** | *(empty)* | **Primary place to configure a Brave Goggle.** Paste a raw Goggle definition or a hosted URL; it is applied to every call from this workspace. Leave empty only if you intentionally want unfiltered Brave Search. | The **Default Goggles** field is where you configure the Goggle that applies to every Brave Search call from this workspace. Most deployments will set this once at install time and leave the `goggles` tool argument unused. ## Workspace Secrets Set this value in the workspace secrets panel. It is referenced by the connector configuration and sent as the `x-subscription-token` header on every call to the Brave API. | Secret | Description | | - | - | | `BRAVE_API_KEY` | Brave Search API subscription token | > [!NOTE] > > Keep the Brave API key in workspace secrets. Do not paste the token into the > visible connector configuration fields. ## Brave Goggles A **Brave Goggle** is a small text file that re-ranks or filters Brave Search results: whitelist a set of domains, boost some sites, discard the rest. The connector forwards any goggle you provide on every call to `brave_search` and `brave_llm_context`. Reference syntax: [github.com/brave/goggles-quickstart](https://github.com/brave/goggles-quickstart). ### Where to configure **Goggles are configured in the workspace connector configuration**, in the `Default Goggles` field. This is the standard way to apply a Goggle to every Brave Search call from agents in this workspace. Once set, agents don't need to be aware of the goggle; it is applied transparently. A per-call `goggles` MCP argument also exists, but it is an **advanced override** for special cases (A/B testing, dynamic goggles, multi-tenant flows). Day-to-day deployments only need the workspace config. ### Format accepted by `Default Goggles` * **Hosted URL**: point to a publicly reachable goggle file (e.g. a GitHub raw URL). * **Inline raw definition**: paste the goggle content as a multi-line string. ### Syntax rules Every line that targets a site must include an action: `$discard`, `$boost,site=...`, or `$downrank,site=...`. A bare `$site=domain.com` line is **not** valid Goggles syntax and Brave will reject the call. A typical whitelist pattern is `$discard` (drop everything not boosted) followed by one `$boost,site=...` per allowed domain: ```text theme={null} ! name: French finance whitelist ! description: Restrict and boost results to French finance sources ! public: false ! author: Prisme.ai $discard $boost,site=lesechos.fr $boost,site=latribune.fr $boost,site=banque-france.fr ``` ### Precedence By default every Brave Search call uses the workspace `Default Goggles`. The `goggles` MCP tool argument is an **override**: when provided, it fully replaces the workspace default for that call (no merge). Leave both empty only to run a plain, unfiltered Brave Search. > [!NOTE] > > To keep large inline goggle definitions safe from URL length limits, the > connector calls Brave with `POST` + JSON body (no GET query string). This is > transparent to agents; the MCP request/response format does not change. ## Plug into an Agent Creator capability Agents consume MCP servers directly through **Agent Creator** capabilities. This is the preferred way to expose Brave Search to an agent. **1. Install the Brave Search connector** From the Prisme.ai console, open the workspace that will host the connector and install **Brave Search** from the Imports panel. **2. Configure the connector** Set `BRAVE_API_KEY` in workspace secrets, then open the connector configuration and fill in the defaults you need (most importantly **Default Goggles**; see the "Brave Goggles" section above). **3. Copy the MCP endpoint** Still on the connector configuration page, copy the value of **MCP Endpoint**. **4. Open Agent Creator** Switch to **Agent Creator** and open the agent you want to extend. **5. Add a capability** Add a new capability to the agent: * **If a dedicated Brave Search capability exists**: select it. The server URL is already wired; the connector resolves the Brave API key server-side from the workspace configuration. * **Otherwise**: select the generic **`custom_mcp`** capability and paste the **MCP Endpoint** into the *Server URL* field. The endpoint is authenticated with the caller's Prisme.ai principal (user JWT, workspace JWT, or organization API key), so no extra header is required. **6. Save** The agent now has access to `brave_search` and `brave_llm_context`. **7. Brief the agent in its system prompt** Wiring the capability is not enough; the agent also needs to know the MCP exists and when to reach for it. Add a short paragraph to the agent's system prompt. Copy-pasteable starter: ```text theme={null} You have access to the Brave Search MCP server. Use it whenever the user asks for information that requires fresh, public web sources: news, regulatory updates, market data, factual lookups, competitor research. Call `brave_search` when you need raw web results (titles, URLs, snippets) and `brave_llm_context` when you only need pre-formatted grounding snippets to cite in your answer. Prefer recent results (`freshness: Day` / `pd` for breaking news) and a market matching the user's language. Always cite the source URLs returned by the tool. ``` Refine the trigger keywords (regulatory areas, market codes, language) so the agent reliably picks up the right intent in your context. ## Available Tools | Tool | Description | | - | - | | `brave_search` | Search the web through Brave Search and return raw results (titles, URLs, snippets, infoboxes) | | `brave_llm_context` | Retrieve LLM-optimized grounding context as pre-formatted Markdown snippets with sources | ### Choosing Between the Two Tools | Tool | Brave endpoint | Response shape | When to use | | - | - | - | - | | `brave_search` | `/res/v1/web/search` | Stringified Brave JSON | The agent needs the full response (multiple result types, ranking signals, infobox) | | `brave_llm_context` | `/res/v1/llm/context` | Markdown text (`## title` / `Source: url` / snippets) | The agent only needs factual grounding ready to concatenate into its prompt | ### `brave_search` Arguments | Argument | Type | Required | Description | | - | - | - | - | | `query` | string | Yes | Search query | | `num_results` | number | No | Number of results to request, from 1 to 20 | | `market` | string | No | Market code, for example `en-US` or `fr-FR` (the connector maps it to a 2-letter country code) | | `freshness` | string | No | Recency filter: `Day`, `Week`, or `Month` | | `goggles` | string | No | Advanced per-call override of the workspace `Default Goggles`. URL of a hosted Brave Goggle **or** raw inline goggle definition. Most deployments configure goggles once at the workspace level; see the "Brave Goggles" section. | ### `brave_llm_context` Arguments | Argument | Type | Required | Description | | - | - | - | - | | `query` | string | Yes | Search query (1-400 characters, max 50 words) | | `count` | number | No | Number of grounding entries to request, from 1 to 50 (default 20) | | `country` | string | No | 2-letter country code, for example `us` or `fr` | | `search_lang` | string | No | Search language, for example `en` or `fr` | | `freshness` | string | No | Recency filter: `pd` (past day), `pw` (past week), `pm` (past month), `py` (past year) | | `max_tokens` | number | No | Maximum total tokens in the response, from 1024 to 32768 (default 8192) | | `context_threshold_mode` | string | No | Relevance threshold: `strict`, `balanced`, `lenient`, or `disabled` | | `goggles` | string | No | Advanced per-call override of the workspace `Default Goggles`. URL of a hosted Brave Goggle **or** raw inline goggle definition. Most deployments configure goggles once at the workspace level; see the "Brave Goggles" section. | ## MCP Examples ### Web Search with Defaults ```json theme={null} { "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "brave_search", "arguments": { "query": "latest Brave Search API documentation" } } } ``` ### Web Search on a French Market with Fresh Results ```json theme={null} { "jsonrpc": "2.0", "id": 2, "method": "tools/call", "params": { "name": "brave_search", "arguments": { "query": "actualites intelligence artificielle entreprise", "num_results": 5, "market": "fr-FR", "freshness": "Day" } } } ``` ### LLM Grounding Context with a Token Budget ```json theme={null} { "jsonrpc": "2.0", "id": 3, "method": "tools/call", "params": { "name": "brave_llm_context", "arguments": { "query": "European AI Act enforcement timeline", "count": 15, "country": "fr", "search_lang": "en", "freshness": "pm", "max_tokens": 4096, "context_threshold_mode": "strict" } } } ``` ### Web Search with a Per-Call Goggle Override (Advanced) Most workspaces will configure the Goggle once in the connector configuration (`Default Goggles`) and never pass `goggles` in the MCP call. The example below shows the advanced per-call override path. ```json theme={null} { "jsonrpc": "2.0", "id": 4, "method": "tools/call", "params": { "name": "brave_search", "arguments": { "query": "réglementation DORA banque", "num_results": 10, "market": "fr-FR", "goggles": "! name: FR finance whitelist\n! public: false\n$discard\n\n$boost,site=acpr.banque-france.fr\n$boost,site=banque-france.fr\n$boost,site=lesechos.fr" } } } ``` ## Response Format ### `brave_search` Successful calls return the Brave JSON payload serialized as text: ```json theme={null} { "content": [ { "type": "text", "text": "{ \"type\": \"search\", \"web\": { \"results\": [ ... ] }, ... }" } ], "isError": false } ``` ### `brave_llm_context` Successful calls return Markdown sections, one per grounding entry, ready to inject into an agent prompt: ```json theme={null} { "content": [ { "type": "text", "text": "## Result title\nSource: https://example.com/article\nFirst snippet…\nSecond snippet…\n\n## Other result\nSource: https://example.org/post\n…\n" } ], "isError": false } ``` If the Brave API rejects the call or the query is missing, the connector returns `isError: true` with a text error message. ## Troubleshooting **`Error: query parameter is required`**: The MCP call did not include `params.arguments.query`. **`Brave Search API error:
`**: Returned by either tool when Brave rejects the call. Common causes: invalid or expired `BRAVE_API_KEY`, quota exceeded, plan that does not include the requested endpoint, or an unsupported parameter value. **`No grounding context found for this query.`**: `brave_llm_context` did not find any entry above the relevance threshold. Try a more permissive `context_threshold_mode` (for example `lenient`) or broaden the query. **`Brave Search API error: `**: The Goggle definition was rejected by Brave. Common causes: a `$site=...` line with no action (use `$boost,site=...` or `$discard` + `$boost,site=...`), an unreachable hosted URL, or unescaped characters. See [github.com/brave/goggles-quickstart](https://github.com/brave/goggles-quickstart) for the syntax reference. **`Authentication required`** (HTTP 401, JSON-RPC error `-32000`): The MCP endpoint requires an authenticated principal. Call it with a user JWT, a workspace JWT, or an organization API key. ## Related > [card] [Connectors Overview](/apps-store/marketplace/connectors) > > Compare App and MCP connector usage modes > [card] [Tool Agents](/products/agent-factory/capabilities) > > Plug MCP servers into Knowledges agents # Confluence Source: https://docs.prisme.ai/apps-store/marketplace/connectors/confluence Read and write Atlassian Confluence Cloud and Data Center pages, spaces, comments, labels and attachments, with CQL search and page-hierarchy navigation, from Agent Creator agents and Builder workflows, with per-user Atlassian OAuth ![Confluence](https://mintcdn.com/prismeai/dzAaoAETtV2DGkv4/images/connectors/confluence.svg?fit=max\&auto=format\&n=dzAaoAETtV2DGkv4\&q=85\&s=91fc5fc6168dfce17568f15a98249194) The Confluence app provides read/write access to [Atlassian Confluence Cloud](https://www.atlassian.com/software/confluence) through the official REST API v2 (plus the v1 CQL search). It can be consumed two ways: as a remote MCP server that **Agent Creator** agents call as tools, or as a Builder app whose instructions you call directly from DSUL. The MCP surface groups every operation into **eight entity tools** (`pages`, `spaces`, `search`, `content`, `comments`, `labels`, `attachments`, `versions`), each driven by an `action` argument, and runs in the **tenant app-instance context** (it resolves the installing workspace's own credentials and gates which agents may call it). Authentication is per-user and supports several modes: * **Per-user OAuth2 with central client** (`oauthCentral`, recommended): one Atlassian 3LO OAuth app is registered once by the platform maintainer; every end user signs in with their own Atlassian account. Nothing to register per tenant: each workspace just installs the app and clicks *Connect*. * **Per-user OAuth2 with tenant client** (`oauth`): paste your own Atlassian OAuth client ID/secret in the connector config app. Each user signs in with their own account against your client (PKCE authorization-code, 3LO). * **API token (HTTP Basic)** (`apiToken`): an Atlassian account email + API token + your `*.atlassian.net` site. A single shared service identity, no interactive sign-in. * **Direct access token** (`accessToken`): a caller-managed Atlassian access token, used as-is with no exchange. **Confluence Data Center** is supported too: set the deployment to *Atlassian Data Center*, enter your instance URL, and authenticate with a service account's Personal Access Token (`accessToken`) or with each user's own (`personalAccessToken`). The connector can also feed a knowledge base from your Confluence spaces; the step-by-step setup, Cloud and Data Center, is in [Knowledges → Confluence](/products/ai-knowledge/confluence). > [card] Pages & spaces > > List, read (with body), create, update and delete wiki pages; browse spaces and read page bodies in storage or ADF format. > [card] Search & hierarchy > > CQL search across the wiki, plus children / ancestors / descendants navigation of the page tree, comments, labels and attachments. > [card] Per-user Atlassian OAuth > > Per-user 3LO OAuth (central or tenant client), an HTTP Basic API token, or a direct access token, resolved server-side. ## Who is this for? This connector is used by three different roles. Jump to the section that matches yours; each one is self-contained. > [card] Agent builder > > You build agents in **Agent Creator** and want them to read and act on Confluence. → *Agent builder* tab. > [card] Platform admin > > You run the platform and set up the shared Atlassian OAuth client once for everyone. → *Platform admin setup* accordion below. > [card] Workspace builder > > You write Builder automations (DSUL) that call Confluence operations directly. → *Workspace builder* tab. ## Prerequisites (Atlassian side) * An **Atlassian Confluence Cloud** site (`https://yoursite.atlassian.net`) and an account with permission on the spaces you intend to use. * For the OAuth modes: an **OAuth 2.0 (3LO) app** registered in the [Atlassian Developer Console](https://developer.atlassian.com/console/myapps/), with the **Confluence API** added and the **granular** scopes below granted. For the `apiToken` mode instead: an **Atlassian account email** + an **API token** generated at [Atlassian API Tokens](https://id.atlassian.com/manage-profile/security/api-tokens). * The base URL is resolved automatically: OAuth modes call `https://api.atlassian.com/ex/confluence/{cloudId}` (the `cloudId` is discovered from the granted site); the `apiToken` mode calls `https://{site}.atlassian.net` directly. The Confluence v2 REST API **requires granular scopes** (the classic `*:confluence-content.all` scopes only authorize the legacy v1 API). The complete granular scope set requested by default, covering all 20 operations, is: ```text theme={null} read:page:confluence write:page:confluence delete:page:confluence read:space:confluence read:comment:confluence write:comment:confluence read:label:confluence write:label:confluence read:attachment:confluence read:content-details:confluence read:hierarchical-content:confluence read:content.metadata:confluence read:user:confluence offline_access ``` > [!NOTE] > > A few scopes are non-obvious but required: `read:content-details:confluence` authorizes the **v1 CQL search** (`search` tool); `read:hierarchical-content:confluence` covers **children / descendants** (`content` tool); and `read:content.metadata:confluence` is required for **page ancestors**. Drop them and the corresponding operations return `403`. > [accordion] Platform admin (Governance): one-time platform setup > > **Goal:** two one-time tasks: (1) configure the shared **central Atlassian OAuth client** so every workspace lets its users sign in with their own Atlassian account, and (2) expose Confluence as a reusable **capability** in AI Governance so agent builders can pick it without pasting endpoint URLs. > > ## 1. Configure the connector > > **1. Register the OAuth 2.0 (3LO) app at Atlassian** > > In the [Atlassian Developer Console](https://developer.atlassian.com/console/myapps/), create an app → **Authorization > OAuth 2.0 (3LO)**, and set the **Callback URL** to the core workspace callback: > > ```text theme={null} > /workspaces/slug:confluence-next/webhooks/oauthCallback > ``` > > (e.g. `https://api.studio.prisme.ai/v2/workspaces/slug:confluence-next/webhooks/oauthCallback` on production; `` is the production API URL. Copy the exact URI from the connector's configuration app, which renders it for you.) Then under **Permissions**, add the **Confluence API** and enable the **granular** scopes listed in *Prerequisites*. Note the **Client ID** and **Secret** from **Settings**. > > **2. Confirm the scopes are granular, not classic** > > Atlassian enforces **classic XOR granular scopes per product** in the developer console. The Confluence v2 REST API the connector uses works **only** with the granular `*:confluence` scopes; the classic Confluence scopes (e.g. `read:confluence-content.all`) authorize the legacy v1 API and will **not** appear in the granular list. Enable the full granular set from *Prerequisites*; partial sets cause `403` on the missing operations. > > > [!WARNING] > > > > The connector requests exactly the scopes set in its **Scopes** field (the central scopes entered in step 3, overridable per workspace), **not** whatever is enabled on the Atlassian app. Enabling more scopes in the Atlassian developer console has no effect until you also add them to the connector's Scopes field. Conversely the Scopes field can never grant a permission the Atlassian app does not expose. > > **3. Enter the credentials through the configuration app** > > Open the central `confluence-next` workspace and launch its **Configuration app**: `/apps/confluence-next` (e.g. `https://studio.prisme.ai/apps/confluence-next`), also linked as `Configuration app` on the installed instance. Switch to the maintainer view and follow the in-app instructions to paste the **Client ID**, **Client Secret** and the **Scopes**; the app stores them in the core workspace's secrets for you. Do not edit Studio's raw Secrets by hand. These credentials stay in the `confluence-next` workspace and are never exposed to tenants or end users; token exchange is proxied through the core `centralTokenExchange` webhook so the client secret never leaves the core workspace. > > > [!NOTE] > > > > **One Atlassian OAuth app can serve both Confluence and Jira.** A single Atlassian app (one Client ID/Secret) can have both the Confluence API and the Jira platform REST API enabled. Each connector requests **its own** Scopes, so Confluence uses its granular scopes while Jira can stay on classic scopes on the very same app; point both connectors' config apps at the same Client ID/Secret and give each its own Scopes field. > > **4. Tell workspaces to use the central client** > > Each consuming workspace selects auth mode **`oauthCentral`** in the connector configuration app (no client id/secret to enter on their side). Their users then just click **Connect**. > > ## 2. Declare the capability in AI Governance > > Generic connectors (broad tool surfaces meant to be shared across many agents, like Confluence) are best exposed as a named **capability** in AI Governance. Agent builders then enable that capability on their agents instead of pasting a raw MCP endpoint. > > **1. Open AI Governance > Capabilities** > > Create (or edit) the **Confluence** capability. > > **2. Point it at the MCP endpoint** > > Set the capability's MCP server URL to the connector's **MCP Endpoint**, and set its **Scope** to: > > ```text theme={null} > context_id,agent_id,user_id > ``` > > The `agent_id` in the scope is what lets the connector identify and authorize the calling agent. > > **3. Make it available to agent builders** > > Once created, the capability appears in the capability picker for agent builders in your organization, who enable it on their agents. Access to the catalog follows your organization's existing roles; there is no per-capability role grant. > > **4. Smoke-test** > > From an agent that has the capability, in a workspace configured for `oauthCentral`, trigger any tool. The user is prompted to connect once (Atlassian sign-in); subsequent calls reuse the stored token transparently and refresh it automatically. > > > [!WARNING] > > > > Declaring the capability makes the connector **available**; it does not by itself authorize a specific agent. This connector follows the **tenant-context model**: which agents may actually call it is gated per-workspace by the **authorized-agents allowlist** in the configuration app (see the *Workspace builder* tab). Agents show a **Connect** button only if the catalog entry carries the connector's connect / status / disconnect webhooks in its `auth` block. The configuration app's **Add to catalog** button writes it for you. If you create the entry by hand, paste that block into **Auth Configuration**: the platform adds it later on its own only for a workspace endpoint (ending in `.mcp`), never for the connector's global `/webhooks/mcp` endpoint. *** > [tab] Agent builder (Agent Creator) > > ## Agent builder > > **Goal:** let an agent you build in Agent Creator read and act on Confluence through MCP tools. > > > [!NOTE] > > > > Before an agent can call the connector, a *Workspace builder* must have installed and configured the Confluence app in a workspace (see the *Workspace builder* tab), and, for the central OAuth mode, a *Platform admin* must have provisioned the shared OAuth client (see the *Platform admin setup* accordion above). > > This connector runs in the **tenant app-instance context**: your agent is authorized two ways at once: it is identified by the `agent_id` that Agent Creator injects through the capability *Scope*, and that agent must appear in the connector's **authorized-agents allowlist** (managed in the configuration app). The Atlassian token itself is resolved server-side from the configured auth mode. > > There are two ways to wire it up. Pick based on how much isolation you need. > > ## Option A: Enable the shared capability from the catalog > > The fastest path: a *Platform admin* has already published a **Confluence** capability (see the *Platform admin setup* accordion above, §2), so you just pick it from the catalog. > > **1. Open your agent in Agent Creator** > > Open the agent you want to extend and go to its capabilities / tools. > > **2. Add the Confluence capability** > > Browse the capability catalog, select **Confluence**, and enable it. The MCP endpoint URL and the *Scope* (`context_id,agent_id,user_id`) are already wired by the admin: nothing to paste, and the shared instance accepts every agent, so there is no allowlist step on your side. > > **3. Connect an account (per-user modes)** > > On the first tool call, an unconnected user gets a **Connect** card in the conversation. In the OAuth modes it opens the Atlassian sign-in. In the Data Center `personalAccessToken` mode it opens a dedicated window where the user pastes their own Personal Access Token (see *Connect with a personal access token* below). The `apiToken` and `accessToken` modes need no per-user sign-in. > > > [!NOTE] > > > > Convenient, but your agent runs against a **shared, platform-managed instance**: its Atlassian credentials are owned by someone else and the instance accepts every agent that is granted the capability. Prefer Option B for anything beyond quick experiments. > > ## Option B: Run it from your own workspace (recommended) > > For production agents, install the connector in **your own workspace** and point the agent at *that* workspace's MCP endpoint. > > > [!WARNING] > > > > **Prefer this mode for security.** Because the MCP runs in *your* app-instance context, the Atlassian credentials, the per-user OAuth tokens and the authorized-agents allowlist are all **scoped to your workspace**, not shared platform-wide. You decide exactly which agents may call it and which Atlassian account / auth mode backs them, and a misconfiguration elsewhere can never expose your data. The shared catalog capability (Option A) is a broad surface many agents can reach; your own workspace is an isolated, least-privilege boundary. > > **1. Install and configure the connector in your workspace** > > Follow the *Workspace builder* tab: install **ConfluenceNext** in your workspace, open its **Configuration app**, choose the auth mode and connect an Atlassian account. > > **2. Allowlist your agent** > > In that workspace's config app, open **Authorized agents** and tick your agent (the **Install capability** button does this for you). > > **3. Add the MCP capability to your agent** > > In your agent, add a capability pointing at **your workspace's MCP Endpoint** URL, and set its **Scope** to: > > ```text theme={null} > context_id,agent_id,user_id > ``` > > The `agent_id` is what lets the connector identify and authorize your agent; without it, every call is rejected with an explicit "agent could not be identified" message. This *Scope* is separate from the Atlassian OAuth scopes. > > **4. Connect an account (per-user modes)** > > On the first tool call, the user gets the **Connect** card (or uses **Connect** in the config app): Atlassian sign-in in the OAuth modes, the token window in the `personalAccessToken` mode. > > ## Connect with a personal access token (Data Center) > > In the `personalAccessToken` mode, each user of a shared agent connects with their own Confluence Data Center token. Nobody needs a workspace of their own, and the token never goes through the conversation. > > **1. Create the token in Confluence** > > In Confluence Data Center, open your profile picture → **Settings** → **Personal Access Tokens** → **Create token**. Set an expiry date. The token carries all your Confluence permissions. > > **2. Paste it in the Connect window** > > Click **Connect** on the card the agent shows. A dedicated window opens: paste the token and confirm. Confluence checks it first (`/rest/api/user/current` must return a signed-in user). A refused token shows an error, nothing is stored, and a token stored earlier is kept. > > **3. Use the agent** > > The token is stored in your own user secrets, readable by no other user. It is not in the messages, the model's context, the conversation history or the activity feed. Every tool call made on your behalf uses it. > > To change or remove your token, use **Disconnect** from the agent's tools menu, then **Connect** again. When Confluence answers `401` with its own error body (token expired or revoked), the stored token is deleted and the **Connect** card comes back on the next call. A `401` from a proxy or SSO page, or a `403`, keeps the token. > > ## Brief the agent in its system prompt > > Whichever option you pick, wiring the capability is not enough: the agent must know the MCP exists and when to use it. Copy-pasteable starter: > > ```text theme={null} > You have access to the Confluence MCP server (tools: pages, spaces, search, content, comments, labels, attachments, versions). Each tool takes an `action` argument. Use `search` (action `cql`) to find content with CQL, `pages` getBody to read a page's content, and `pages` create/update/delete to manage pages. Page bodies use Confluence "storage" format (XHTML). Navigate the tree with `content` children/ancestors/descendants. Confirm with the user before any create, update, delete or comment. > ``` > > > [!NOTE] > > > > **Legacy AI Knowledge agents** (no native MCP picker): add the connector under **Advanced > Tools > MCP** and paste the **MCP Endpoint** URL. The agent still has to be allowlisted in the config app and its identity propagated so the connector can read its `agent_id`. > > > [!NOTE] > > > > **Restricting to read-only (least privilege).** Confluence tools cover both reads and writes (create / update / delete pages, add comments and labels). The requested OAuth scopes **are** the grant, so the connector only obtains what the **Scopes** field in the configuration app asks for. To allow only read access, drop the write/delete scopes: > > > > ```text theme={null} > > read:page:confluence read:space:confluence read:comment:confluence read:label:confluence read:attachment:confluence read:content-details:confluence read:hierarchical-content:confluence read:content.metadata:confluence read:user:confluence offline_access > > ``` > > > > (Removed: `write:page:confluence`, `delete:page:confluence`, `write:comment:confluence`, `write:label:confluence`.) With central OAuth (`oauthCentral`) you do **not** create your own Atlassian client; keep `oauthCentral` and just enter the read-only scopes; your tenant scope overrides the platform default (the central app must expose those read scopes). Write calls are then rejected by Atlassian with `403`. Note this is set at the workspace level: a workspace editor can widen it again; a provider-side restriction (a read-only Atlassian account/space permission) is the only hard guarantee. For the `apiToken` mode, restrict at the provider instead by backing the connection with a Confluence account that has read-only space permissions. > > ## Available Tools > > Each tool takes an `action` argument selecting the concrete operation, plus the per-action parameters. > > | Tool | Description | > | - | - | > | `pages` | Confluence pages (REST v2). Actions: `list`, `get`, `getBody`, `create`, `update`, `delete`. Bodies use storage (XHTML) or `atlas_doc_format`. | > | `spaces` | Confluence spaces (REST v2). Actions: `list`, `get`. | > | `search` | CQL search (REST v1). Action: `cql`, e.g. `type=page AND space=DEV AND text ~ "roadmap"`. | > | `content` | Page hierarchy (REST v2). Actions: `children`, `ancestors`, `descendants`. | > | `comments` | Page comments (REST v2). Actions: `getFooter`, `addFooter`, `getInline`. | > | `labels` | Page labels (read v2, add v1). Actions: `getForPage`, `addToPage`. | > | `attachments` | Page attachments (REST v2). Actions: `listForPage`, `get`. Metadata + `downloadLink`; binary is not inline. | > | `versions` | Page version history (REST v2). Action: `listForPage`. | > > ## Output Formats > > Every tool accepts an `outputFormat` argument that controls the MCP response shape: > > * **`verbose`** (default): human-readable text optimized for LLM consumption > * **`structured`**: machine-readable JSON in `structuredContent` > * **`both`**: both the text and the structured content > > ## Tool Details > > ### search > > ```json theme={null} > { > "name": "search", > "arguments": { > "action": "cql", > "cql": "type=page AND space=DEV AND text ~ \"roadmap\"", > "limit": 25, > "excerpt": "highlight" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | `cql`. | > | `cql` | Yes | Confluence Query Language string, e.g. `type=page AND space=DEV AND text ~ "roadmap"`. | > | `cqlcontext` | No | CQL context JSON (space / contentId scoping). | > | `limit` / `start` / `cursor` | No | Pagination controls. | > | `excerpt` | No | Excerpt strategy: `indexed`, `highlight`, `none`. | > > ### pages > > ```json theme={null} > { > "name": "pages", > "arguments": { > "action": "create", > "body": { > "spaceId": "65538", > "status": "current", > "title": "Release notes 2.0", > "parentId": "98306", > "body": { > "representation": "storage", > "value": "

Highlights of the release.

" > } > } > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | One of `list`, `get`, `getBody`, `create`, `update`, `delete`. | > | `id` | For get/getBody/update/delete | Page id. | > | `spaceId` / `title` / `status` | No | Filters for `list` (or container for `create` via `body`). | > | `bodyFormat` | No | Body format on read: `storage`, `atlas_doc_format`, `view`. | > | `body` | For create/update | `{ spaceId, status, title, parentId, body: { representation, value }, version: { number } }`. Updates must echo the current `version.number` + 1. | > > > [!NOTE] > > > > `get` returns page metadata **without** the body; use `getBody` (or `get` with `bodyFormat`) to read the content. Updating a page is optimistic-locked: pass `version: { number }` one above the page's current version, or Confluence returns a conflict. > > ### content > > ```json theme={null} > { > "name": "content", > "arguments": { > "action": "descendants", > "id": "98306", > "depth": 3, > "limit": 100 > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | One of `children`, `ancestors`, `descendants`. | > | `id` | Yes | Page id. | > | `depth` | No | `descendants` only: how deep to walk the tree. | > | `limit` / `cursor` | No | Pagination controls. | > > ### comments > > ```json theme={null} > { > "name": "comments", > "arguments": { > "action": "addFooter", > "body": { > "pageId": "98306", > "body": { "representation": "storage", "value": "

Reviewed and approved.

" } > } > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | One of `getFooter`, `addFooter`, `getInline`. | > | `id` | For getFooter/getInline | Page id. | > | `body` | For addFooter | `{ pageId, body: { representation, value }, parentCommentId? }` (set `parentCommentId` to reply). | > | `bodyFormat` / `status` / `sort` | No | Read filters for getFooter / getInline. | > [tab] Workspace builder (DSUL) > > ## Workspace builder > > **Goal:** install the connector in a workspace, configure authentication and the agent allowlist, and call Confluence operations from your automations. > > ## Installation > > 1. Go to **Apps** in your workspace > 2. Search for **ConfluenceNext** and install it > 3. Open the **Configuration app** (the link auto-populated on install) to choose the auth mode, provide credentials, connect, and allow the agents that may call the connector > > ## Configuration > > | Field | Description | > | - | - | > | **Configuration app** | Auto-populated on install. Open this link to configure authentication (mode + credentials), connect an Atlassian account (OAuth modes), and manage the authorized-agents allowlist. | > > The configuration app drives everything; the app instance itself has no per-field credential form. First pick the **Deployment**: *Atlassian Cloud*, or *Atlassian Data Center* with its **base URL** (e.g. `https://wiki.example.net/confluence`). Then pick one of: > > | Auth mode | Deployment | What you provide | Best for | > | - | - | - | - | > | `oauthCentral` | Cloud | Nothing, just click **Connect** | Workspaces on a platform where the admin set up the central Atlassian client | > | `oauth` | Cloud | Your own Atlassian **Client ID + Secret** (callback URI shown in the config app: `/workspaces/slug:/webhooks/.oauthCallback`) + **Scopes** | You manage your own Atlassian OAuth app | > | `apiToken` | Cloud | Atlassian **account email** + **API token** + **site** (`yoursite.atlassian.net`) | A single shared service identity, no interactive sign-in | > | `accessToken` | Cloud, Data Center | A pre-minted **access token** (on Cloud, + `cloudId` or site); on Data Center, a service account's Personal Access Token | Short-lived / caller-managed tokens, or Data Center scheduled knowledge sync with one service account | > | `personalAccessToken` | Data Center | Nothing in the config app: each user pastes their own Personal Access Token through **Connect** (see the *Agent builder* tab) | Shared agents on Data Center where each user acts with their own Confluence permissions | > > > [!NOTE] > > > > Credentials are provisioned into the workspace's Secrets by the `onInstall` flow and resolved server-side. The agent allowlist (**Authorized agents**) gates which Agent Creator agents may call the MCP endpoint; see the *Agent builder* tab. The OAuth **Scopes** field is what the connector actually requests (default granular scopes; see *Prerequisites*); set a read-only list there to restrict writes. > > ## Available Instructions > > Every instruction resolves credentials from the workspace configuration. Operations are grouped by resource; the MCP server exposes the same operations behind the eight entity tools (see the *Agent builder* tab). > > ### Pages > > | Instruction | Description | Returns | > | - | - | - | > | `listPages` | List pages; filter with `spaceId`, `title`, `status`, page with `cursor`/`limit`. | `{ results: [{ id, title, spaceId, status }], _links: { next } }` | > | `getPage` | Get a page by `id` (metadata, no body); options `bodyFormat`, `version`, `includeLabels`. | `{ id, title, spaceId, status, version, … }` | > | `getPageBody` | Get a page WITH its body by `id` (`bodyFormat` defaults to `storage`; also `atlas_doc_format`). | `{ id, title, body: { storage: { value } } }` | > | `createPage` | Create a page; `body` = `{ spaceId, status, title, parentId, body: { representation, value } }`. | `{ id, title, spaceId, version: { number } }` | > | `updatePage` | Update a page by `id`; `body` echoes `{ id, status, title, body, version: { number } }` (current version + 1). | `{ id, title, version: { number } }` | > | `deletePage` | Delete a page by `id`; `purge: true` removes from trash, `draft: true` deletes the draft. | Empty (HTTP 204) | > > ### Spaces > > | Instruction | Description | Returns | > | - | - | - | > | `listSpaces` | List spaces; filter by `ids`, `keys`, `type`, `status`, `labels`. | `{ results: [{ id, key, name, type }], _links }` | > | `getSpace` | Get a space by `id`; `descriptionFormat` = `plain`/`view`. | `{ id, key, name, type, status }` | > > ### Search > > | Instruction | Description | Returns | > | - | - | - | > | `searchCql` | Run a CQL search; `cql` required (e.g. `type=page AND space=DEV AND text ~ "roadmap"`), with `limit`, `start`, `excerpt`, `expand`. | `{ results: [{ content: { id, title, type } }], totalSize }` | > > ### Content hierarchy > > | Instruction | Description | Returns | > | - | - | - | > | `getPageChildren` | Direct child pages of a page `id`; page with `cursor`/`limit`. | `{ results: [{ id, title }], _links }` | > | `getPageAncestors` | Ancestors of a page `id` (root first). | `{ results: [{ id, title }] }` | > | `getPageDescendants` | All descendants of a page `id`; `depth` bounds the tree. | `{ results: [{ id, title }], _links }` | > > ### Comments > > | Instruction | Description | Returns | > | - | - | - | > | `getFooterComments` | List footer comments of a page `id`. | `{ results: [{ id, body, version }], _links }` | > | `addFooterComment` | Add a footer comment; `body` = `{ pageId, body: { representation, value }, parentCommentId? }`. | `{ id, body, version }` | > | `getInlineComments` | List inline comments of a page `id`. | `{ results: [{ id, body, resolutionStatus }], _links }` | > > ### Labels > > | Instruction | Description | Returns | > | - | - | - | > | `getPageLabels` | List the labels of a page `id`; filter by `prefix`. | `{ results: [{ id, name, prefix }] }` | > | `addPageLabel` | Add labels to a page `id`; `body` = a JSON array `[{ prefix: "global", name: "my-label" }]`. | `[{ id, name, prefix }]` | > > ### Attachments > > | Instruction | Description | Returns | > | - | - | - | > | `getPageAttachments` | List attachments of a page `id`; filter by `mediaType`, `filename`. | `{ results: [{ id, title, mediaType, downloadLink }], _links }` | > | `getAttachment` | Get an attachment's metadata by attachment `id`; `version` optional. | `{ id, title, mediaType, fileSize, downloadLink }` | > > ### Versions > > | Instruction | Description | Returns | > | - | - | - | > | `getPageVersions` | List the version history of a page `id`. | `{ results: [{ number, createdAt, authorId }], _links }` | > > > [!NOTE] > > > > `Returns` shows the shape of the operation output (the underlying Confluence REST resource). Attachment binaries are **not** inline: `getPageAttachments` / `getAttachment` return a `downloadLink`; fetch the bytes out-of-band. `addPageLabel` takes a JSON **array** of label objects. > > ## DSUL Examples > > **Search the wiki with CQL:** > > ```yaml theme={null} > - ConfluenceNext.searchCql: > cql: 'type=page AND space=DEV AND text ~ "roadmap"' > limit: 25 > excerpt: highlight > output: hits > ``` > > **Create a child page (storage format):** > > ```yaml theme={null} > - ConfluenceNext.createPage: > body: > spaceId: '{{spaceId}}' > status: current > title: '{{title}}' > parentId: '{{parentId}}' > body: > representation: storage > value: '

{{summary}}

' > output: newPage > ``` > > **Read a page body, then update it (version + 1):** > > ```yaml theme={null} > - ConfluenceNext.getPage: > id: '{{pageId}}' > output: page > > - ConfluenceNext.updatePage: > id: '{{pageId}}' > body: > id: '{{pageId}}' > status: current > title: '{{page.title}}' > body: > representation: storage > value: '

Updated content.

' > version: > number: '{% {{page.version.number}} + 1 %}' > ``` > > **Label a page:** > > ```yaml theme={null} > - ConfluenceNext.addPageLabel: > id: '{{pageId}}' > body: > - prefix: global > name: reviewed > output: labels > ``` *** ## Security The answers that hold for every connector (agent access, shared knowledge bases, credentials, models, egress) are on [Connector security](/apps-store/marketplace/connectors/security). This section lists what is specific to Confluence. | Topic | Confluence | | - | - | | Authentication family | Delegated OAuth (Atlassian, authorization code with PKCE) on Cloud: each user connects their own Atlassian account. On Data Center, each user enters their own personal access token. | | Production modes | Cloud: `oauthCentral` or `oauth`. Data Center: `personalAccessToken`. | | Modes to avoid in production | `accessToken` (testing only), `apiToken` (one email and API token shared by every caller) | | Read-only scopes | Cloud: `read:page:confluence`, `read:space:confluence`, `read:comment:confluence`, `read:label:confluence`, `read:attachment:confluence`, `read:content-details:confluence`, `read:hierarchical-content:confluence`, `read:content.metadata:confluence`, `read:user:confluence`, `offline_access` (the **read-only** preset of the configuration app). The default scopes include `write:page:confluence`, `delete:page:confluence`, `write:comment:confluence` and `write:label:confluence`. | | Agent allowlist | Yes, on the tenant endpoint (empty at installation). The global endpoint accepts every agent. | | Per-reader access control on knowledge bases | Yes: each page is checked against the reader's own connection (Atlassian account on Cloud, personal access token on Data Center). | | Outbound hosts | Cloud: `api.atlassian.com`, `auth.atlassian.com`, and `.atlassian.net` in `apiToken` mode. Data Center: the base address the administrator sets at installation. | | Audit events | None specific to this connector | With the read-only scopes, Atlassian itself refuses every create, update and delete call. On Data Center, a personal access token has no scopes and carries all the permissions of its owner: restrict what the agents can change through Confluence space permissions, and ask users to set an expiry date on their tokens. *** ## Error Handling | HTTP code | Meaning | | - | - | | `400` | Bad request: malformed CQL, invalid body, or a missing required field. | | `401` | Unauthorized: the Atlassian token is missing, expired or revoked. The user must reconnect (OAuth modes) or connect a new personal access token (`personalAccessToken` mode). | | `403` | Forbidden: insufficient OAuth scope (e.g. a write with read-only scopes, or a missing granular scope), or the account lacks permission on the space. | | `404` | Not found: the page, space, comment or attachment id does not exist or is not visible to the account. | | `409` | Conflict: the page `version.number` is stale; re-read the page and update with the current version + 1. | | `429` | Rate limit: back off and retry. | | `500` / `503` | Atlassian service error: transient; retry shortly, no reconnection needed. | ### Common Issues **"This agent is not authorized to use this connector"**: The calling agent is not in the allowlist. Open the configuration app → **Authorized agents** → tick this agent (or enable **Allow all agents**) and Save. **"The calling agent could not be identified"**: The MCP capability *Scope* does not declare `agent_id`, so Agent Creator never injects the agent identity. Set the Scope to `context_id,agent_id,user_id` on the capability, then allow the agent in the config app. **"Confluence is not connected for this user"**: No per-user OAuth token or personal access token stored for this user. Open the configuration app and click **Connect**, or use the agent's **Connect** card. **The Connect window refuses my personal access token**: Confluence did not resolve a signed-in user with it. Check that the token is not expired or revoked, and that the Data Center base URL set in the configuration app is the one you created the token on. **"token refresh failed … must reconnect"**: The stored refresh token was revoked or expired (Atlassian invalidated it). The connection is dropped automatically; the user must reconnect from the config app. **"OAuth is not configured"**: Neither a tenant Atlassian client nor the central platform client is available. Set the OAuth client ID/secret in the config app, or ask the platform maintainer to provision the central OAuth client. **403 on search, hierarchy or ancestors despite read access**: The Confluence v2 API needs granular scopes the classic set does not cover: `read:content-details:confluence` (CQL search), `read:hierarchical-content:confluence` (children / descendants) and `read:content.metadata:confluence` (ancestors). Add the missing scope to the connector **Scopes** field and reconnect. Confluence v2 will **not** work on classic scopes. ## External Resources > [card] [Confluence Cloud REST API v2](https://developer.atlassian.com/cloud/confluence/rest/v2/) > > Official reference for the Confluence v2 REST API. > [card] [Confluence CQL search (v1)](https://developer.atlassian.com/cloud/confluence/advanced-searching-using-cql/) > > Confluence Query Language reference for the `search` tool. > [card] [Atlassian OAuth 2.0 (3LO) scopes](https://developer.atlassian.com/cloud/confluence/scopes-for-oauth-2-3LO-and-forge-apps/) > > Classic vs granular scopes reference for Confluence OAuth 2.0 apps. > [card] [Tool Agents](/products/agent-factory/capabilities) > > Learn how Agent Creator agents consume MCP tools in Prisme.ai. # DataGalaxy Source: https://docs.prisme.ai/apps-store/marketplace/connectors/data-galaxy Read and write the DataGalaxy data catalog from Agent Creator agents and Builder workflows ![DataGalaxy](https://mintcdn.com/prismeai/Oqq72tWGTtxufvRl/images/connectors/data-galaxy.svg?fit=max\&auto=format\&n=Oqq72tWGTtxufvRl\&q=85\&s=9961c5338c817c18b7192ff56f76dd7f) The DataGalaxy app exposes the [DataGalaxy](https://www.datagalaxy.com) data catalog API. It can be consumed two ways: as a remote MCP server that **Agent Creator** agents call as tools, or as a Builder app whose instructions you call directly from DSUL. It covers the full catalog (dictionary with sources, containers, structures and fields, glossary, usages, data processings) plus links, comments and tasks, and a global search across every object. Authentication is a single **DataGalaxy Personal Access Token (PAT) or integration token** stored in the workspace configuration: the connector exchanges it server-side for a short-lived access token. The credential is never exposed to the agent; agents are identified by the capability **Scope** `context_id,agent_id,user_id` and the connector resolves the token from its own app configuration. > [card] Catalog dictionary > > Create, read, update and delete sources, containers, structures and fields, with the generic object operations for any entity type. > [card] Glossary, usages & data processing > > Manage glossary properties (business terms, concepts, indicators), usages (applications, dashboards, datasets) and data flows / processings. > [card] Links & collaboration > > Relate any two catalog entities, post comments and manage tasks across the catalog, with full-text search over everything. ## Who is this for? This connector is used by three different roles. Jump to the section that matches yours; each one is self-contained. > [card] Agent builder > > You build agents in **Agent Creator** and want them to read and write the DataGalaxy catalog. → *Agent builder* tab. > [card] Platform admin > > You run the platform and want to publish DataGalaxy as a reusable capability. → *Platform admin setup* accordion below. > [card] Workspace builder > > You write Builder automations (DSUL) that call DataGalaxy operations directly. → *Workspace builder* tab. ## Prerequisites * A **DataGalaxy account** with API access to the workspaces (client spaces) you intend to manage. * A **Personal Access Token (PAT)** or **integration token**: generated in DataGalaxy under your account / integration settings. The connector exchanges it server-side for a short-lived access token. * Your **DataGalaxy API base URL**: default `https://api.datagalaxy.com` (override only for a region-specific or self-hosted instance). * The token's user must hold the DataGalaxy roles needed for the operations you call (read for list/get, write for create/update/delete on the relevant workspace version). > [accordion] Platform admin (Governance): one-time platform setup > > **Goal:** DataGalaxy is a **per-workspace** connector: each workspace pastes its own DataGalaxy token in the app configuration (see the *Workspace builder* tab), so there is **no platform-wide credential to provision** and no central OAuth client. > > > [!NOTE] > > > > There is no shared DataGalaxy credential. The PAT / integration token always lives in the consuming workspace's app configuration and is resolved server-side. A Governance capability you publish here points at a specific workspace's MCP endpoint; that workspace still owns the credential. > > ## Declare the capability in AI Governance (optional) > > **1. Open AI Governance > Capabilities** > > Create (or edit) the **DataGalaxy** capability. > > **2. Point it at the MCP endpoint** > > Set the capability's MCP server URL to the connector's **MCP Endpoint** (the workspace running the connector), and set its **Scope** to: > > ```text theme={null} > context_id,agent_id,user_id > ``` > > The `agent_id` in the scope is what lets the connector identify the calling agent. > > **3. Make it available to agent builders** > > Once created, the capability appears in the capability picker for agent builders in your organization, who enable it on their agents. Access to the catalog follows your organization's existing roles; there is no per-capability role grant for this connector. > > > [!WARNING] > > > > Declaring the capability makes the connector **available**; it does not provision any credential. This connector resolves a single DataGalaxy token from the consuming workspace's app configuration; there is **no OAuth auth-config JSON** to attach in Governance and **no per-user OAuth flow**. *** > [tab] Agent builder (Agent Creator) > > ## Agent builder > > **Goal:** let an agent you build in Agent Creator read and write the DataGalaxy catalog through MCP tools. > > > [!NOTE] > > > > Before an agent can call the connector, a *Workspace builder* must have installed and configured the DataGalaxy app in a workspace (see the *Workspace builder* tab). Optionally, a *Platform admin* may have published a DataGalaxy capability in AI Governance (see the *Platform admin setup* accordion above). > > The DataGalaxy credential is resolved server-side from the app configuration, never exposed to the agent. Your agent is identified by the `agent_id` that Agent Creator injects through the capability *Scope*. > > **1. Install and configure the connector in a workspace** > > Follow the *Workspace builder* tab: install **DataGalaxy** in a workspace and provide the PAT / integration token and (optionally) the base URL. > > **2. Add the MCP capability to your agent** > > In your agent, add a capability pointing at that workspace's **MCP Endpoint** URL, and set its **Scope** to: > > ```text theme={null} > context_id,agent_id,user_id > ``` > > The `agent_id` is what lets the connector identify your agent. > > **3. Brief the agent** > > Tell the agent the tools exist and when to reach for them. Copy-pasteable starter: > > ```text theme={null} > You have access to the DataGalaxy MCP server. Use it whenever the user asks about catalog content: sources, containers, structures (tables), fields, glossary terms, usages, data processings, links, comments or tasks. Each tool takes an `action` argument selecting the concrete operation. Examples: "Find all glossary terms tagged GDPR" (catalog search), "List the structures of the Snowflake source", "Add a comment to the customer table", "Create a task to review the orders dataset". DataGalaxy IDs use the DoubleUuid format and most operations need a `versionId` (use the catalog tool's listWorkspaces / listVersions actions to discover it). Prefer calling a tool over guessing, and confirm with the user before any destructive action (delete a structure, remove a glossary term). > ``` > > Refine the trigger keywords (source names, glossary domains, project tags) so the agent reliably picks up the right intent in your context. > > > [!NOTE] > > > > **Legacy AI Knowledge agents** (no native MCP picker): add the connector under **Advanced > Tools > MCP** and paste the **MCP Endpoint** URL. The DataGalaxy token is still resolved server-side from the installed app configuration. > > ## Available Tools > > Tools are **entity-grouped**: each tool takes an `action` argument selecting the concrete operation, plus the per-action parameters. Most operations need a `versionId` (a DataGalaxy workspace version); discover it with the `catalog` tool. > > | Tool | Description | > | - | - | > | `catalog` | Catalog metadata + global search. Actions: `listWorkspaces`, `listVersions`, `listAttributes`, `search`. | > | `sources` | Sources: top-level dictionary entities. Actions: `list`, `get`, `create`, `update`, `delete`. | > | `containers` | Containers (models, directories). Actions: `list`, `get`, `create`, `update`, `delete`. | > | `structures` | Structures (tables, datasets, views). Actions: `list`, `get`, `create`, `update`, `delete`. | > | `fields` | Fields (columns of a structure). Actions: `list`, `get`, `create`, `update`, `delete`. | > | `properties` | Glossary properties (business terms, concepts, indicators, …). Actions: `list`, `get`, `create`, `update`, `delete`. | > | `usages` | Usages (applications, dashboards, datasets, …). Actions: `list`, `get`, `create`, `update`, `delete`. | > | `dataProcessings` | Data flows and processings. Actions: `list`, `get`, `create`, `update`, `delete`. | > | `links` | Relationships between entities. Actions: `get`, `create`, `delete`. | > | `comments` | Comments on an entity (rich-text HTML). Actions: `list`, `create`. | > | `tasks` | Tasks assigned across the catalog. Actions: `list`, `create`, `update`. | > | `objects` | Generic object operations for any entity type. Actions: `get`, `update`. | > > ## Output Formats > > Every tool accepts an `outputFormat` argument that controls the MCP response shape: > > * **`verbose`** (default): human-readable text optimized for LLM consumption > * **`structured`**: concise machine-readable JSON in `structuredContent` > * **`both`**: the structured payload, with its JSON also rendered as text > > ## Tool Details > > ### catalog: search > > Global full-text search across every catalog object. > > ```json theme={null} > { > "name": "catalog", > "arguments": { > "action": "search", > "query": "customer", > "versionId": "abcd-1234...", > "limit": 50, > "filters": { "Status": ["Validated"] } > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | One of `listWorkspaces`, `listVersions`, `listAttributes`, `search`. | > | `query` | For search | Search query text. | > | `versionId` | No | Scope the search to a workspace version. | > | `limit` | No | Max results. | > | `filters` | No | Attribute filter object. | > | `workspaceId` | For listVersions | Workspace (client space) id. | > > ### sources: create > > ```json theme={null} > { > "name": "sources", > "arguments": { > "action": "create", > "versionId": "abcd-1234...", > "name": "Customer Database", > "type": "Database", > "technicalName": "customer_db", > "owners": ["alice@example.com"], > "status": "Validated" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | One of `list`, `get`, `create`, `update`, `delete`. | > | `versionId` | Yes | Workspace version id. | > | `name` | For create | Source display name. | > | `type` | For create | Entity type code (DataGalaxy-specific). | > | `sourceId` | For get/update/delete | Source id (UUID). | > | `technicalName` / `description` / `summary` / `status` / `owners` / `stewards` / `tags` | No | Standard catalog attributes (`status`: `Proposed`, `InRevision`, `Validated`, `InValidation`, `Obsolete`). | > > ### fields: create > > Creates a field (column) under a structure. > > ```json theme={null} > { > "name": "fields", > "arguments": { > "action": "create", > "versionId": "abcd-1234...", > "structureId": "struct-id", > "name": "email", > "type": "Column", > "columnDataType": "varchar", > "size": 255 > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | One of `list`, `get`, `create`, `update`, `delete`. | > | `versionId` | Yes | Workspace version id. | > | `structureId` | For create | Parent structure id. | > | `name` / `type` | For create | Field name and type code (`Column`, `Field`). | > | `columnDataType` | No | Free-form data type (e.g. `varchar`, `int`, `date`). | > | `size` | No | Column size. | > | `fieldId` | For get/update/delete | Field id (UUID). | > > ### links: create > > ```json theme={null} > { > "name": "links", > "arguments": { > "action": "create", > "versionId": "abcd-1234...", > "fromId": "field-id", > "toId": "business-term-id", > "type": "implements" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | One of `get`, `create`, `delete`. | > | `versionId` | Yes | Workspace version id. | > | `fromId` | Yes | Source entity id. | > | `toId` | For create/delete | Target entity id. | > | `type` | For create | Link type code. | > | `linkType` | For delete | Link type code to remove. | > > ### comments: create > > Rich-text HTML is supported in the `content` field. > > ```json theme={null} > { > "name": "comments", > "arguments": { > "action": "create", > "versionId": "abcd-1234...", > "entityId": "object-id", > "content": "

Reviewed and validated.

" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | `list` or `create`. | > | `versionId` | Yes | Workspace version id. | > | `entityId` | Yes | Entity the comment is attached to. | > | `content` | For create | Comment body (rich-text HTML supported). | > [tab] Workspace builder (DSUL) > > ## Workspace builder > > **Goal:** install the connector in a workspace, paste your DataGalaxy token, and call catalog operations from your automations. > > ## Installation > > 1. Go to **Apps** in your workspace > 2. Search for **DataGalaxy** and install it > 3. Open the app instance configuration and fill in the **Authentication Token** (and the base URL if it differs from the default) > > ## Configuration > > | Field | Description | > | - | - | > | **DataGalaxy API Base URL** | Base URL of the DataGalaxy API (default `https://api.datagalaxy.com`). | > | **Authentication Token** | DataGalaxy PAT or integration token, stored as a workspace secret. Exchanged server-side for a short-lived access token. | > | **MCP Endpoint** | Auto-populated on install: the URL of the MCP endpoint for this instance, used when wiring the connector into an agent (see the *Agent builder* tab). | > > The connector resolves its credential through the following order at call time: > > | Source | What you provide | Best for | > | - | - | - | > | Workspace configuration (default) | The **Authentication Token** in the app config | Standard setup: the token is exchanged server-side and cached | > | `configureDataGalaxy` session credential | A PAT (and optional base URL) stored in the session via the `configureDataGalaxy` instruction | Per-session override without changing the app config | > | `Authorization: Bearer` header | A caller-supplied access token (optional `x-datagalaxy-url` for the base URL) | Externally-minted / short-lived tokens | > > > [!NOTE] > > > > All IDs use DataGalaxy's DoubleUuid format and `versionId` refers to a workspace version id returned by `listVersions`. > > ## Available Instructions > > Every instruction resolves credentials from the workspace configuration. > > ### Search & Workspaces > > | Instruction | Description | Returns | > | - | - | - | > | `search` | Full-text search across all DataGalaxy objects by name, technical name, description or summary; optional `versionId`, `limit`, `filters`. | `{ results: [{ id, name, type, … }] }` | > | `listWorkspaces` | List all DataGalaxy workspaces (client spaces) accessible to the token. | `[{ id, name, … }]` | > | `listVersions` | List versions of a workspace by `workspaceId`. | `[{ id, versionName, … }]` | > | `listAttributes` | List all attributes (custom and built-in) defined in your client space. | `[{ attributeKey, dataType, … }]` | > > ### Generic Object Operations > > | Instruction | Description | Returns | > | - | - | - | > | `getObject` | Get any object by `versionId` + `objectId`. | The object resource `{ id, name, type, … }` | > | `updateObject` | Update any object by `versionId` + `objectId` (`name`, `technicalName`, `description`, `summary`, `status`, `owners`, `stewards`, `tags`). | The updated object resource | > > `status` accepts `Proposed`, `InRevision`, `Validated`, `InValidation`, `Obsolete`. > > ### Sources > > | Instruction | Description | Returns | > | - | - | - | > | `listSources` | List sources for a `versionId` (`limit`, `page`, `includeAttributes`). | `[{ id, name, … }]` | > | `getSource` | Get a source by `versionId` + `sourceId`. | The source resource | > | `createSource` | Create a source from `name` + `type` (+ standard attributes). | The created source | > | `updateSource` | Update a source by `sourceId`. | The updated source | > | `deleteSource` | Delete a source by `sourceId`. | Empty / acknowledgement | > > ### Containers > > | Instruction | Description | Returns | > | - | - | - | > | `listContainers` | List containers for a `versionId` (optional `parentId`). | `[{ id, name, … }]` | > | `getContainer` | Get a container by `containerId`. | The container resource | > | `createContainer` | Create a container under `parentId` from `name` + `type` (`Model`, `Directory`, `Equipment`). | The created container | > | `updateContainer` | Update a container by `containerId`. | The updated container | > | `deleteContainer` | Delete a container by `containerId`. | Empty / acknowledgement | > > ### Structures > > | Instruction | Description | Returns | > | - | - | - | > | `listStructures` | List structures for a `versionId` (optional `parentId`). | `[{ id, name, … }]` | > | `getStructure` | Get a structure by `structureId`. | The structure resource | > | `createStructure` | Create a structure under `parentId` from `name` + `type` (`Table`, `Document`, `File`, `SubStructure`, `Tag`, `View`). | The created structure | > | `updateStructure` | Update a structure by `structureId`. | The updated structure | > | `deleteStructure` | Delete a structure by `structureId`. | Empty / acknowledgement | > > ### Fields > > | Instruction | Description | Returns | > | - | - | - | > | `listFields` | List fields for a `versionId` (optional `parentId`). | `[{ id, name, … }]` | > | `getField` | Get a field by `fieldId`. | The field resource | > | `createField` | Create a field under `structureId` from `name` + `type` (`Column`, `Field`), with `columnDataType` + `size`. | The created field | > | `updateField` | Update a field by `fieldId`. | The updated field | > | `deleteField` | Delete a field by `fieldId`. | Empty / acknowledgement | > > ### Glossary Properties > > | Instruction | Description | Returns | > | - | - | - | > | `listProperties` | List glossary properties for a `versionId`. | `[{ id, name, … }]` | > | `getProperty` | Get a property by `propertyId`. | The property resource | > | `createProperty` | Create a property under `parentId` from `name` + `type` (`Universe`, `BusinessDomain`, `ReferenceData`, `Concept`, `Indicator`, `BusinessTerm`, …). | The created property | > | `updateProperty` | Update a property by `propertyId`. | The updated property | > | `deleteProperty` | Delete a property by `propertyId`. | Empty / acknowledgement | > > ### Usages > > | Instruction | Description | Returns | > | - | - | - | > | `listUsages` | List usages for a `versionId`. | `[{ id, name, … }]` | > | `getUsage` | Get a usage by `usageId`. | The usage resource | > | `createUsage` | Create a usage under `parentId` from `name` + `type` (`Application`, `Dashboard`, `DataSet`, `Report`, `Process`, …). | The created usage | > | `updateUsage` | Update a usage by `usageId`. | The updated usage | > | `deleteUsage` | Delete a usage by `usageId`. | Empty / acknowledgement | > > ### Data Processing > > | Instruction | Description | Returns | > | - | - | - | > | `listDataProcessing` | List data processings for a `versionId`. | `[{ id, name, … }]` | > | `getDataProcessing` | Get a data processing by `dataProcessingId`. | The data processing resource | > | `createDataProcessing` | Create a data processing under `parentId` from `name` + `type` (`DataFlow`, `DataProcessing`). | The created data processing | > | `updateDataProcessing` | Update a data processing by `dataProcessingId`. | The updated data processing | > | `deleteDataProcessing` | Delete a data processing by `dataProcessingId`. | Empty / acknowledgement | > > ### Links > > | Instruction | Description | Returns | > | - | - | - | > | `getLinks` | Get all links (relationships) from an entity by `fromId`. | `[{ fromId, toId, type, … }]` | > | `createLink` | Create a link from `fromId` to `toId` with a `type`. | The created link | > | `deleteLink` | Delete a link by `fromId` + `toId` + `linkType`. | Empty / acknowledgement | > > ### Comments > > | Instruction | Description | Returns | > | - | - | - | > | `listComments` | List comments on an entity by `entityId`. | `[{ id, content, author, … }]` | > | `createComment` | Create a comment on `entityId` with `content` (rich-text HTML). | The created comment | > > ### Tasks > > | Instruction | Description | Returns | > | - | - | - | > | `listTasks` | List tasks assigned to the current user. | `[{ id, title, status, … }]` | > | `createTask` | Create a task on `entityId` (`title`, `description`, `type`, `assignee`, `status`). | The created task | > | `updateTask` | Update a task by `taskId` (`title`, `description`, `status`, `assignee`). | The updated task | > > > [!NOTE] > > > > `Returns` shows the shape of the operation output. > > ## DSUL Examples > > ### Discover a version, then search the catalog > > ```yaml theme={null} > - DataGalaxy.listWorkspaces: > output: workspaces > - DataGalaxy.listVersions: > workspaceId: '{{workspaces[0].id}}' > output: versions > - DataGalaxy.search: > query: customer > versionId: '{{versions[0].id}}' > limit: 20 > output: results > ``` > > ### Create a Source > > ```yaml theme={null} > - DataGalaxy.createSource: > versionId: '{{versionId}}' > name: Customer Database > type: Database > technicalName: customer_db > description: Production customer database > owners: > - alice@example.com > status: Validated > output: source > ``` > > ### Create a Structure and a Field > > ```yaml theme={null} > - DataGalaxy.createStructure: > versionId: '{{versionId}}' > parentId: '{{containerId}}' > name: customers > type: Table > output: structure > - DataGalaxy.createField: > versionId: '{{versionId}}' > structureId: '{{structure.id}}' > name: email > type: Column > columnDataType: varchar > size: 255 > output: field > ``` > > ### Link Two Entities and Comment > > ```yaml theme={null} > - DataGalaxy.createLink: > versionId: '{{versionId}}' > fromId: '{{field.id}}' > toId: '{{businessTermId}}' > type: implements > - DataGalaxy.createComment: > versionId: '{{versionId}}' > entityId: '{{field.id}}' > content:

Linked to business term.

> ``` *** ## Security The answers that hold for every connector (agent access, shared knowledge bases, credentials, models, egress) are on [Connector security](/apps-store/marketplace/connectors/security). This section lists what is specific to DataGalaxy. | Topic | DataGalaxy | | - | - | | Authentication family | Technical account or API key: one DataGalaxy integration token or personal access token (`apiKey`, the only mode), exchanged by the connector for an access token valid for two hours. DataGalaxy sees the owner of the token for every caller. | | Production modes | `apiKey` with an integration token | | Modes to avoid in production | None: the token is the only mode. Prefer an integration token to a personal access token, give it read-only rights, keep it in the workspace secrets and rotate it. | | Read-only rights | Read access only, on the DataGalaxy workspaces the agents need. | | Agent allowlist | Yes, on the tenant endpoint (empty at installation). **Allow all agents** accepts every agent. The connector has no global endpoint. | | Per-reader access control on knowledge bases | Not applicable: this connector does not feed knowledge bases. | | Outbound hosts | `api.datagalaxy.com` by default, or the **Base URL** set at installation. | | Audit events | None specific to this connector | A personal access token acts as the person who created it, with all their DataGalaxy rights, and stops working when that person leaves. An integration token is not tied to a person, which makes it the better choice for a connector shared by several agents. The connector exposes create, update and delete operations on the catalog: a read-only token makes DataGalaxy refuse them. *** ## Error Handling | HTTP Status | Error | Solution | | - | - | - | | 401 | Unauthorized | Verify the PAT / integration token and `baseUrl`. The token is exchanged server-side; an invalid token fails the exchange. | | 403 | Forbidden | Check the DataGalaxy role and scopes on the workspace version. | | 404 | Not Found | Verify `versionId`, `objectId` and any parent IDs (DoubleUuid format). | | 422 | Unprocessable | A required attribute is missing or an enum value (`type`, `status`) is invalid. | | 429 | Rate Limited | Back off and retry with exponential delay. | | 500 | Server Error | Transient DataGalaxy error; retry shortly. | ### Common Issues **"DataGalaxy not configured"**: No token could be resolved. Complete the app install with a valid token, call `configureDataGalaxy` to store one in the session, or pass an `Authorization: Bearer` header. **"DataGalaxy credentials exchange failed"**: The provided PAT / integration token was rejected when exchanging it for an access token. Re-generate the token in DataGalaxy and re-paste it in the app config; confirm the base URL points at the right region. **"The calling agent could not be identified"**: The MCP capability *Scope* does not declare `agent_id`. Set the Scope to `context_id,agent_id,user_id` on the capability. **`versionId` errors**: Most operations are scoped to a workspace version. Use the `catalog` tool's `listWorkspaces` then `listVersions` actions (or the `listWorkspaces` / `listVersions` instructions) to obtain a valid `versionId` before calling entity operations. ## External Resources > [card] [DataGalaxy API](https://apidocs.datagalaxy.com) > > Official DataGalaxy API documentation. > [card] [Tool Agents](/products/agent-factory/capabilities) > > Learn how Agent Creator agents consume MCP tools in Prisme.ai. # Excel Source: https://docs.prisme.ai/apps-store/marketplace/connectors/excel Let Agent Creator agents and Builder workflows read, write, and reshape Excel workbooks stored in OneDrive or SharePoint via Microsoft Graph ![Excel](https://mintcdn.com/prismeai/Oqq72tWGTtxufvRl/images/connectors/excel.jpg?fit=max\&auto=format\&n=Oqq72tWGTtxufvRl\&q=85\&s=114dbb0a62333877cd69cf59664ed936) The Excel connector exposes Microsoft Excel workbooks through the Microsoft Graph API. It can be consumed two ways: as a remote MCP server that **Agent Creator** agents call as tools, or as a Builder app whose instructions you call directly from DSUL. It runs in the installing workspace's own app-instance context and resolves its Microsoft credential server-side: either **Azure AD client credentials** (a service-account app accessing files across the tenant) or **delegated OAuth** (acting as a signed-in user). Agents read, write, and manipulate cells, ranges, tables, charts, named items, and pivot tables in spreadsheets hosted on OneDrive or SharePoint. > [card] Read & write cells > > Read and write cell values, formulas, and ranges with full formatting control, plus insert, clear, sort, and merge operations. > [card] Tables, charts & pivots > > Create and manipulate Excel tables, charts, named ranges, and pivot tables, including exporting a chart as an image. > [card] Functions & recalculation > > Run Excel worksheet functions and force a full workbook recalculation from an agent or automation. ## Who is this for? This connector is used by three different roles. Jump to the section that matches yours; each one is self-contained. > [card] Agent builder > > You build agents in **Agent Creator** and want them to work with Excel workbooks. → *Agent builder* tab. > [card] Platform admin > > You run the platform and want to know what one-time setup Excel needs. → *Platform admin setup* accordion below. > [card] Workspace builder > > You write Builder automations (DSUL) that call Excel instructions directly. → *Workspace builder* tab. ## Prerequisites * A **Microsoft 365 / Azure AD** tenant with the workbooks you want to reach stored in **OneDrive** or **SharePoint** (`.xlsx` files only; legacy `.xls` is not supported). * An **Azure AD application** registered in that tenant (*Azure portal > App registrations*), with a **client secret** generated for it. * **Microsoft Graph permissions** granted to the app, with **admin consent**: * `Files.Read.All`: read-only access to files. * `Files.ReadWrite.All`: read/write access to files. * `Sites.Read.All` or `Sites.ReadWrite.All`: for SharePoint-hosted files. * For **delegated OAuth** mode, the same app must have a redirect URI configured and the corresponding **delegated** permissions consented; for **client-credentials** mode, the matching **application** permissions are used. * Note the **Application (client) ID**, the **client secret value**, and the **Directory (tenant) ID**; these are pasted into the app configuration. For SharePoint files, also note the **site ID**. > [accordion] Platform admin (Governance): one-time platform setup > > > [!NOTE] > > > > **No platform-level credential.** Excel follows the **static-credential** model: each workspace pastes its own Azure AD credentials into the app configuration, and the connector resolves them server-side. There is nothing to register centrally: no shared key, no Governance OAuth auth-config JSON. > > Optionally, to let agent builders pick Excel from the capability catalog instead of pasting an MCP endpoint URL, declare it once as a named capability: > > **1. Open AI Governance > Capabilities** > > Create (or edit) an **Excel** capability. > > **2. Point it at the MCP endpoint** > > Set the capability's MCP server URL to the connector's **MCP Endpoint** (from the Excel app instance in the providing workspace), and set its **Scope** to: > > ```text theme={null} > context_id,agent_id,user_id > ``` > > The `agent_id` in the scope is what lets the connector identify the calling agent. > > **3. Make it available to agent builders** > > Once created, the capability appears in the capability picker for agent builders in your organization. Access to the catalog follows your organization's existing roles; there is no per-capability role grant for this connector. > > > [!WARNING] > > > > Declaring the capability makes the connector **available** in the picker; it does not grant any Microsoft access by itself. The actual file access is governed by the Azure AD credentials and Graph permissions configured in the workspace that runs the Excel app. *** > [tab] Agent builder (Agent Creator) > > ## Agent builder > > **Goal:** let an agent you build in Agent Creator read and write Excel workbooks through Excel MCP tools. > > > [!NOTE] > > > > Before an agent can call the connector, a *Workspace builder* must have installed and configured the Excel app with Azure AD credentials (see the *Workspace builder* tab). A *Platform admin* may also have published an **Excel** capability in the catalog (see the *Platform admin setup* accordion above). > > The connector resolves its Microsoft credential server-side; it is never exposed to the agent. Your agent is identified by the `agent_id` that Agent Creator injects through the capability *Scope*. > > **1. Get the MCP endpoint** > > From the workspace that runs the Excel app, copy the app instance's **MCP Endpoint** URL (or use the published **Excel** capability if a *Platform admin* declared one). > > **2. Add the capability to your agent** > > In your agent in Agent Creator, add a capability pointing at the **MCP Endpoint** URL, and set its **Scope** to: > > ```text theme={null} > context_id,agent_id,user_id > ``` > > The `agent_id` is what lets the connector identify the calling agent. > > **3. Add the MCP API key header** > > In the same capability, add an auth header named `mcp-api-key` whose value is the **MCP API Key** set in the Excel app configuration. Without it, every tool call is refused (see *Common Issues*). > > **4. Use it** > > Ask the agent to work with a workbook (e.g. "read A1:C10 from this sheet" or "add a row to the Sales table"). It calls the matching Excel tool, passing the file's `itemId` and, for SharePoint, its `siteId`. > > ## Brief the agent in its system prompt > > Wiring the capability is not enough: the agent must know the tools exist and how to address a file. Copy-pasteable starter: > > ```text theme={null} > You have access to the Excel MCP server (Microsoft Graph). Use it to read, write, and reshape Excel workbooks stored in OneDrive or SharePoint. > Always address a workbook by its `itemId` (the Graph drive item id). For SharePoint-hosted files, also pass `siteId` (and `driveId` if you know the specific document library). Use A1 notation for ranges (e.g. "A1:C10"). > Read with getRange / getUsedRange before writing. Write values with updateRange. Use the table tools (createTable, addTableRow, applyTableFilter) for structured data, and executeExcelFunction to evaluate formulas. Recalculate with calculateWorkbook after bulk edits. > ``` > > > [!NOTE] > > > > **Legacy AI Knowledge agents** (no native MCP picker): add the connector under **Advanced > Tools > MCP** and paste the **MCP Endpoint** URL. > > ## Available Tools > > All instructions listed in the *Workspace builder* tab are exposed as MCP tools with the same names and parameters. They are grouped below. > > ### Workbook > > | Tool | Description | > | - | - | > | `createWorkbook` | Create a new Excel workbook. | > | `calculateWorkbook` | Recalculate all formulas in the workbook. | > > ### Worksheets > > | Tool | Description | > | - | - | > | `listWorksheets` | List all worksheets in the workbook. | > | `getWorksheet` | Get worksheet details. | > | `addWorksheet` | Create a new worksheet. | > | `updateWorksheet` | Rename or reposition a worksheet. | > | `deleteWorksheet` | Delete a worksheet. | > | `getUsedRange` | Get the data-containing range of a worksheet. | > > ### Ranges > > | Tool | Description | > | - | - | > | `getRange` | Read cell values, formulas, and formatting from a range. | > | `updateRange` | Write values to cells in a range. | > | `getCell` | Read a single cell by row/column. | > | `clearRange` | Clear contents and/or formatting of a range. | > | `insertRange` | Insert cells with a shift direction. | > | `deleteRange` | Delete cells with a shift direction. | > | `sortRange` | Sort range data. | > | `mergeRange` | Merge cells in a range. | > | `unmergeRange` | Unmerge cells in a range. | > > ### Formatting > > | Tool | Description | > | - | - | > | `updateFormat` | Set alignment and text wrapping. | > | `updateFont` | Set font properties. | > | `updateFill` | Set background color. | > | `updateBorder` | Set border styles. | > | `autofitColumns` | Auto-fit column widths. | > | `autofitRows` | Auto-fit row heights. | > > ### Tables > > | Tool | Description | > | - | - | > | `listTables` | List tables in the workbook. | > | `getTable` | Get table details. | > | `createTable` | Create a table from a range. | > | `updateTable` | Update table properties. | > | `deleteTable` | Delete a table. | > | `addTableRow` | Add a row to a table. | > | `updateTableRow` | Update row values. | > | `deleteTableRow` | Delete a row. | > | `addTableColumn` | Add a column. | > | `deleteTableColumn` | Delete a column. | > | `applyTableSort` | Sort a table. | > | `applyTableFilter` | Filter a table. | > | `clearTableFilter` | Clear table filters. | > | `convertTableToRange` | Convert a table to a normal range. | > > ### Charts > > | Tool | Description | > | - | - | > | `listCharts` | List charts in a worksheet. | > | `getChart` | Get chart details. | > | `addChart` | Create a chart. | > | `updateChart` | Update chart properties. | > | `deleteChart` | Delete a chart. | > | `setChartData` | Change a chart's data source. | > | `setChartPosition` | Position a chart. | > | `getChartImage` | Export a chart as an image. | > | `updateChartTitle` | Set a chart title. | > | `updateChartLegend` | Configure a chart legend. | > > ### Named Items & Pivot Tables > > | Tool | Description | > | - | - | > | `listNamedItems` | List named ranges. | > | `getNamedItem` | Get a named item's value. | > | `addNamedItem` | Create a named range. | > | `updateNamedItem` | Update a named item. | > | `listPivotTables` | List pivot tables. | > | `getPivotTable` | Get pivot table details. | > | `refreshPivotTable` | Refresh a pivot table. | > | `refreshAllPivotTables` | Refresh all pivot tables. | > > ### Functions > > | Tool | Description | > | - | - | > | `executeExcelFunction` | Execute an Excel worksheet function and return its result. | > > ## Output Formats > > Tools accept an `outputFormat` argument that controls the MCP response shape: > > * **`verbose`** (default): a human-readable text view of the operation, optimized for LLM consumption. > * **`structured`**: machine-readable JSON in `structuredContent`. > * **`both`**: the structured payload, with its JSON also rendered as text. > > ## Tool Details > > ### getRange > > ```json theme={null} > { > "name": "getRange", > "arguments": { > "itemId": "01ABCDEF...", > "worksheetId": "Sheet1", > "address": "A1:C10" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `itemId` | Yes | Graph drive item id of the workbook. | > | `worksheetId` | Yes | Worksheet name or id. | > | `address` | Yes | Range in A1 notation (e.g. `A1:C10`). | > | `siteId` | No | SharePoint site id (for SharePoint-hosted files). | > | `driveId` | No | Specific document library / drive id. | > > ### updateRange > > ```json theme={null} > { > "name": "updateRange", > "arguments": { > "itemId": "01ABCDEF...", > "worksheetId": "Sheet1", > "address": "A1:C2", > "values": [ > ["Name", "Age", "City"], > ["John", 30, "New York"] > ] > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `itemId` | Yes | Graph drive item id of the workbook. | > | `worksheetId` | Yes | Worksheet name or id. | > | `address` | Yes | Target range in A1 notation; must match the `values` dimensions. | > | `values` | Yes | 2D array of cell values to write. | > | `siteId` / `driveId` | No | SharePoint targeting. | > > ### createTable > > ```json theme={null} > { > "name": "createTable", > "arguments": { > "itemId": "01ABCDEF...", > "worksheetId": "Sheet1", > "address": "A1:C10", > "hasHeaders": true > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `itemId` | Yes | Graph drive item id of the workbook. | > | `worksheetId` | Yes | Worksheet name or id. | > | `address` | Yes | Source range for the table in A1 notation. | > | `hasHeaders` | No | Whether the first row contains column headers. | > > ### addChart > > ```json theme={null} > { > "name": "addChart", > "arguments": { > "itemId": "01ABCDEF...", > "worksheetId": "Sheet1", > "type": "ColumnClustered", > "sourceData": "A1:C10", > "seriesBy": "Auto" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `itemId` | Yes | Graph drive item id of the workbook. | > | `worksheetId` | Yes | Worksheet name or id. | > | `type` | Yes | Chart type (e.g. `ColumnClustered`, `Line`, `Pie`). | > | `sourceData` | Yes | Range that supplies the chart data, in A1 notation. | > | `seriesBy` | No | How series are grouped: `Auto`, `Columns`, or `Rows`. | > > ### executeExcelFunction > > ```json theme={null} > { > "name": "executeExcelFunction", > "arguments": { > "itemId": "01ABCDEF...", > "functionName": "VLOOKUP", > "values": ["lookupValue", "A1:C10", 2, false] > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `itemId` | Yes | Graph drive item id of the workbook. | > | `functionName` | Yes | Excel worksheet function name (e.g. `VLOOKUP`, `SUM`). | > | `values` | Yes | Ordered argument list passed to the function. | > [tab] Workspace builder (DSUL) > > ## Workspace builder > > **Goal:** install the Excel app in a workspace, configure the Azure AD credential, and call Excel instructions from your automations. > > ## Installation > > 1. Go to **Apps** in your workspace > 2. Search for **Excel** and install it > 3. Configure the app instance with your Azure AD credentials (see *Configuration* below) > > ## Configuration > > | Field | Description | > | - | - | > | **Azure Client ID** | Azure AD Application (client) ID for Microsoft Graph. Stored as a workspace secret. | > | **Azure Client Secret** | Client secret value of the Azure AD app. Stored as a workspace secret. | > | **Azure Tenant ID** | Directory (tenant) ID (GUID). | > | **SharePoint Site ID** | Optional: default SharePoint site id for SharePoint-hosted files. | > | **Authentication Mode** | `clientCredentials` (service account, default) or `oauth` (delegated user auth). | > | **OAuth Client ID** / **OAuth Client Secret** | Azure AD OAuth app credentials, used only when **Authentication Mode** is `oauth`. | > | **MCP API Key** | Required for agents: the MCP endpoint refuses every tool call until a key is set. Choose a strong random value; agents send it in the `mcp-api-key` header (see the *Agent builder* tab). | > | **MCP Endpoint** | Auto-populated on install: the URL Agent Creator agents point a capability at (see the *Agent builder* tab). | > > The connector resolves its credential server-side based on the chosen mode: > > | Auth mode | What you provide | Best for | > | - | - | - | > | **Client credentials** (default) | Azure Client ID + Secret + Tenant ID | Service-account access to files across the tenant; server-to-server automations with no interactive sign-in. | > | **Delegated OAuth** | OAuth Client ID + Secret (plus a per-user connect flow) | Acting as a specific signed-in Microsoft user, scoped to that user's files. | > > > [!NOTE] > > > > File addressing: **OneDrive** files need only an `itemId`. **SharePoint** files need `itemId` + `siteId` (and optionally `driveId` to target a specific document library). The default `siteId` from the configuration is used when a call omits it. > > ## Available Instructions > > Every instruction resolves credentials from the workspace configuration. > > ### Workbook > > | Instruction | Description | Returns | > | - | - | - | > | `createWorkbook` | Create a new Excel workbook in OneDrive/SharePoint. | `{ itemId, name, webUrl }` | > | `calculateWorkbook` | Force a full recalculation of all formulas in the workbook (`itemId`). | Empty (HTTP 204) | > > ### Worksheets > > | Instruction | Description | Returns | > | - | - | - | > | `listWorksheets` | List all worksheets in a workbook (`itemId`). | `{ value: [{ id, name, position, visibility }] }` | > | `getWorksheet` | Get one worksheet's details by `worksheetId`. | `{ id, name, position, visibility }` | > | `addWorksheet` | Add a new worksheet; `name` optional. | `{ id, name, position }` | > | `updateWorksheet` | Rename or reposition a worksheet (`name`, `position`, `visibility`). | `{ id, name, position, visibility }` | > | `deleteWorksheet` | Delete a worksheet by `worksheetId`. | Empty (HTTP 204) | > | `getUsedRange` | Get the range that actually contains data on a worksheet. | `{ address, rowCount, columnCount, values, formulas }` | > > ### Ranges > > | Instruction | Description | Returns | > | - | - | - | > | `getRange` | Read values, formulas and formatting from `address` (A1 notation). | `{ address, rowCount, columnCount, cellCount, values, formulas, numberFormat, text }` | > | `updateRange` | Write a 2D `values` array into `address`. | `{ address, rowCount, columnCount }` | > | `getCell` | Read a single cell by `row`/`column` index. | `{ address, value, formula, text }` | > | `clearRange` | Clear contents and/or formatting of `address` (`applyTo`). | Empty (HTTP 204) | > | `insertRange` | Insert cells at `address` with a `shift` direction. | `{ address }` | > | `deleteRange` | Delete cells at `address` with a `shift` direction. | Empty (HTTP 204) | > | `sortRange` | Sort `address` by one or more `fields`. | Empty (HTTP 204) | > | `mergeRange` | Merge the cells in `address` (`across` optional). | Empty (HTTP 204) | > | `unmergeRange` | Unmerge the cells in `address`. | Empty (HTTP 204) | > > ### Formatting > > | Instruction | Description | Returns | > | - | - | - | > | `updateFormat` | Set alignment and text wrapping on `address`. | `{ address }` | > | `updateFont` | Set font `name`/`size`/`bold`/`italic`/`color` on `address`. | `{ address }` | > | `updateFill` | Set the background `color` of `address`. | `{ address }` | > | `updateBorder` | Set border `style`/`color`/`weight` on `address`. | `{ address }` | > | `autofitColumns` | Auto-fit column widths over `address`. | Empty (HTTP 204) | > | `autofitRows` | Auto-fit row heights over `address`. | Empty (HTTP 204) | > > ### Tables > > | Instruction | Description | Returns | > | - | - | - | > | `listTables` | List tables in the workbook (`itemId`). | `{ value: [{ id, name, range }] }` | > | `getTable` | Get a table's details by `tableId`. | `{ id, name, showHeaders, showTotals, style }` | > | `createTable` | Create a table from `address`; `hasHeaders` optional. | `{ id, name, range }` | > | `updateTable` | Update table properties (`name`, `showHeaders`, `style`, …). | `{ id, name, style }` | > | `deleteTable` | Delete a table by `tableId`. | Empty (HTTP 204) | > | `addTableRow` | Append a row of `values` to a table. | `{ index, values }` | > | `updateTableRow` | Update a row's `values` by `index`. | `{ index, values }` | > | `deleteTableRow` | Delete a row by `index`. | Empty (HTTP 204) | > | `addTableColumn` | Add a column (`name`, `values`) to a table. | `{ id, name, index }` | > | `deleteTableColumn` | Delete a column by id/index. | Empty (HTTP 204) | > | `applyTableSort` | Apply a sort to a table by `fields`. | Empty (HTTP 204) | > | `applyTableFilter` | Apply a column `filter` (`criterion`) to a table. | Empty (HTTP 204) | > | `clearTableFilter` | Clear the filter on a table column (or all). | Empty (HTTP 204) | > | `convertTableToRange` | Convert a table back into a normal range. | `{ address }` | > > ### Charts > > | Instruction | Description | Returns | > | - | - | - | > | `listCharts` | List charts on a worksheet. | `{ value: [{ id, name, type }] }` | > | `getChart` | Get a chart's details by `chartId`. | `{ id, name, type, height, width }` | > | `addChart` | Create a chart from `sourceData` (`type`, `seriesBy`). | `{ id, name, type }` | > | `updateChart` | Update chart properties (size, name, …). | `{ id, name }` | > | `deleteChart` | Delete a chart by `chartId`. | Empty (HTTP 204) | > | `setChartData` | Change a chart's data source (`sourceData`, `seriesBy`). | Empty (HTTP 204) | > | `setChartPosition` | Reposition a chart by anchor cells. | Empty (HTTP 204) | > | `getChartImage` | Export a chart as a base64 image (`width`/`height`). | `{ image }` (base64 PNG) | > | `updateChartTitle` | Set a chart's title text. | `{ id, title }` | > | `updateChartLegend` | Configure the chart legend (`position`, `visible`). | `{ id }` | > > ### Named Items & Pivot Tables > > | Instruction | Description | Returns | > | - | - | - | > | `listNamedItems` | List named ranges in the workbook. | `{ value: [{ name, value, scope }] }` | > | `getNamedItem` | Get a named item by `name`. | `{ name, value, type, scope }` | > | `addNamedItem` | Create a named range (`name`, `reference`). | `{ name, value, scope }` | > | `updateNamedItem` | Update a named item's reference/visibility. | `{ name, value }` | > | `listPivotTables` | List pivot tables on a worksheet. | `{ value: [{ id, name }] }` | > | `getPivotTable` | Get a pivot table's details by id. | `{ id, name }` | > | `refreshPivotTable` | Refresh one pivot table. | Empty (HTTP 204) | > | `refreshAllPivotTables` | Refresh every pivot table in the workbook. | Empty (HTTP 204) | > > ### Functions > > | Instruction | Description | Returns | > | - | - | - | > | `executeExcelFunction` | Evaluate an Excel worksheet function: `functionName` + ordered `values`. | `{ value, error }` | > > > [!NOTE] > > > > `Returns` shows the shape of the operation output. Mutating operations that the Graph API answers with `204 No Content` return an empty body. > > ## DSUL Examples > > ### Read a range > > ```yaml theme={null} > - Excel.getRange: > itemId: "01ABCDEF..." > worksheetId: Sheet1 > address: "A1:C10" > output: data > ``` > > ### Read a SharePoint-hosted range > > ```yaml theme={null} > - Excel.getRange: > itemId: "01ABCDEF..." > siteId: "contoso.sharepoint.com,abc-123,def-456" > worksheetId: Sheet1 > address: "A1:C10" > output: data > ``` > > ### Write values > > ```yaml theme={null} > - Excel.updateRange: > itemId: "01ABCDEF..." > worksheetId: Sheet1 > address: "A1:C2" > values: > - ["Name", "Age", "City"] > - ["John", 30, "New York"] > output: result > ``` > > ### Create a table from a range > > ```yaml theme={null} > - Excel.createTable: > itemId: "01ABCDEF..." > worksheetId: Sheet1 > address: "A1:C10" > hasHeaders: true > output: table > ``` > > ### Append a row, then recalculate > > ```yaml theme={null} > - Excel.addTableRow: > itemId: "01ABCDEF..." > tableId: "{{table.id}}" > values: > - ["Jane", 28, "Paris"] > output: row > - Excel.calculateWorkbook: > itemId: "01ABCDEF..." > output: recalc > ``` *** ## Security The answers that hold for every connector (agent access, shared knowledge bases, credentials, models, egress) are on [Connector security](/apps-store/marketplace/connectors/security). This section lists what is specific to Excel. | Topic | Excel | | - | - | | Authentication family | Application (Microsoft Entra client credentials) by default. A delegated OAuth mode (`oauth`) lets each user connect their own Microsoft 365 account. | | Production modes | `oauth` | | Modes to avoid in production | `clientCredentials` (the default) acts as the application, not as the user: avoid it when per-user permissions are required. | | Read-only scopes | None offered. The delegated connection requests `Files.ReadWrite.All` and `Sites.ReadWrite.All`, and `clientCredentials` requests `https://graph.microsoft.com/.default`, which carries the application permissions consented on the Entra application registration. | | Agent allowlist | No: access is controlled by installing the connector and by its API key. | | Per-reader access control on knowledge bases | Not applicable: this connector does not feed knowledge bases. | | Outbound hosts | `graph.microsoft.com`, `login.microsoftonline.com` | | Audit events | None specific to this connector | Since the connector requests no read-only scope, restrict what it can do on the Entra application registration: for read-only use, consent only `Files.Read.All`, plus `Sites.Read.All` for SharePoint workbooks. In `clientCredentials` mode, these permissions reach every workbook of the tenant, whoever uses the agent. *** ## Error Handling | HTTP Status | Error | Solution | | - | - | - | | 401 | Unauthorized | Azure credentials are missing, invalid, or expired; reconfigure the app and re-check the client secret. | | 403 | Forbidden | The Azure AD app lacks the required Microsoft Graph permissions, or admin consent was not granted. | | 404 | Not Found | Verify the `itemId` (and `siteId`/`driveId` for SharePoint); the workbook, worksheet, or range does not exist. | | 423 | Locked | The file is open in a desktop Office app; close it or wait for auto-save. | | 429 | Rate Limited | Microsoft Graph throttled the request; back off and retry, honoring the `Retry-After` header. | | 500 / 503 | Service error | Transient Microsoft Graph error; retry shortly. | ### Common Issues **"API key not configured. Generate one from the API Key page."**: The Excel app configuration has no **MCP API Key**, so the MCP endpoint refuses every tool call. A *Workspace builder* sets the key in the Excel app configuration, then the agent's capability sends it in the `mcp-api-key` header. Retry the request from the agent. **"Missing mcp-api-key header"** or **"Invalid mcp-api-key"**: A key is configured, but the agent's capability does not send it, or sends a different value. Set the `mcp-api-key` auth header of the capability to the exact **MCP API Key** value, save the agent, and retry. **"Missing Azure credentials"**: The app configuration has no `clientId` / `clientSecret` / `tenant`. Open the Excel app instance and paste your Azure AD application credentials, then re-run. **"OAuth authentication required. Please connect your Microsoft account first"**: Authentication Mode is set to `oauth` but no delegated token exists yet for the user. Complete the Microsoft connect flow before calling Excel tools, or switch the mode to `clientCredentials`. **"Client credentials auth failed"**: Azure AD rejected the client-credentials token request (wrong tenant id, expired or wrong client secret, or the app lacks application permissions). Re-check the credential values and the granted Graph permissions. **"File is locked"**: The workbook is open in the desktop Excel application. Close it or wait for auto-save to release the lock. **"Invalid range address"**: Use A1 notation (e.g. `A1:C10`), not numeric row/column indices. **".xls not supported"**: Only `.xlsx` workbooks are supported by the Graph workbook API. Convert legacy `.xls` files to `.xlsx` first. > [!NOTE] > > Microsoft Graph caps workbook requests at roughly 5 million cells per call and a 25 MB file size; split very large ranges into smaller calls to avoid `429`/oversize errors. ## External Resources > [card] [Microsoft Graph Excel API](https://learn.microsoft.com/en-us/graph/api/resources/excel) > > Official reference for the Microsoft Graph workbook (Excel) API. > [card] [Excel API best practices](https://learn.microsoft.com/en-us/graph/workbook-best-practice) > > Performance and session guidance for the Graph workbook API. > [card] [Graph Explorer](https://developer.microsoft.com/en-us/graph/graph-explorer) > > Test Microsoft Graph calls interactively against your tenant. > [card] [Tool Agents](/products/agent-factory/capabilities) > > Learn how Agent Creator agents consume MCP tools in Prisme.ai. # Figma Source: https://docs.prisme.ai/apps-store/marketplace/connectors/figma Let Agent Creator agents read Figma files, comments, components, styles and library data through MCP, with per-user OAuth resolved server-side ![Figma](https://mintcdn.com/prismeai/Oqq72tWGTtxufvRl/images/connectors/figma.svg?fit=max\&auto=format\&n=Oqq72tWGTtxufvRl\&q=85\&s=89bf5dffb8b5e05c8eb155103aa7340d) The Figma connector exposes the [Figma](https://www.figma.com) design platform REST API to **Agent Creator** agents (through MCP) and to Builder automations (through the `Figma.op:` App instructions), covering files, nodes, rendered images, comments, projects, components, styles, webhooks, variables, dev resources and library analytics. The 46 Figma operations are grouped into **13 entity tools**, each driven by an `action` argument. The MCP server runs in the **tenant app-instance context**: it resolves the installing workspace's own credentials and authorizes the calling agent against that workspace's allowlist. Authentication is per-user and supports several modes: * **Per-user OAuth2, central client** (`oauthCentral`, recommended): one Figma OAuth application is registered once by the platform maintainer; every end user signs in with their own Figma account. Nothing to register per workspace: each one just installs the app and clicks *Connect*. * **Per-user OAuth2, tenant client** (`oauth`): paste your own Figma OAuth client ID/secret in the connector config app. Each user signs in with their own account against your client (authorization-code + PKCE flow). * **Direct access token** (`accessToken`): a caller-managed Figma token (e.g. a Personal Access Token), used as-is with no exchange. > [card] Design Files > > Files, nodes, rendered images, version history, components and styles > [card] Collaboration > > Comments, reactions, dev resources, webhooks and library analytics > [card] Per-user auth > > Per-user OAuth (central or tenant client) resolved server-side, or a direct access token ## Who is this for? This connector is used by three different roles. Jump to the section that matches yours; each one is self-contained. > [card] Agent builder > > You build agents in **Agent Creator** and want them to use Figma. → *Agent builder* tab. > [card] Platform admin > > You run the platform and set up the shared Figma OAuth client once for everyone. → *Platform admin setup* accordion below. > [card] Workspace builder > > You write Builder automations (DSUL) that call Figma operations directly. → *Workspace builder* tab. ## Prerequisites * A **Figma** account. * For the **OAuth modes**: a Figma OAuth application created at **Figma > Developers > My apps** (`https://www.figma.com/developers/apps`); copy its Client ID and Client Secret. The platform maintainer registers one app for the central mode; a workspace can also register its own for the tenant mode. * For the **access-token mode**: a Personal Access Token created at **Figma > Settings > Security > Personal access tokens** (`https://www.figma.com/developers/api#access-tokens`) with the scopes the operations you call require. * The default OAuth scopes requested are: ```text theme={null} current_user:read file_content:read file_metadata:read file_versions:read file_comments:read projects:read ``` Add `file_variables:read` / `file_variables:write` (variables), `library_analytics:read` (library analytics) or `org:activity_log_read` (activity logs, Enterprise) when your agents need those endpoints. * Base URL: `https://api.figma.com` (paths already include `/v1` or `/v2`). > [!NOTE] > > Figma variables, dev resources and library analytics are gated by plan tier (Enterprise / Organization). The connector exposes them, but the Figma API returns `403` if your account or token is not entitled. > [accordion] Platform admin (Governance): one-time platform setup > > **Goal:** two one-time tasks: (1) configure the shared **central OAuth client** so every workspace lets its users sign in with their own Figma account, and (2) optionally expose Figma as a reusable **capability** in AI Governance so agent builders can pick it without pasting endpoint URLs. Throughout, `` is your environment's API URL (`https://api.studio.prisme.ai/v2` on production). > > ## 1. Configure the connector > > **1. Register the OAuth application at Figma** > > Open `https://www.figma.com/developers/apps` and create a new app. Set the single authorized redirect URI (callback URL) to the **core workspace** callback: > > ```text theme={null} > /workspaces/slug:figma/webhooks/oauthCallback > ``` > > (e.g. `https://api.studio.prisme.ai/v2/workspaces/slug:figma/webhooks/oauthCallback` on production). Add the scopes listed in *Prerequisites*. Save and copy the **Client ID** and **Client Secret** (the secret is shown only once). > > **2. Enter the credentials through the configuration app** > > Open the central `figma` workspace and launch its **Configuration app** at `/apps/figma` (e.g. `https://studio.prisme.ai/apps/figma`). Loaded from the core workspace, the app shows the **maintainer view** (org owner / editor / admin only); paste the **Client ID** and **Client Secret** there and Save; the app stores them in the core workspace's secrets for you. Do not edit Studio's raw Secrets by hand. These credentials stay in the `figma` workspace and are never exposed to tenants or end users; token exchange is proxied through the core `centralTokenExchange` webhook so the client secret never leaves the core workspace. > > **3. Tell workspaces to use the central client** > > Each consuming workspace selects auth mode **`oauthCentral`** in the connector configuration app (no client id/secret to enter on their side). Their users then just click **Connect**. > > **4. (Optional) Publish to the Capabilities catalog** > > From that same maintainer view, the **Add to catalog** button publishes Figma to the org-wide **Capabilities catalog** in one click (org owner / admin only; it stays disabled until the central client is saved). Once published, every agent builder in the org can enable Figma from the catalog without pasting an endpoint; see *Option A* in the *Agent builder* tab. > > ## 2. Declare the capability in AI Governance > > As an alternative to (or in addition to) the catalog button, you can declare Figma as a named **capability** in AI Governance. Agent builders then enable that capability on their agents instead of pasting a raw MCP endpoint. > > **1. Open AI Governance > Capabilities** > > Create (or edit) the **Figma** capability. > > **2. Point it at the MCP endpoint** > > Set the capability's MCP server URL to the connector's **MCP Endpoint**, and set its **Scope** to: > > ```text theme={null} > context_id,agent_id,user_id > ``` > > The `agent_id` in the scope is what lets the connector identify and authorize the calling agent. > > **3. Make it available to agent builders** > > Once created, the capability appears in the capability picker for agent builders in your organization, who enable it on their agents. Access to the catalog follows your organization's existing roles; there is no per-capability role grant. > > **4. Smoke-test** > > From an agent that has the capability, in a workspace configured for `oauthCentral`, trigger any tool (e.g. `users` with `action: "getMe"`). The user is prompted to connect once (Figma sign-in); subsequent calls reuse the stored token transparently and refresh it automatically. > > > [!WARNING] > > > > Declaring the capability makes the connector **available**; it does not by itself authorize a specific agent. This connector follows the **tenant-context model**: which agents may actually call it is gated per-workspace by the **authorized-agents allowlist** in the configuration app (see the *Workspace builder* tab). Agents show a **Connect** button only if the catalog entry carries the connector's connect / status / disconnect webhooks in its `auth` block. The configuration app's **Add to catalog** button writes it for you. If you create the entry by hand, paste that block into **Auth Configuration**: the platform adds it later on its own only for a workspace endpoint (ending in `.mcp`), never for the connector's global `/webhooks/mcp` endpoint. *** > [tab] Agent builder (Agent Creator) > > ## Agent builder > > **Goal:** let an agent you build in Agent Creator use Figma through MCP tools. > > > [!NOTE] > > > > Before an agent can call the connector, a *Workspace builder* must have installed and configured the Figma app in a workspace (see the *Workspace builder* tab), and, for the central OAuth mode, a *Platform admin* must have provisioned the shared OAuth client (see the *Platform admin setup* accordion above). > > This connector runs in the **tenant app-instance context**: your agent is authorized two ways at once: it is identified by the `agent_id` that Agent Creator injects through the capability *Scope*, and that agent must appear in the connector's **authorized-agents allowlist** (managed in the configuration app). The Figma access token itself is resolved server-side from the configured auth mode. > > There are two ways to wire it up. Pick based on how much isolation you need. > > ## Option A: Enable the shared capability from the catalog > > The fastest path: a *Platform admin* has already published a **Figma** capability to the Capabilities catalog (see the *Platform admin setup* accordion above: the **Add to catalog** button, or §2), so you just pick it from the catalog. > > **1. Open your agent in Agent Creator** > > Open the agent you want to extend and go to its capabilities / tools. > > **2. Add the Figma capability** > > Browse the capability catalog, select **Figma**, and enable it. The MCP endpoint URL and the *Scope* (`context_id,agent_id,user_id`) are already wired by the admin; nothing to paste, and the shared instance accepts every agent, so there is no allowlist step on your side. > > **3. Connect a Figma account** > > On the first tool call, an unconnected user is prompted to sign in; Agent Creator surfaces a `connect_url` to Figma's authorization page. After sign-in the per-user token is stored and reused on subsequent calls. > > > [!NOTE] > > > > Convenient, but your agent runs against a **shared, platform-managed instance**: its Figma credentials are owned by someone else and the instance accepts every agent that is granted the capability. Prefer Option B for anything beyond quick experiments. > > ## Option B: Run it from your own workspace (recommended) > > For production agents, install the connector in **your own workspace** and point the agent at *that* workspace's MCP endpoint. > > > [!WARNING] > > > > **Prefer this mode for security.** Because the MCP runs in *your* app-instance context, the Figma credentials, the per-user OAuth tokens and the authorized-agents allowlist are all **scoped to your workspace**, not shared platform-wide. You decide exactly which agents may call it and which Figma account / auth mode backs them, and a misconfiguration elsewhere can never expose your data. The shared catalog capability (Option A) is a broad surface many agents can reach; your own workspace is an isolated, least-privilege boundary. > > **1. Install and configure the connector in your workspace** > > Follow the *Workspace builder* tab: install **Figma** in your workspace, open its **Configuration app**, choose the auth mode and connect a Figma account. > > **2. Allowlist your agent** > > In that workspace's config app, open **Authorized agents** and tick your agent (the **Install capability** button does this for you), or enable **Allow all agents**. > > **3. Add the MCP capability to your agent** > > In your agent, add a capability pointing at **your workspace's MCP Endpoint** URL, and set its **Scope** to: > > ```text theme={null} > context_id,agent_id,user_id > ``` > > The `agent_id` is what lets the connector identify and authorize your agent; without it, every call is rejected with an explicit "agent could not be identified" message. This *Scope* is separate from the Figma OAuth scopes. > > **4. Connect a Figma account** > > On the first tool call, the user is prompted to sign in (or uses **Connect** in the config app). The per-user token is stored and reused; refresh is automatic. > > ## Brief the agent in its system prompt > > Whichever option you pick, wiring the capability is not enough: the agent must know the connector exists and when to reach for it. Add a short paragraph to the agent's system prompt. Copy-pasteable starter: > > ```text theme={null} > You have access to the Figma MCP server. Use it whenever the user asks about Figma content: files, nodes, rendered images, comments, projects, components, styles, webhooks, variables or library analytics. Examples: "Summarize the comments on this Figma file", "Render the hero frame as a PNG", "List the published components in our design system". Each tool is an entity that takes an `action` argument. Prefer calling tools over guessing, and confirm with the user before any destructive action (delete a comment, delete a webhook, modify variables). > ``` > > Refine the trigger keywords (file keys, team names, component conventions) so the agent reliably picks up the right intent in your context. > > > [!NOTE] > > > > **Legacy AI Knowledge agents** (no native MCP picker): add the connector under **Advanced > Tools > MCP** and paste the **MCP Endpoint** URL. The agent still has to be allowlisted in the config app and its identity propagated so the connector can read its `agent_id`. > > > [!NOTE] > > > > **Read-only by design.** Figma tools are read-only: the connector requests only `*:read` scopes (`current_user:read file_content:read file_metadata:read file_versions:read file_comments:read projects:read`) and exposes no write operation. Write-capable scopes (e.g. `file_variables:write`) are never obtained unless you explicitly add them to the **Scopes** field in the configuration app. No action is needed to keep this connector least-privilege. > > ## Available Tools > > Each tool is an entity. Pass the `action` argument to select the operation, plus the parameters that operation needs. > > | Tool | Actions | Description | > | - | - | - | > | `files` | `get`, `getNodes`, `getMeta`, `getVersions` | Figma files: read document JSON, nodes, metadata and version history. | > | `images` | `render`, `getFills` | Render images of Figma nodes and fetch image-fill download links. | > | `comments` | `list`, `create`, `delete`, `listReactions`, `addReaction`, `deleteReaction` | Comments and comment reactions on a Figma file. | > | `projects` | `listByTeam`, `listFiles` | Figma team projects and the files they contain. | > | `components` | `listByTeam`, `listByFile`, `get`, `listSetsByTeam`, `listSetsByFile`, `getSet` | Published components and component sets (file- or team-level). | > | `styles` | `listByTeam`, `listByFile`, `get` | Published styles (file- or team-level). | > | `users` | `getMe` | The authenticated Figma user. | > | `webhooks` | `list`, `create`, `get`, `update`, `delete`, `listByTeam`, `getRequests` | Figma webhooks v2: subscribe to file and library events. | > | `variables` | `getLocal`, `getPublished`, `modify` | Figma variables (Enterprise): local, published and bulk modify. | > | `devResources` | `list`, `create`, `update`, `delete` | Dev resources (Dev Mode links) attached to files. | > | `analytics` | `componentActions`, `componentUsages`, `styleActions`, `styleUsages`, `variableActions`, `variableUsages` | Library analytics: component, style and variable actions and usages. | > | `activityLogs` | `list` | Organization activity logs (Enterprise / org-scoped token). | > | `embed` | `get` | oEmbed metadata for a public Figma URL. | > > ## Output Formats > > Every tool accepts an `outputFormat` parameter that controls the MCP response shape: > > * **`verbose`** (default): human-readable text for LLM consumption > * **`structured`**: machine-readable JSON in `structuredContent` > * **`both`**: both text and structured content > > ## Tool Details > > ### files > > Read document data for a file. The `action` selects what to return. > > ```json theme={null} > { > "name": "files", > "arguments": { > "action": "get", > "file_key": "omLm4Pdg2a3BzTKU8EcDo7", > "depth": 1 > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | `get`, `getNodes`, `getMeta` or `getVersions` | > | `file_key` | Yes | File key from the Figma file URL (`figma.com/design//...`) | > | `ids` | For `getNodes` | Comma-separated node ids | > | `depth` | No | Tree traversal depth (limits the document JSON size) | > | `version` | No | Specific file version id (defaults to current) | > | `geometry` | No | Set to `paths` to export vector geometry | > > ### comments > > List, create and delete comments and reactions on a file. > > ```json theme={null} > { > "name": "comments", > "arguments": { > "action": "create", > "file_key": "omLm4Pdg2a3BzTKU8EcDo7", > "message": "Please review the updated hero section." > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | `list`, `create`, `delete`, `listReactions`, `addReaction`, `deleteReaction` | > | `file_key` | Yes | Target file key | > | `message` | For `create` | Comment text | > | `comment_id` | For `delete` / reactions / a reply | Target comment id | > | `emoji` | For `addReaction` / `deleteReaction` | Emoji shortcode, e.g. `:eyes:` | > | `client_meta` | No | Pin location for the comment (`{x, y}` vector or frame offset) | > > ### images > > Render nodes as images, or fetch the download links of a file's image fills. > > ```json theme={null} > { > "name": "images", > "arguments": { > "action": "render", > "file_key": "omLm4Pdg2a3BzTKU8EcDo7", > "ids": "1:23,1:45", > "format": "png", > "scale": 2 > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | `render` or `getFills` | > | `file_key` | Yes | Target file key | > | `ids` | For `render` | Comma-separated node ids to render | > | `format` | No | `jpg`, `png`, `svg` or `pdf` | > | `scale` | No | Render scale, `0.01`-`4` | > > ### webhooks > > Manage Figma v2 webhooks subscribing to file and library events. > > ```json theme={null} > { > "name": "webhooks", > "arguments": { > "action": "create", > "event_type": "FILE_UPDATE", > "context": "file", > "context_id": "omLm4Pdg2a3BzTKU8EcDo7", > "endpoint": "https://example.com/figma-hook", > "passcode": "a-shared-secret" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | `list`, `create`, `get`, `update`, `delete`, `listByTeam`, `getRequests` | > | `event_type` | For `create` | e.g. `FILE_UPDATE`, `FILE_COMMENT`, `LIBRARY_PUBLISH` | > | `endpoint` | For `create` | HTTPS endpoint that receives webhook events | > | `passcode` | For `create` | Shared secret sent with each event | > | `context` / `context_id` | No | Scope the webhook to a `team`, `project` or `file` | > | `webhook_id` | For `get` / `update` / `delete` / `getRequests` | Target webhook id | > > ### components > > Browse published components and component sets at file or team level. > > ```json theme={null} > { > "name": "components", > "arguments": { > "action": "listByTeam", > "team_id": "1303310645528056530" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | `listByTeam`, `listByFile`, `get`, `listSetsByTeam`, `listSetsByFile`, `getSet` | > | `team_id` | For team-level actions | Figma team id | > | `file_key` | For file-level actions | Target file key | > | `key` | For `get` / `getSet` | Published component / component set key | > [tab] Workspace builder (DSUL) > > ## Workspace builder > > **Goal:** install the connector in a workspace, configure authentication and the agent allowlist, and call Figma operations from your automations. > > ## Installation > > 1. Go to **Apps** in your workspace > 2. Search for **Figma** and install it > 3. Open the **Configuration app** (the link auto-populated on install) to choose the auth mode, provide credentials, connect a Figma account, and allow the agents that may call the connector > > ## Configuration > > | Field | Description | > | - | - | > | **Configuration app** | Auto-populated on install; open this link to configure authentication (mode + credentials), connect a Figma account (OAuth modes), and manage the authorized-agents allowlist. | > > The configuration app drives everything; the app instance itself has no per-field credential form. From it you pick one of: > > | Auth mode | What you provide | Best for | > | - | - | - | > | `oauthCentral` | Nothing; just click **Connect** | Workspaces on a platform where the maintainer set up the central Figma client | > | `oauth` | Your own Figma **Client ID + Secret** (redirect URI shown in the config app: `/workspaces/slug:/webhooks/.oauthCallback`) | You manage your own Figma OAuth app | > | `accessToken` | A pre-minted Figma **access token** / Personal Access Token | Short-lived or caller-managed tokens | > > > [!NOTE] > > > > Credentials are stored in the workspace's Secrets (`figmaAuth`) and resolved server-side. The agent allowlist (**Authorized agents**, secret `figmaAuthorizedAgents`) gates which Agent Creator agents may call the MCP endpoint; see the *Agent builder* tab. Builder automations calling `Figma.op:` instructions resolve the same workspace credentials. > > ## Available Instructions > > Every instruction resolves credentials from the workspace configuration. The MCP server exposes the same operations behind the 13 entity tools (see the *Agent builder* tab). > > ### Files > > | Instruction | Description | Returns | > | - | - | - | > | `getFile` | Get the document JSON for a file by `file_key` (nodes, layers, styles); narrow with `ids`, `depth`, `geometry`, `version` | `{ document, components, styles, name, lastModified, version }` | > | `getFileNodes` | Get JSON for specific nodes of a file by `file_key` + `ids` | `{ nodes: { : { document, components } } }` | > | `getFileMeta` | Get metadata for a file by `file_key` (name, role, last touched, editor type) | `{ file: { name, role, last_touched_at, editorType } }` | > | `getFileVersions` | List the version history of a file by `file_key`; paginate with `page_size`, `before`, `after` | `{ versions: [{ id, created_at, label, user }], pagination }` | > > ### Images > > | Instruction | Description | Returns | > | - | - | - | > | `getImages` | Render nodes of a file by `file_key` + `ids` as `png`/`jpg`/`svg`/`pdf` at `scale` | `{ images: { : }, err }` | > | `getImageFills` | Get download links for all image fills present in a file by `file_key` | `{ images: { : } }` | > > ### Comments > > | Instruction | Description | Returns | > | - | - | - | > | `getComments` | List all comments on a file by `file_key`; `as_md` returns Markdown text | `{ comments: [{ id, message, user, created_at }] }` | > | `postComment` | Post a comment (or reply via `comment_id`) on `file_key` with `message`; `client_meta` pins it | `{ id, message, user, created_at }` | > | `deleteComment` | Delete a comment from `file_key` by `comment_id` | Empty (HTTP 200) | > | `getCommentReactions` | List reactions on a comment by `file_key` + `comment_id`; paginate with `cursor` | `{ reactions: [{ emoji, user }], pagination }` | > | `postCommentReaction` | Add a reaction `emoji` to a comment by `file_key` + `comment_id` | Empty (HTTP 200) | > | `deleteCommentReaction` | Remove a reaction `emoji` from a comment by `file_key` + `comment_id` | Empty (HTTP 200) | > > ### Projects > > | Instruction | Description | Returns | > | - | - | - | > | `getTeamProjects` | List all projects within a team by `team_id` | `{ name, projects: [{ id, name }] }` | > | `getProjectFiles` | List all files within a project by `project_id`; `branch_data` includes branch metadata | `{ name, files: [{ key, name, last_modified, thumbnail_url }] }` | > > ### Components > > | Instruction | Description | Returns | > | - | - | - | > | `getTeamComponents` | List published components in a team library by `team_id`; paginate with `page_size`, `after`, `before` | `{ components: [{ key, name, description }], cursor }` | > | `getFileComponents` | List published components within a file by `file_key` | `{ components: [{ key, name, node_id }] }` | > | `getComponent` | Get metadata for a published component by `key` | `{ component: { key, name, description } }` | > | `getTeamComponentSets` | List published component sets in a team library by `team_id`; paginate with `page_size`, `after`, `before` | `{ component_sets: [{ key, name }], cursor }` | > | `getFileComponentSets` | List published component sets within a file by `file_key` | `{ component_sets: [{ key, name }] }` | > | `getComponentSet` | Get metadata for a published component set by `key` | `{ component_set: { key, name } }` | > > ### Styles > > | Instruction | Description | Returns | > | - | - | - | > | `getTeamStyles` | List published styles in a team library by `team_id`; paginate with `page_size`, `after`, `before` | `{ styles: [{ key, name, style_type }], cursor }` | > | `getFileStyles` | List published styles within a file by `file_key` | `{ styles: [{ key, name, style_type }] }` | > | `getStyle` | Get metadata for a published style by `key` | `{ style: { key, name, style_type } }` | > > ### Users > > | Instruction | Description | Returns | > | - | - | - | > | `getMe` | Get the authenticated Figma user's profile | `{ id, email, handle, img_url }` | > > ### Webhooks > > | Instruction | Description | Returns | > | - | - | - | > | `getWebhooks` | List webhooks filtered by `context` / `context_id` / `plan_api_id`; paginate with `cursor` | `{ webhooks: [{ id, event_type, endpoint, status }] }` | > | `postWebhook` | Create a webhook for `event_type` posting to `endpoint` with `passcode`; scope via `team_id` / `context` / `context_id` | `{ id, event_type, endpoint, status }` | > | `getWebhook` | Get a webhook by `webhook_id` | `{ id, event_type, endpoint, status }` | > | `putWebhook` | Update a webhook by `webhook_id` (`event_type`, `endpoint`, `passcode`, `status`, `description`) | `{ id, event_type, endpoint, status }` | > | `deleteWebhook` | Delete a webhook by `webhook_id` | Empty (HTTP 200) | > | `getTeamWebhooks` | List webhooks for a team by `team_id` | `{ webhooks: [{ id, event_type, endpoint }] }` | > | `getWebhookRequests` | List recent delivery attempts for a webhook by `webhook_id` | `{ requests: [{ request_info, response_info }] }` | > > ### Variables > > | Instruction | Description | Returns | > | - | - | - | > | `getLocalVariables` | Get local variables of a file by `file_key` (Enterprise) | `{ meta: { variables, variableCollections } }` | > | `getPublishedVariables` | Get published variables of a file by `file_key` (Enterprise) | `{ meta: { variables, variableCollections } }` | > | `postVariables` | Create / update / delete variables in `file_key` via `variableCollections`, `variableModes`, `variables`, `variableModeValues` (Enterprise) | `{ meta: { tempIdToRealId } }` | > > ### Dev Resources > > | Instruction | Description | Returns | > | - | - | - | > | `getDevResources` | List dev resources of a file by `file_key`; filter with `node_ids` | `{ dev_resources: [{ id, name, url, node_id }] }` | > | `postDevResources` | Create dev resources across files; `dev_resources` = `[{ name, url, file_key, node_id }]` | `{ links_created, errors }` | > | `putDevResources` | Update existing dev resources; `dev_resources` = `[{ id, name, url }]` | `{ links_updated, errors }` | > | `deleteDevResource` | Delete a dev resource from `file_key` by `dev_resource_id` | Empty (HTTP 204) | > > ### Library Analytics > > | Instruction | Description | Returns | > | - | - | - | > | `getLibraryAnalyticsComponentActions` | Component action data for a library file by `file_key` + `group_by`; date range `start_date` / `end_date`, paginate with `cursor` | `{ rows: [...], next_page, cursor }` | > | `getLibraryAnalyticsComponentUsages` | Component usage data for a library file by `file_key` + `group_by`; paginate with `cursor` | `{ rows: [...], next_page, cursor }` | > | `getLibraryAnalyticsStyleActions` | Style action data for a library file by `file_key` + `group_by`; date range `start_date` / `end_date` | `{ rows: [...], next_page, cursor }` | > | `getLibraryAnalyticsStyleUsages` | Style usage data for a library file by `file_key` + `group_by` | `{ rows: [...], next_page, cursor }` | > | `getLibraryAnalyticsVariableActions` | Variable action data for a library file by `file_key` + `group_by`; date range `start_date` / `end_date` | `{ rows: [...], next_page, cursor }` | > | `getLibraryAnalyticsVariableUsages` | Variable usage data for a library file by `file_key` + `group_by` | `{ rows: [...], next_page, cursor }` | > > ### Activity Logs > > | Instruction | Description | Returns | > | - | - | - | > | `getActivityLogs` | Query organization activity logs (Enterprise / org-scoped OAuth token); filter by `events`, `start_time`, `end_time`, `limit`, `order` | `{ activity_logs: [...], next_page, cursor }` | > > ### Embed > > | Instruction | Description | Returns | > | - | - | - | > | `getOEmbed` | Get oEmbed data for a public Figma file/prototype `url`; size with `maxwidth`, `maxheight` | `{ type, title, html, thumbnail_url }` | > > > [!NOTE] > > > > `Returns` shows the shape of the operation output (the underlying Figma API resource). > > ## DSUL Examples > > ### Read a file's metadata > > ```yaml theme={null} > - Figma.getFileMeta: > file_key: '{{fileKey}}' > output: meta > ``` > > ### Post a comment on a file > > ```yaml theme={null} > - Figma.postComment: > file_key: '{{fileKey}}' > message: Please review the updated hero section. > output: comment > ``` > > ### Render PNGs of selected nodes > > ```yaml theme={null} > - Figma.getFile: > file_key: '{{fileKey}}' > depth: 1 > output: file > - Figma.getImages: > file_key: '{{fileKey}}' > ids: '1:23,1:45' > format: png > scale: 2 > output: renders > ``` > > ### Subscribe to file updates with a webhook > > ```yaml theme={null} > - Figma.postWebhook: > event_type: FILE_UPDATE > context: file > context_id: '{{fileKey}}' > endpoint: 'https://example.com/figma-hook' > passcode: '{{webhookSecret}}' > output: webhook > ``` *** ## Security The answers that hold for every connector (agent access, shared knowledge bases, credentials, models, egress) are on [Connector security](/apps-store/marketplace/connectors/security). This section lists what is specific to Figma. | Topic | Figma | | - | - | | Authentication family | Delegated OAuth (Figma, authorization code with PKCE): each user connects their own Figma account. | | Production modes | `oauthCentral` or `oauth` | | Modes to avoid in production | `accessToken` (testing only: a personal access token can be long-lived, and every caller acts as its owner) | | Read-only scopes | `current_user:read`, `file_content:read`, `file_metadata:read`, `file_versions:read`, `file_comments:read`, `projects:read`. These are also the default scopes. | | Agent allowlist | Yes, on the tenant endpoint (empty at installation). The global endpoint accepts every agent. | | Per-reader access control on knowledge bases | Not applicable: this connector does not feed knowledge bases. | | Outbound hosts | `api.figma.com` | | Audit events | None specific to this connector | The default scopes are read-only, so in the OAuth modes Figma itself refuses the write operations (comments, reactions, webhooks, variables, dev resources). In `accessToken` mode, the token carries the scopes chosen when it was created in Figma: create it with read scopes and an expiry date if you use it for testing. *** ## Error Handling | HTTP Status | Error | Solution | | - | - | - | | 400 | Bad request | Check argument shapes (node ids, dates, enum values) | | 401 | Unauthorized | Sign in again (OAuth modes), or verify the access token | | 403 | Forbidden | The token lacks the required scope or plan entitlement; Figma names the missing scope in the error message | | 404 | Not Found | Verify the `file_key`, `team_id`, `project_id` or resource id | | 429 | Rate Limited | Figma throttles per token; back off and retry | | 500 | Server Error | Transient Figma issue; retry after a few seconds | ### Common Issues **"This agent is not authorized to use this connector"**: The calling agent is not in the allowlist. Open the configuration app → **Authorized agents** → tick this agent (id is shown in the error) or enable **Allow all agents**, and Save. The **Install capability** button does this for you. **"The calling agent could not be identified"**: The MCP capability *Scope* does not declare `agent_id`, so Agent Creator never injects the agent identity. Set the Scope to `context_id,agent_id,user_id` on the capability (this is separate from the Figma OAuth scopes), then allow the agent in the config app. **"Figma is not connected for this user"**: No per-user OAuth token is stored for the caller. Open the configuration app (OAuth mode) and click **Connect**, or use the agent's connect flow. **"Figma token refresh failed … must reconnect"**: The stored refresh token was rejected by Figma (revoked / expired). The connection is dropped automatically; the user must reconnect from the config app. **"Figma OAuth is not configured"**: Neither a tenant OAuth client nor the central platform client is available. Set the OAuth client ID/secret in the config app (tenant mode), or ask the platform maintainer to provision the central OAuth client from the core workspace's config app. **Activity logs require OAuth**: `getActivityLogs` (the `activityLogs` tool) only accepts an OAuth bearer token with `org:activity_log_read`; a plain access token without that scope is rejected. This endpoint is Enterprise-only. **No token revocation**: Figma has no token-revocation endpoint, so disconnecting deletes the stored tokens on Prisme.ai's side rather than revoking them at Figma. ## External Resources > [card] [Figma REST API](https://developers.figma.com/docs/rest-api/) > > Official Figma REST API reference > [card] [Tool Agents](/products/agent-factory/capabilities) > > Learn how Agent Creator agents consume MCP tools in Prisme.ai. # GitLab Source: https://docs.prisme.ai/apps-store/marketplace/connectors/gitlab Let Agent Creator agents manage GitLab projects, issues, merge requests and CI/CD pipelines through MCP, with per-user OAuth resolved server-side ![GitLab](https://mintcdn.com/prismeai/Oqq72tWGTtxufvRl/images/connectors/gitlab.svg?fit=max\&auto=format\&n=Oqq72tWGTtxufvRl\&q=85\&s=c75ecc40ef2aaf95dddcf33e96e3bcc5) The GitLab connector exposes the [GitLab](https://gitlab.com) DevOps platform (REST v4 API) to **Agent Creator** agents (through MCP) and to Builder automations (through the `GitLab.op:` App instructions), covering projects, issues, merge requests, pipelines, jobs, environments, branches, commits, tags, releases, labels, milestones, wikis, CI/CD variables, deploy keys, webhooks, groups and users. The 90+ GitLab operations are grouped into **16 entity tools**, each driven by an `action` argument. The MCP server runs in the **tenant app-instance context**: it resolves the installing workspace's own credentials and authorizes the calling agent against that workspace's allowlist. Authentication is per-user and supports several modes: * **Per-user OAuth2, central client** (`oauthCentral`, recommended): one GitLab OAuth application is registered once by the platform maintainer; every end user signs in with their own GitLab account. Nothing to register per workspace: each one just installs the app and clicks *Connect*. * **Per-user OAuth2, tenant client** (`oauth`): paste your own GitLab OAuth client ID/secret in the connector config app. Each user signs in with their own account against your client (authorization-code flow). * **Direct access token** (`accessToken`): a caller-managed GitLab token (e.g. a Personal Access Token with the `api` scope), used as-is with no exchange. * **Self-hosted GitLab** (`oauthSelfHosted`, `accessTokenSelfHosted`): the same per-user OAuth2 or direct access token, against your own GitLab instance. You enter the instance URL once; every operation, sign-in and sign-out then goes to that instance instead of gitlab.com. > [card] Project Management > > Projects, issues, merge requests, labels, milestones and wikis > [card] CI/CD & DevOps > > Pipelines, jobs, environments, CI variables, deploy keys and webhooks > [card] Per-user auth > > Per-user OAuth (central or tenant client) resolved server-side, or a direct access token, on gitlab.com or a self-hosted instance ## Who is this for? This connector is used by three different roles. Jump to the section that matches yours; each one is self-contained. > [card] Agent builder > > You build agents in **Agent Creator** and want them to use GitLab. → *Agent builder* tab. > [card] Platform admin > > You run the platform and set up the shared GitLab OAuth client once for everyone. → *Platform admin setup* accordion below. > [card] Workspace builder > > You write Builder automations (DSUL) that call GitLab operations directly. → *Workspace builder* tab. ## Prerequisites * A **GitLab** account (gitlab.com or a self-hosted instance). * For the **OAuth modes**: a GitLab OAuth application created at **User Settings > Applications** (`https://gitlab.com/-/user_settings/applications`, or `/-/user_settings/applications` on a self-hosted instance) with the `api` scope (or `read_api` for read-only agents); copy its Application ID and Secret. The platform maintainer registers one app for the central mode; a workspace can also register its own for the tenant mode. * For the **access-token modes**: a Personal Access Token created at **User Settings > Access Tokens** (`https://gitlab.com/-/user_settings/personal_access_tokens`, or the same page on your instance) with the `api` scope. * Base URL: `https://gitlab.com/api/v4`, or `/api/v4` in the self-hosted modes. A self-hosted instance must be reachable from the platform over HTTPS; an instance served from a subdirectory (`https://intranet.example.com/gitlab`) is supported. > [accordion] Platform admin (Governance): one-time platform setup > > **Goal:** two one-time tasks: (1) configure the shared **central OAuth client** so every workspace lets its users sign in with their own GitLab account, and (2) optionally expose GitLab as a reusable **capability** in AI Governance so agent builders can pick it without pasting endpoint URLs. Throughout, `` is your environment's API URL (`https://api.studio.prisme.ai/v2` on production). > > ## 1. Configure the connector > > **1. Register the OAuth application at GitLab** > > Open `https://gitlab.com/-/user_settings/applications` and click **Add new application**. Set the single authorized redirect URI (callback URL) to the **core workspace** callback: > > ```text theme={null} > /workspaces/slug%3Agitlab/webhooks/oauthCallback > ``` > > (e.g. `https://api.studio.prisme.ai/v2/workspaces/slug%3Agitlab/webhooks/oauthCallback` on production). Keep the `%3A` as is: GitLab compares the registered URI with the one it receives character for character, and a literal `:` makes every sign-in fail with a redirect URI mismatch. The maintainer view of the configuration app shows the exact URI to copy. Add the `api` scope (or `read_api` for read-only). Save and copy the **Application ID** and **Secret** (the secret is shown only once). > > **2. Enter the credentials through the configuration app** > > Open the central `gitlab` workspace and launch its **Configuration app** at `/apps/gitlab` (e.g. `https://studio.prisme.ai/apps/gitlab`). Loaded from the core workspace, the app shows the **maintainer view** (org owner / editor / admin only); paste the **Application ID** and **Secret** there and Save; the app stores them in the core workspace's secrets for you. Do not edit Studio's raw Secrets by hand. These credentials stay in the `gitlab` workspace and are never exposed to tenants or end users; token exchange is proxied through the core `centralTokenExchange` webhook so the client secret never leaves the core workspace. > > **3. Tell workspaces to use the central client** > > Each consuming workspace selects auth mode **`oauthCentral`** in the connector configuration app (no client id/secret to enter on their side). Their users then just click **Connect**. > > **4. (Optional) Add a central client for a self-hosted instance** > > The gitlab.com client cannot sign users in to another instance. To spare the workspaces that use a self-hosted instance from declaring their own OAuth application, declare one on that instance with the same core redirect URI (`/workspaces/slug%3Agitlab/webhooks/oauthCallback`). Then, in the maintainer view, set **Host** to **Your own instance…**, enter the instance URL, the **Application ID** and **Secret**, and click **Save this instance**. Workspaces in `oauthSelfHosted` mode on that instance can then leave the Application ID and Secret empty. Repeat for each instance. > > **5. (Optional) Publish to the Capabilities catalog** > > From that same maintainer view, the **Add to catalog** button publishes GitLab to the org-wide **Capabilities catalog** in one click (org owner / admin only; it stays disabled until the central client is saved). Once published, every agent builder in the org can enable GitLab from the catalog without pasting an endpoint; see *Option A* in the *Agent builder* tab. > > ## 2. Declare the capability in AI Governance > > As an alternative to (or in addition to) the catalog button, you can declare GitLab as a named **capability** in AI Governance. Agent builders then enable that capability on their agents instead of pasting a raw MCP endpoint. > > **1. Open AI Governance > Capabilities** > > Create (or edit) the **GitLab** capability. > > **2. Point it at the MCP endpoint** > > Set the capability's MCP server URL to the connector's **MCP Endpoint**, and set its **Scope** to: > > ```text theme={null} > context_id,agent_id,user_id > ``` > > The `agent_id` in the scope is what lets the connector identify and authorize the calling agent. > > **3. Make it available to agent builders** > > Once created, the capability appears in the capability picker for agent builders in your organization, who enable it on their agents. Access to the catalog follows your organization's existing roles; there is no per-capability role grant. > > **4. Smoke-test** > > From an agent that has the capability, in a workspace configured for `oauthCentral`, trigger any tool (e.g. `users` with `action: "getCurrent"`). The user is prompted to connect once (GitLab sign-in); subsequent calls reuse the stored token transparently and refresh it automatically. > > > [!WARNING] > > > > Declaring the capability makes the connector **available**; it does not by itself authorize a specific agent. This connector follows the **tenant-context model**: which agents may actually call it is gated per-workspace by the **authorized-agents allowlist** in the configuration app (see the *Workspace builder* tab). Agents show a **Connect** button only if the catalog entry carries the connector's connect / status / disconnect webhooks in its `auth` block. The configuration app's **Add to catalog** button writes it for you. If you create the entry by hand, paste that block into **Auth Configuration**: the platform adds it later on its own only for a workspace endpoint (ending in `.mcp`), never for the connector's global `/webhooks/mcp` endpoint. *** > [tab] Agent builder (Agent Creator) > > ## Agent builder > > **Goal:** let an agent you build in Agent Creator use GitLab through MCP tools. > > > [!NOTE] > > > > Before an agent can call the connector, a *Workspace builder* must have installed and configured the GitLab app in a workspace (see the *Workspace builder* tab), and, for the central OAuth mode, a *Platform admin* must have provisioned the shared OAuth client (see the *Platform admin setup* accordion above). > > This connector runs in the **tenant app-instance context**: your agent is authorized two ways at once: it is identified by the `agent_id` that Agent Creator injects through the capability *Scope*, and that agent must appear in the connector's **authorized-agents allowlist** (managed in the configuration app). The GitLab access token itself is resolved server-side from the configured auth mode. > > There are two ways to wire it up. Pick based on how much isolation you need. > > ## Option A: Enable the shared capability from the catalog > > The fastest path: a *Platform admin* has already published a **GitLab** capability to the Capabilities catalog (see the *Platform admin setup* accordion above, the **Add to catalog** button, or §2), so you just pick it from the catalog. > > **1. Open your agent in Agent Creator** > > Open the agent you want to extend and go to its capabilities / tools. > > **2. Add the GitLab capability** > > Browse the capability catalog, select **GitLab**, and enable it. The MCP endpoint URL and the *Scope* (`context_id,agent_id,user_id`) are already wired by the admin; nothing to paste, and the shared instance accepts every agent, so there is no allowlist step on your side. > > **3. Connect a GitLab account** > > On the first tool call, an unconnected user is prompted to sign in: Agent Creator surfaces a `connect_url` to GitLab's authorization page. After sign-in the per-user token is stored and reused on subsequent calls; refresh is automatic. > > > [!NOTE] > > > > Convenient, but your agent runs against a **shared, platform-managed instance**: its GitLab credentials are owned by someone else and the instance accepts every agent that is granted the capability. Prefer Option B for anything beyond quick experiments. > > ## Option B: Run it from your own workspace (recommended) > > For production agents, install the connector in **your own workspace** and point the agent at *that* workspace's MCP endpoint. > > > [!WARNING] > > > > **Prefer this mode for security.** Because the MCP runs in *your* app-instance context, the GitLab credentials, the per-user OAuth tokens and the authorized-agents allowlist are all **scoped to your workspace**, not shared platform-wide. You decide exactly which agents may call it and which GitLab account / auth mode backs them, and a misconfiguration elsewhere can never expose your data. The shared catalog capability (Option A) is a broad surface many agents can reach; your own workspace is an isolated, least-privilege boundary. > > **1. Install and configure the connector in your workspace** > > Follow the *Workspace builder* tab: install **GitLab** in your workspace, open its **Configuration app**, choose the auth mode and connect a GitLab account. > > **2. Allowlist your agent** > > In that workspace's config app, open **Authorized agents** and tick your agent (the **Install capability** button does this for you), or enable **Allow all agents**. > > **3. Add the MCP capability to your agent** > > In your agent, add a capability pointing at **your workspace's MCP Endpoint** URL, and set its **Scope** to: > > ```text theme={null} > context_id,agent_id,user_id > ``` > > The `agent_id` is what lets the connector identify and authorize your agent; without it, every call is rejected with an explicit "agent could not be identified" message. This *Scope* is separate from the GitLab OAuth scopes. > > **4. Connect a GitLab account** > > On the first tool call, the user is prompted to sign in (or uses **Connect** in the config app). The per-user token is stored and reused; refresh is automatic. > > ## Brief the agent in its system prompt > > Whichever option you pick, wiring the capability is not enough: the agent must know the connector exists and when to reach for it. Add a short paragraph to the agent's system prompt. Copy-pasteable starter: > > ```text theme={null} > You have access to the GitLab MCP server. Use it whenever the user asks about GitLab content: projects, issues, merge requests, pipelines, jobs, branches, commits, tags, releases, milestones or members. Examples: "List my open merge requests", "What's failing in pipeline #1234?", "Create an issue in project X with label bug", "Show the latest release of my main project". Each tool is an entity that takes an `action` argument. Prefer calling tools over guessing, and confirm with the user before any destructive action (close an issue, merge or revert an MR, delete a branch, cancel a pipeline). > ``` > > Refine the trigger keywords (project names, group names, label conventions) so the agent reliably picks up the right intent in your context. > > > [!NOTE] > > > > **Legacy AI Knowledge agents** (no native MCP picker): add the connector under **Advanced > Tools > MCP** and paste the **MCP Endpoint** URL. The agent still has to be allowlisted in the config app and its identity propagated so the connector can read its `agent_id`. > > > [!NOTE] > > > > **Restricting to read-only (least privilege).** GitLab tools cover both reads and writes (create/update issues, merge requests, etc.). The connector requests the GitLab `api` scope (full read + write) by default. To allow only read access, set the **Scopes** field in the configuration app to `read_api`. With central OAuth (`oauthCentral`) you do **not** create your own GitLab application; keep `oauthCentral` and enter `read_api`; your tenant scope overrides the platform default (the central application must allow `read_api`). Write calls are then rejected by GitLab with `403 Forbidden`. The scope is set at the workspace level (a workspace editor can widen it); a GitLab personal access token limited to `read_api` is the hard-guarantee alternative. > > ## Available Tools > > Tools are grouped by resource. Each MCP tool takes an `action` argument selecting the operation, plus the parameters for that action. Every tool also accepts an `outputFormat` parameter (see *Output Formats*). > > ### Projects > > | Tool | Description | > | - | - | > | `projects` | Projects (repositories) and their settings, members, webhooks and CI/CD variables. Actions: `list` (pass `membership:true` or `owned:true` for *my* projects), `get`, `create`, `update`, `delete`, `fork`, `archive`, `unarchive`, `listMembers`, `addMember`, `removeMember`, `listHooks`, `createHook`, `deleteHook`, `listVariables`, `createVariable`, `updateVariable`, `deleteVariable`. | > > ### Issues > > | Tool | Description | > | - | - | > | `issues` | Issues and their notes. Actions: `list` (one project), `listAll` (across all accessible projects; use for "my issues" with `scope:assigned_to_me`/`created_by_me`), `listGroup`, `get`, `create`, `update`, `close`, `reopen`, `delete`, `listNotes`, `getNote`, `createNote`, `updateNote`, `deleteNote`. | > > ### Merge Requests > > | Tool | Description | > | - | - | > | `mergeRequests` | Merge requests and their notes. Actions: `list`, `listAll` (use for "my MRs" / reviews via `scope` + `reviewer_username`), `listGroup`, `get`, `create`, `update`, `delete`, `approve`, `unapprove`, `merge`, `listNotes`, `getNote`, `createNote`, `updateNote`, `deleteNote`. | > > ### Repository > > | Tool | Description | > | - | - | > | `branches` | Repository branches. Actions: `list`, `get`, `create`, `delete`. | > | `commits` | Repository commits. Actions: `list`, `get`, `create` (multi-file action), `cherryPick`, `revert`. | > | `tags` | Repository tags. Actions: `list`, `get`, `create`. | > | `releases` | Project releases. Actions: `list`, `get`, `create`, `delete`. | > > ### CI/CD > > | Tool | Description | > | - | - | > | `pipelines` | CI/CD pipelines. Actions: `list`, `get`, `create` (trigger a run), `retry`, `cancel`. | > | `pipelineJobs` | CI/CD jobs within a pipeline. Actions: `list`, `get`, `retry`. | > | `environments` | CI/CD environments. Actions: `list`, `get`, `stop`. | > | `deployKeys` | Project deploy keys. Actions: `list`, `create`, `delete`. | > > ### Planning > > | Tool | Description | > | - | - | > | `labels` | Project labels. Actions: `list`, `create`, `update`, `delete`. | > | `milestones` | Project milestones. Actions: `list`, `get`, `create`, `update`. | > | `wikiPages` | Project wiki pages. Actions: `list`, `get`, `create`. | > > ### Organization > > | Tool | Description | > | - | - | > | `groups` | Groups (namespaces). Actions: `list` (pass `owned:true` for *my* groups), `get`, `create`, `update`. | > | `users` | Users. Actions: `list`, `get`, `search`, `getCurrent`. | > > ## Output Formats > > Every tool accepts an `outputFormat` parameter that controls the MCP response shape: > > * **`verbose`** (default): human-readable text for LLM consumption > * **`structured`**: machine-readable JSON in `structuredContent` > * **`both`**: both text and structured content > > ## Tool Details > > ### issues (create) > > Open an issue in a GitLab project. > > ```json theme={null} > { > "name": "issues", > "arguments": { > "action": "create", > "id": "123456", > "title": "Investigate 500s on /api/v1/search", > "description": "Spike of 500s since 14:00 UTC.", > "labels": "BUG,Incident", > "assignee_ids": ["987654"] > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | `create` | > | `id` | Yes | Project ID (numeric) or URL-encoded `namespace/project` | > | `title` | Yes | Issue title | > | `description` | No | Markdown body | > | `labels` | No | Comma-separated label names | > | `assignee_ids` | No | Array of user IDs | > | `milestone_id` | No | Milestone ID to associate | > | `confidential` | No | `true` to make the issue confidential | > | `due_date` | No | `YYYY-MM-DD` | > > ### mergeRequests (create) > > ```json theme={null} > { > "name": "mergeRequests", > "arguments": { > "action": "create", > "id": "123456", > "source_branch": "feature/auto-deploy", > "target_branch": "main", > "title": "Automate staging deploy", > "description": "Closes #42", > "remove_source_branch": true > } > } > ``` > > `source_branch`, `target_branch` and `title` are required. Accepts `assignee_ids`, `reviewer_ids`, `labels`, `milestone_id`, `squash`. > > ### pipelines (create) > > Trigger a new pipeline on a given ref. Requires a `.gitlab-ci.yml` at the ref. > > ```json theme={null} > { > "name": "pipelines", > "arguments": { > "action": "create", > "id": "123456", > "ref": "main", > "variables": [ > { "key": "DEPLOY_ENV", "value": "staging" } > ] > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | `create` | > | `id` | Yes | Project ID | > | `ref` | Yes | Branch or tag to run against | > | `variables` | No | Array of `{key, value, variable_type?}` overrides | > > ### projects (list) > > List accessible projects. By default returns ALL accessible projects including public ones. Pass `membership: true` or `owned: true` to limit to the user's own projects. > > ```json theme={null} > { > "name": "projects", > "arguments": { > "action": "list", > "membership": true, > "order_by": "last_activity_at", > "sort": "desc", > "per_page": 20 > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | `list` | > | `membership` | No | `true` → only projects the user is a member of | > | `owned` | No | `true` → only projects the user owns | > | `search` | No | Free-text filter on project name/path | > | `visibility` | No | `public` / `internal` / `private` | > | `order_by` | No | e.g. `last_activity_at`, `created_at`, `name` | > | `sort` | No | `asc` / `desc` | > | `per_page` | No | 1-100 (default 20) | > > ### mergeRequests (merge) > > Merge an open merge request. The MR must be in a mergeable state. > > ```json theme={null} > { > "name": "mergeRequests", > "arguments": { > "action": "merge", > "id": "123456", > "iid": "1", > "squash": true, > "should_remove_source_branch": true > } > } > ``` > > Accepts `merge_commit_message`, `squash_commit_message`, `merge_when_pipeline_succeeds`, `sha` (to fail if HEAD changed). > [tab] Workspace builder (DSUL) > > ## Workspace builder > > **Goal:** install the connector in a workspace, configure authentication and the agent allowlist, and call GitLab operations from your automations. > > ## Installation > > 1. Go to **Apps** in your workspace > 2. Search for **GitLab** and install it > 3. Open the **Configuration app** (the link auto-populated on install) to choose the auth mode, provide credentials, connect a GitLab account, and allow the agents that may call the connector > > ## Configuration > > | Field | Description | > | - | - | > | **Configuration app** | Auto-populated on install; open this link to configure authentication (mode + credentials), connect a GitLab account (OAuth modes), and manage the authorized-agents allowlist. | > > The configuration app drives everything; the app instance itself has no per-field credential form. From it you pick one of: > > | Auth mode | What you provide | Best for | > | - | - | - | > | `oauthCentral` | Nothing; just click **Connect** | Workspaces on a platform where the maintainer set up the central GitLab client | > | `oauth` | Your own GitLab **Application ID + Secret** (redirect URI shown in the config app: `/workspaces/slug%3A/webhooks/.oauthCallback`, `%3A` included) | You manage your own GitLab OAuth app | > | `accessToken` | A pre-minted GitLab **access token** / Personal Access Token with the `api` scope | Short-lived or caller-managed tokens, service-account / non-interactive automations | > | `oauthSelfHosted` | The **GitLab instance URL**, plus the **Application ID + Secret** of an OAuth app declared on that instance with the redirect URI shown in the config app. Leave both empty if the platform maintainer declared a central client for this instance. | Per-user sign-in on a self-hosted GitLab | > | `accessTokenSelfHosted` | The **GitLab instance URL** and a Personal Access Token issued by that instance, with the `api` scope | Testing a self-hosted instance; every caller acts as the token's owner | > > The instance URL is normalized when you save: `https://` is added when missing and a trailing `/` is dropped. Anything other than an `https` URL is refused. Switching back to a gitlab.com mode discards the instance URL, so a gitlab.com credential is never sent to another host. > > > [!NOTE] > > > > Credentials are stored in the workspace's Secrets (`gitlabAuth`) and resolved server-side. The agent allowlist (**Authorized agents**, secret `gitlabAuthorizedAgents`) gates which Agent Creator agents may call the MCP endpoint; see the *Agent builder* tab. Builder automations calling `GitLab.op:` instructions resolve the same workspace credentials. > > ## Available Instructions > > Every instruction resolves credentials from the workspace configuration. The MCP server exposes the same operations behind the 16 entity tools (see the *Agent builder* tab). > > ### Projects > > | Instruction | Description | Returns | > | - | - | - | > | `listProjects` | List accessible projects; pass `membership`/`owned` for *my* projects, plus `search`, `visibility`, `order_by`, `sort`, `per_page`, `page` | `[ { id, name, path_with_namespace, visibility, ... } ]` | > | `createProject` | Create a project by `name` (+ `path`, `namespace_id`, `description`, `visibility`, `default_branch`, `initialize_with_readme`) | `{ id, name, web_url, ... }` | > | `getProject` | Get a project by `id` | `{ id, name, namespace, ... }` | > | `updateProject` | Update a project by `id` (`name`, `path`, `description`, `visibility`, `default_branch`) | `{ id, name, ... }` | > | `deleteProject` | Delete a project by `id` | Empty (HTTP 202) | > | `archiveProject` | Archive a project by `id` | `{ id, archived: true }` | > | `unarchiveProject` | Unarchive a project by `id` | `{ id, archived: false }` | > | `forkProject` | Fork a project by `id` into a `namespace`/`namespace_id` (+ `name`, `path`) | `{ id, forked_from_project, ... }` | > > ### Issues > > | Instruction | Description | Returns | > | - | - | - | > | `listIssues` | List issues of project `id` (`state`, `labels`, `milestone`, `search`, `assignee_username`, `per_page`, `page`) | `[ { iid, title, state, ... } ]` | > | `createIssue` | Create an issue in `id` with `title` (+ `description`, `labels`, `assignee_ids`, `milestone_id`, `confidential`, `due_date`) | `{ iid, title, web_url, ... }` | > | `getIssue` | Get issue `iid` of project `id` | `{ iid, title, description, ... }` | > | `updateIssue` | Update issue `iid` of `id` (`title`, `description`, `labels`, `assignee_ids`, `milestone_id`, `state_event`) | `{ iid, ... }` | > | `deleteIssue` | Delete issue `iid` of `id` | Empty (HTTP 204) | > | `closeIssue` | Close issue `iid` (state\_event=close) | `{ iid, state: "closed" }` | > | `reopenIssue` | Reopen issue `iid` (state\_event=reopen) | `{ iid, state: "opened" }` | > | `listIssueNotes` | List notes of issue `iid` (`sort`, `order_by`, `per_page`) | `[ { id, body, author, ... } ]` | > | `createIssueNote` | Add a note (`body`) on issue `iid` (+ `confidential`) | `{ id, body, ... }` | > | `getIssueNote` | Get note `note_id` of issue `iid` | `{ id, body, ... }` | > | `updateIssueNote` | Update note `note_id` body of issue `iid` | `{ id, body, ... }` | > | `deleteIssueNote` | Delete note `note_id` of issue `iid` | Empty (HTTP 204) | > > ### Merge Requests > > | Instruction | Description | Returns | > | - | - | - | > | `listMergeRequests` | List MRs of `id` (`state`, `source_branch`, `target_branch`, `labels`, `search`, `per_page`) | `[ { iid, title, state, ... } ]` | > | `createMergeRequest` | Create an MR in `id` (`source_branch`, `target_branch`, `title` + `description`, `assignee_ids`, `reviewer_ids`, `labels`, `milestone_id`, `remove_source_branch`, `squash`) | `{ iid, title, web_url, ... }` | > | `getMergeRequest` | Get MR `iid` of `id` | `{ iid, title, merge_status, ... }` | > | `updateMergeRequest` | Update MR `iid` of `id` (`title`, `description`, `target_branch`, `assignee_ids`, `labels`, `milestone_id`, `state_event`) | `{ iid, ... }` | > | `deleteMergeRequest` | Delete MR `iid` of `id` | Empty (HTTP 204) | > | `mergeMergeRequest` | Merge MR `iid` of `id` (`merge_commit_message`, `squash`, `should_remove_source_branch`, `merge_when_pipeline_succeeds`, `sha`) | `{ iid, state: "merged", ... }` | > | `approveMergeRequest` | Approve MR `iid` of `id` (+ `sha`) | `{ id, approved_by, ... }` | > | `unapproveMergeRequest` | Remove your approval on MR `iid` of `id` | Empty (HTTP 204) | > | `listMergeRequestNotes` | List notes of MR `iid` (`sort`, `order_by`, `per_page`) | `[ { id, body, ... } ]` | > | `createMergeRequestNote` | Add a note (`body`) on MR `iid` | `{ id, body, ... }` | > | `getMergeRequestNote` | Get note `note_id` of MR `iid` | `{ id, body, ... }` | > | `updateMergeRequestNote` | Update note `note_id` body of MR `iid` | `{ id, body, ... }` | > | `deleteMergeRequestNote` | Delete note `note_id` of MR `iid` | Empty (HTTP 204) | > > ### Branches & Commits > > | Instruction | Description | Returns | > | - | - | - | > | `listBranches` | List branches of `id` (`search`, `per_page`) | `[ { name, commit, protected } ]` | > | `createBranch` | Create `branch` from `ref` in `id` | `{ name, commit, ... }` | > | `getBranch` | Get `branch` of `id` | `{ name, commit, merged, ... }` | > | `deleteBranch` | Delete `branch` of `id` | Empty (HTTP 204) | > | `listCommits` | List commits of `id` (`ref_name`, `since`, `until`, `path`, `author`, `per_page`) | `[ { id, title, author_name, ... } ]` | > | `createCommit` | Create a commit on `branch` of `id` with `commit_message` + `actions` (multi-file) | `{ id, short_id, web_url, ... }` | > | `getCommit` | Get commit `sha` of `id` | `{ id, title, stats, ... }` | > | `cherryPickCommit` | Cherry-pick `sha` onto `branch` of `id` (+ `dry_run`, `message`) | `{ id, short_id, ... }` | > | `revertCommit` | Revert `sha` on `branch` of `id` (+ `dry_run`) | `{ id, short_id, ... }` | > > ### Tags & Releases > > | Instruction | Description | Returns | > | - | - | - | > | `listTags` | List tags of `id` (`search`, `order_by`, `sort`, `per_page`) | `[ { name, target, commit } ]` | > | `createTag` | Create `tag_name` from `ref` in `id` (+ `message`) | `{ name, target, ... }` | > | `getTag` | Get `tag_name` of `id` | `{ name, target, commit }` | > | `listReleases` | List releases of `id` (`order_by`, `sort`, `per_page`) | `[ { tag_name, name, released_at } ]` | > | `createRelease` | Create a release for `tag_name` in `id` (+ `name`, `description`, `ref`, `released_at`) | `{ tag_name, name, ... }` | > | `getRelease` | Get release by `tag_name` of `id` | `{ tag_name, name, assets, ... }` | > | `deleteRelease` | Delete release `tag_name` of `id` | `{ tag_name, ... }` | > > ### Pipelines & Jobs > > | Instruction | Description | Returns | > | - | - | - | > | `listPipelines` | List pipelines of `id` (`status`, `ref`, `sha`, `username`, `order_by`, `sort`, `per_page`) | `[ { id, status, ref, sha } ]` | > | `createPipeline` | Trigger a pipeline on `ref` of `id` (+ `variables`) | `{ id, status, web_url, ... }` | > | `getPipeline` | Get pipeline `pipeline_id` of `id` | `{ id, status, duration, ... }` | > | `retryPipeline` | Retry failed/canceled jobs of pipeline `pipeline_id` | `{ id, status: "running", ... }` | > | `cancelPipeline` | Cancel pipeline `pipeline_id` of `id` | `{ id, status: "canceled", ... }` | > | `listPipelineJobs` | List jobs of pipeline `pipeline_id` (`scope`, `per_page`) | `[ { id, name, status, stage } ]` | > | `getJob` | Get job `job_id` of `id` | `{ id, name, status, ... }` | > | `retryJob` | Retry job `job_id` of `id` | `{ id, status: "pending", ... }` | > > ### Environments > > | Instruction | Description | Returns | > | - | - | - | > | `listEnvironments` | List environments of `id` (`name`, `search`, `states`, `per_page`) | `[ { id, name, state, external_url } ]` | > | `getEnvironment` | Get `environment_id` of `id` | `{ id, name, last_deployment, ... }` | > | `stopEnvironment` | Stop environment `environment_id` of `id` | `{ id, state: "stopped" }` | > > ### Labels & Milestones > > | Instruction | Description | Returns | > | - | - | - | > | `listLabels` | List labels of `id` (`with_counts`, `search`, `per_page`) | `[ { id, name, color, ... } ]` | > | `createLabel` | Create label `name` with `color` in `id` (+ `description`, `priority`) | `{ id, name, color }` | > | `updateLabel` | Update label (by `name` or `label_id`) of `id` (`new_name`, `color`, `description`, `priority`) | `{ id, name, color }` | > | `deleteLabel` | Delete label (by `name` or `label_id`) of `id` | Empty (HTTP 204) | > | `listMilestones` | List milestones of `id` (`state`, `search`, `per_page`) | `[ { id, title, state, due_date } ]` | > | `createMilestone` | Create milestone `title` in `id` (+ `description`, `due_date`, `start_date`) | `{ id, title, ... }` | > | `getMilestone` | Get `milestone_id` of `id` | `{ id, title, state, ... }` | > | `updateMilestone` | Update `milestone_id` of `id` (`title`, `description`, `due_date`, `start_date`, `state_event`) | `{ id, title, ... }` | > > ### Wiki > > | Instruction | Description | Returns | > | - | - | - | > | `listWikiPages` | List wiki pages of `id` (+ `with_content`) | `[ { slug, title, format } ]` | > | `createWikiPage` | Create a wiki page in `id` with `title` + `content` (+ `format`) | `{ slug, title, content }` | > | `getWikiPage` | Get wiki page by `slug` of `id` (+ `render_html`, `version`) | `{ slug, title, content }` | > > ### Webhooks & CI/CD Variables > > | Instruction | Description | Returns | > | - | - | - | > | `listProjectHooks` | List webhooks of `id` (+ `per_page`) | `[ { id, url, ...events } ]` | > | `createProjectHook` | Add a webhook `url` to `id` (+ per-event boolean flags, `token`, `enable_ssl_verification`) | `{ id, url, ... }` | > | `deleteProjectHook` | Delete webhook `hook_id` of `id` | Empty (HTTP 204) | > | `listProjectVariables` | List CI/CD variables of `id` (+ `per_page`) | `[ { key, value, variable_type, ... } ]` | > | `createProjectVariable` | Create variable `key`=`value` in `id` (+ `variable_type`, `protected`, `masked`, `raw`, `environment_scope`, `description`) | `{ key, value, ... }` | > | `updateProjectVariable` | Update variable `key` of `id` (same params, `filter[environment_scope]`) | `{ key, value, ... }` | > | `deleteProjectVariable` | Delete variable `key` of `id` (+ `filter[environment_scope]`) | Empty (HTTP 204) | > > ### Deploy Keys & Members > > | Instruction | Description | Returns | > | - | - | - | > | `listDeployKeys` | List deploy keys of `id` (+ `per_page`) | `[ { id, title, key, can_push } ]` | > | `createDeployKey` | Add deploy key `title`/`key` to `id` (+ `can_push`) | `{ id, title, ... }` | > | `deleteDeployKey` | Delete deploy key `key_id` of `id` | Empty (HTTP 204) | > | `listProjectMembers` | List direct members of `id` (`query`, `per_page`) | `[ { id, username, access_level } ]` | > | `addProjectMember` | Add user `user_id` to `id` with `access_level` (+ `expires_at`) | `{ id, username, access_level }` | > | `removeProjectMember` | Remove member `user_id` from `id` | Empty (HTTP 204) | > > ### Users & Groups > > | Instruction | Description | Returns | > | - | - | - | > | `getCurrentUser` | Get the currently authenticated user | `{ id, username, name, email }` | > | `getUser` | Get a user by `user_id` | `{ id, username, name, ... }` | > | `listUsers` | List users (`active`, `blocked`, `username`, `per_page`, `page`) | `[ { id, username, name } ]` | > | `searchUsers` | Search users by `search` (name/username/email) (+ `per_page`) | `[ { id, username, name } ]` | > | `listGroups` | List groups (`search`, `owned`, `min_access_level`, `top_level_only`, `per_page`) | `[ { id, name, full_path } ]` | > | `createGroup` | Create a group `name`/`path` (+ `description`, `visibility`, `parent_id`) | `{ id, name, web_url, ... }` | > | `getGroup` | Get group by `id` (or URL-encoded path) | `{ id, name, projects, ... }` | > | `updateGroup` | Update group `id` (`name`, `path`, `description`, `visibility`) | `{ id, name, ... }` | > > > [!NOTE] > > > > `Returns` shows the shape of the operation output (the underlying GitLab API resource). > > ## DSUL Examples > > ### List the user's own projects > > ```yaml theme={null} > - GitLab.listProjects: > membership: true > order_by: last_activity_at > sort: desc > per_page: 20 > output: myProjects > ``` > > ### Create an issue with labels and an assignee > > ```yaml theme={null} > - GitLab.createIssue: > id: '{{projectId}}' > title: Investigate 500s on /api/v1/search > description: | > Spike of 500s since 14:00 UTC. Logs in Kibana (link). > labels: BUG,Incident > assignee_ids: > - '{{oncallUserId}}' > output: issue > ``` > > ### Open a merge request from a feature branch > > ```yaml theme={null} > - GitLab.createBranch: > id: '{{projectId}}' > branch: feature/auto-deploy > ref: main > output: branch > - GitLab.createMergeRequest: > id: '{{projectId}}' > source_branch: feature/auto-deploy > target_branch: main > title: Automate staging deploy > description: Closes #{{issue.iid}} > remove_source_branch: true > output: mr > ``` > > ### Trigger a pipeline on a specific ref > > ```yaml theme={null} > - GitLab.createPipeline: > id: '{{projectId}}' > ref: main > variables: > - key: DEPLOY_ENV > value: staging > output: pipeline > ``` *** ## Security The answers that hold for every connector (agent access, shared knowledge bases, credentials, models, egress) are on [Connector security](/apps-store/marketplace/connectors/security). This section lists what is specific to GitLab. | Topic | GitLab | | - | - | | Authentication family | Delegated OAuth (GitLab, authorization code with PKCE): each user connects their own GitLab account, on gitlab.com or on a self-hosted instance. | | Production modes | `oauthCentral` or `oauth` on gitlab.com, `oauthSelfHosted` on a self-hosted instance | | Modes to avoid in production | `accessToken` and `accessTokenSelfHosted` (testing only: a personal access token is long-lived, and every caller acts as its owner) | | Read-only scopes | `read_api`, `read_user`, `read_repository`, plus `openid`, `profile` and `email` (the **read-only** preset of the configuration app). The default scope is `api`, which grants full read and write access. | | Agent allowlist | Yes, on the tenant endpoint (empty at installation). The global endpoint accepts every agent. | | Per-reader access control on knowledge bases | Not applicable: this connector does not feed knowledge bases. | | Outbound hosts | `gitlab.com`, or the address of the self-hosted instance that the administrator sets at installation | | Audit events | None specific to this connector | Replace the default `api` scope with the read-only preset when agents must not modify anything: with `read_api`, GitLab itself refuses every create, update, merge and delete call. The connector reads the self-hosted address only in the two self-hosted modes, and it keeps each user's tokens per instance, so a token issued by one instance is never sent to another. *** ## Error Handling | HTTP Status | Error | Solution | | - | - | - | | 400 | Bad request | Check argument shapes (IDs, dates, enum values) | | 401 | Unauthorized | Sign in again (OAuth modes), or verify the access token has the `api` scope | | 403 | Forbidden | The token lacks permission on this project/group; check the access level | | 404 | Not Found | Verify the project `id` (numeric or URL-encoded path) and resource `iid` | | 409 | Conflict | Common on merge conflicts or concurrent updates | | 429 | Rate Limited | GitLab.com enforces \~2000 req/min per token; back off and retry | | 500 | Server Error | Transient GitLab issue; retry after a few seconds | ### Common Issues **"This agent is not authorized to use this connector"**: The calling agent is not in the allowlist. Open the configuration app → **Authorized agents** → tick this agent (id is shown in the error) or enable **Allow all agents**, and Save. The **Install capability** button does this for you. **"The calling agent could not be identified"**: The MCP capability *Scope* does not declare `agent_id`, so Agent Creator never injects the agent identity. Set the Scope to `context_id,agent_id,user_id` on the capability (this is separate from the GitLab OAuth scopes), then allow the agent in the config app. **"GitLab is not connected for this user"**: No per-user OAuth token is stored for the caller. Open the configuration app (OAuth mode) and click **Connect**, or use the agent's connect flow. **"GitLab token refresh failed … must reconnect"**: The stored refresh token was rejected by GitLab (revoked / expired). The connection is dropped automatically; the user must reconnect from the config app. **"GitLab is not authenticated / OAuth is not configured"**: Neither a tenant OAuth client nor the central platform client is available. Set the OAuth client ID/secret in the config app (tenant mode), or ask the platform maintainer to provision the central OAuth client from the core workspace's config app. **"Can't approve own MR"**: A user counts as the MR author and cannot approve its own merge requests. Connect with a different GitLab account (or use an `accessToken` from another user) for the approval step. **"pipeline creation 404"**: The target ref has no `.gitlab-ci.yml` at its root. Commit a CI config first, or pick a ref that has one. ## External Resources > [card] [GitLab REST API](https://docs.gitlab.com/ee/api/) > > Official GitLab REST v4 API reference > [card] [Tool Agents](/products/agent-factory/capabilities) > > Learn how Agent Creator agents consume MCP tools in Prisme.ai. # Google Chat Source: https://docs.prisme.ai/apps-store/marketplace/connectors/google-chat Bridge a Google Chat bot to a Prisme.ai AI Knowledge agent through an HTTPS webhook ![Google Chat](https://mintcdn.com/prismeai/vHblnKVx3LivXytH/images/connectors/google-chat.png?fit=max\&auto=format\&n=vHblnKVx3LivXytH\&q=85\&s=bda4ab318bcd88d7cc2d2c0f7c3c6678) The Google Chat app turns a Google Chat bot into the user-facing interface of a Prisme.ai AI Knowledge agent. Unlike most connectors, the integration is reverse-direction: Google Chat is the *caller* and Prisme.ai is the *server*. Each tenant workspace installs the app, fills its own Google service account JSON, AI Knowledge project ID and API key, and pastes a generated HTTPS endpoint URL into the Google Chat app configuration. Incoming user messages are forwarded to the configured AI Knowledge project; the reply is posted back into the same Google Chat thread, with per-thread conversational context preserved. > [card] 1:1 chats and spaces > > Receives direct messages and `ADDED_TO_SPACE` events, with configurable greetings and fallback texts. > [card] Per-thread context > > A compact conversation history is kept per Google Chat thread and trimmed to a configurable number of turns. > [card] Async acknowledgement > > Optionally acknowledges Google Chat immediately and posts the final agent answer back to the thread asynchronously via the Google Chat REST API. ## Prerequisites * A **Google Workspace** account with admin-level access to publish a Chat app for at least one user (a regular Gmail account cannot host a Chat app). * A **Google Cloud project** with the **Google Chat API enabled** at [console.cloud.google.com/apis/library/chat.googleapis.com](https://console.cloud.google.com/apis/library/chat.googleapis.com). * A **Google service account** in the same project, with a **JSON key** downloaded. No IAM role is required; the OAuth scope `https://www.googleapis.com/auth/chat.bot` is what authorizes outbound calls to the Chat REST API. The full service account JSON (including `client_email`, `private_key`, `private_key_id`) is what you paste in the workspace secret. * An **AI Knowledge project** that the bot will query, plus its **API key** (created from the project settings). *** ## Installation 1. Go to **Apps** in the workspace that will host the bot. 2. Search for **Google Chat** and install it. 3. Open the freshly installed app instance: `endpointToken` and `googleChatEndpointUrl` are auto-populated by the `onInstall` flow, and two empty workspace secrets are provisioned for you to fill (see below). ### Configure the credentials The `googleChatServiceAccount` and `googleChatAgentApiKey` fields are wired to workspace secrets of the same name. Fill the values in the workspace **Secrets** section to keep them out of the app instance configuration. **1. Open workspace Secrets** From Studio, open the workspace's **Secrets** panel. **2. Fill googleChatServiceAccount** Paste the full service account JSON exported from Google Cloud Console (must contain `client_email`, `private_key`, `private_key_id`). **3. Fill googleChatAgentApiKey** Paste the AI Knowledge project API key. **4. Fill the AI Knowledge project ID** Back on the app instance configuration, set **AI Knowledge project ID** (`agent.projectId`) to the project the bot should query. ### Wire the Google Chat side **1. Open the Chat API Configuration** Open [Google Cloud Console → Google Chat API → Configuration](https://console.cloud.google.com/apis/api/chat.googleapis.com/hangouts-chat). Fill the app name, avatar URL and description. **2. Pick the trigger surfaces** Under **Functionality**, enable *Receive 1:1 messages* and *Join spaces and group conversations*. **3. Paste the endpoint URL** Under **Connection settings**, select **HTTP endpoint URL** and paste the value of `googleChatEndpointUrl` from the app instance (it embeds the workspace ID, the app instance slug and a single-use token). Set **Authentication Audience** to the same URL. **4. Restrict the visibility** Under **Visibility**, choose *Make this Chat app available to specific people and groups in ``* and add the test email addresses. Save. **5. Test the bot** Open `chat.google.com`, search for the app under *Internal apps*, send a message and verify the acknowledgement text (`config.ackText`) appears immediately and the agent reply lands in the same thread. ## Configuration | Field | Description | | - | - | | **📖 Setup guide** | Read-only field whose description links to the in-app setup guide page hosted by the connector workspace | | **Google Chat endpoint URL** | Paste this value in the Google Chat app's *HTTP endpoint URL* field | | **Endpoint token** | Embedded in the endpoint URL query string and validated on every incoming Google Chat request | | **Send replies asynchronously** | When `true` (default), the connector immediately returns the acknowledgement text to Google Chat and posts the final agent reply later via the Google Chat REST API. When `false`, the synchronous reply path waits for the agent answer before returning | | **Acknowledgement text** | Immediate message returned to Google Chat in async mode (default `I am working on it.`) | | **Added to space text** | Text returned when the bot is added to a space (`ADDED_TO_SPACE` event) | | **Empty message text** | Text returned when no user text can be extracted from the incoming event | | **Error text** | Fallback message sent to users when the agent call fails | | **Google Chat API base URL** | Default `https://chat.googleapis.com/v1` | | **Google Chat OAuth scope** | OAuth scope used when minting the access token. Default `https://www.googleapis.com/auth/chat.bot` | | **Google service account JSON** | Auto-wired by `onInstall` to `{{config.googleChatServiceAccount}}`. The actual JSON value lives in the workspace secret `googleChatServiceAccount` | | **AI Knowledge API key** | Auto-wired by `onInstall` to `{{config.googleChatAgentApiKey}}`. The actual key lives in the workspace secret `googleChatAgentApiKey` | | **AI Knowledge project ID** | Identifier of the AI Knowledge project the bot should query | | **Optional model override** | Optional `chat-completion` model override | | **Max Google Chat history turns** | Number of user / assistant turns kept per Google Chat thread (default 12) | > [!NOTE] > > `Google Chat endpoint URL` and `Endpoint token` are populated on install; do not edit them by hand. To rotate the service account JSON or the AI Knowledge API key, update the corresponding workspace secret; the app instance picks up the new value on the next call. ## How it works 1. Google Chat sends an interaction event (`MESSAGE`, `ADDED_TO_SPACE`, etc.) to the configured HTTP endpoint URL. The connector validates the query-string token against the configured `endpointToken` and rejects mismatches with `Unauthorized Google Chat request.`. 2. For `MESSAGE` events, the incoming Google Chat payload is normalized into a compact internal shape (`chatEvent`) covering the text, the space name, the thread key and the sender identity. 3. In **async mode** (default), the connector emits a `GoogleChat.message.received` event and immediately returns the acknowledgement text. The downstream `onGoogleChatMessage` handler: * calls `askPrismeAgent`, which forwards the conversation (with the per-thread history kept in `global.googleChatThreads`) to the configured AI Knowledge project, * posts the final reply back to the same Google Chat thread via the Chat REST API (`sendGoogleChatMessage`), using a JWT signed with the service account JSON (`getGoogleChatAccessToken`), * emits `GoogleChat.reply.sent` or `GoogleChat.reply.failed` for observability. 4. In **synchronous mode** (`asyncReplies: false`), the agent call happens inline and the response text is returned in the initial HTTP response. The conversation history is stored per `threadKey` (derived from `space.name` + `message.thread.name`) and trimmed to `maxHistoryTurns` × 2 messages. ## Error Handling | Symptom | Cause | Resolution | | - | - | - | | `Unauthorized Google Chat request.` returned to Google | The query-string `token` does not match the configured `endpointToken` | Re-copy the auto-populated `googleChatEndpointUrl` from the app instance into the Google Chat app HTTP endpoint URL field | | `I could not get an answer from the Prisme.ai agent.` posted in chat | The AI Knowledge call failed (invalid project ID, missing API key, quota exceeded, agent returned an empty response) | Check the workspace events for `GoogleChat.reply.failed` and the underlying `AgentRequestFailed` / `EmptyAgentResponse` payload | | `Missing client_email or private_key in service account.` in events | The `googleChatServiceAccount` secret is empty or malformed | Re-paste the full service account JSON in the workspace secret (must include `client_email`, `private_key`, `private_key_id`) | | Google Chat HTTP 401 on outbound reply | The minted access token was rejected by the Chat REST API (service account misconfigured or scope mismatch) | Verify the service account belongs to the same Google Cloud project as the Chat app and that the scope is `https://www.googleapis.com/auth/chat.bot` | | `Send-as the bot to space` step in Google Cloud rejects the endpoint | The endpoint URL is not HTTPS, missing the `?token=…` query string or unreachable | Re-check the URL is exactly the value of `googleChatEndpointUrl` from the installed app instance | ### Common Issues **Bot does not appear in `chat.google.com`**: Verify the visibility section of the Google Chat app configuration lists your email (or a group you belong to), and that you searched the *Internal apps* tab rather than the public Marketplace. **Async reply never arrives**: Inspect the events emitted by `onGoogleChatMessage`. A missing `sendGoogleChatMessage` step usually means the service account JWT could not be signed (`createGoogleChatJWT` Custom Code error) or the Chat REST API rejected the outbound request. **Replies arrive in a new thread instead of the original one**: The Google Chat REST API was called with `messageReplyOption=REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD`; this is expected when the original `chatEvent.threadName` was not preserved (e.g. when the bot is added to a brand-new space). ## External Resources > [card] [Google Chat API](https://developers.google.com/workspace/chat) > > Official Google Chat REST API reference. > [card] [In-app setup guide](https://sandbox.prisme.ai/apps/google-chat-app) > > Interactive setup guide hosted inside the connector workspace, with an endpoint URL builder for tenant administrators. # Google Search Source: https://docs.prisme.ai/apps-store/marketplace/connectors/google-search Run Google web searches from Agent Creator agents and Builder workflows: synthesized grounded answers or rich filtered results, with a Google API key or service account ![Google Search](https://mintcdn.com/prismeai/OytJgtmYTu6d44a2/images/connectors/google-search.svg?fit=max\&auto=format\&n=OytJgtmYTu6d44a2\&q=85\&s=82c117548267c7917cca5b4dce44e788) The Google Search app exposes Google web search through a single `search` tool. It can be consumed two ways: as a remote MCP server that **Agent Creator** agents call as a tool, or as a Builder app whose instruction you call directly from DSUL. It runs in the **tenant app-instance context** (it resolves the installing workspace's own Google credential) and automatically routes between two backends depending on the tenant configuration: * **Gemini Grounding** (default, when no `cx` is set): behaves like a real google.com search of the **entire web** and returns a synthesized `answer` with cited sources. * **Custom Search JSON API** (legacy, when a Programmable Search Engine `cx` is set): returns ranked organic results with rich filters (date, site, language, file type) and image search, but searches **only the sites whitelisted in the Programmable Search Engine's context**, never the open web. Google has **removed the "Search the entire web" option for new Programmable Search Engines**, so this backend cannot cover the whole web; use Grounding (leave `cx` empty) for that. Authentication is a **Google Cloud API key** (`AIza…`) or a **service-account JSON** (signed into a short-lived Bearer token). Agents are identified by the capability **Scope** `context_id,agent_id,user_id` and gated by a per-workspace authorized-agents allowlist. > [card] Web search as a tool > > A single `search` tool gives agents fresh, post-cutoff web information (news, prices, schedules, official docs, product specs) instead of guessing. > [card] Grounded answers > > The default Gemini Grounding backend returns a synthesized answer plus cited sources, rendered as clickable source cards in the chat. > [card] Filtered & image search > > With a Programmable Search Engine (`cx`), switch to the Custom Search backend for date/site/language filters, file-type restriction and image search. ## Who is this for? This connector is used by three different roles. Jump to the section that matches yours; each one is self-contained. > [card] Agent builder > > You build agents in **Agent Creator** and want them to search the web. → *Agent builder* tab. > [card] Platform admin > > You run the platform and set up a shared Google Search key once for everyone. → *Platform admin setup* accordion below. > [card] Workspace builder > > You write Builder automations (DSUL) that call the `search` instruction directly. → *Workspace builder* tab. ## Prerequisites (Google side) * A **Google** account with a **Google Cloud project**. * The matching API must be **enabled** in that project: * **Gemini API** (listed as **Generative Language API**, `generativelanguage.googleapis.com`), for the default Gemini Grounding backend. * **Custom Search API** (`customsearch.googleapis.com`), for the legacy `cx` backend. * A **credential**, one of: * A **Google Cloud API key** (`AIza…`): *APIs & Services > Credentials > Create credentials > API key*. * A **service-account key** JSON, for server-to-server use (signed JWT exchanged for a Bearer token). * For the Custom Search backend only: a **Programmable Search Engine** (the `cx` id), created at [programmablesearchengine.google.com](https://programmablesearchengine.google.com). A PSE searches **only the sites you add to its context**; Google has **retired the "Search the entire web" option for newly created engines**, so the Custom Search backend can no longer span the open web. For whole-web coverage, leave `cx` empty and use the Grounding backend. > [!NOTE] > > The Gemini API free tier is limited (e.g. \~20 requests/day for `gemini-2.5-flash`). For production traffic, enable billing on the Cloud project or use the Custom Search backend (100 free queries/day, then paid). > [accordion] Platform admin (Governance): one-time platform setup > > **Goal:** two optional one-time tasks: (1) set a **shared platform Google key** so workspaces that have not configured their own credential can still search, and (2) expose Google Search as a reusable **capability** in AI Governance so agent builders can pick it without pasting endpoint URLs. > > > [!NOTE] > > > > Both tasks are optional. If every workspace pastes its own Google key, you can skip this section entirely; there is no per-tenant credential to register on the platform. > > ## 1. Configure the shared platform key > > **1. Enable the right API in the Cloud project** > > The backend you use decides which API to enable in the Google Cloud project: > > * **Gemini Grounding (default).** Enable the **Gemini API**, listed in the Cloud Console as **Generative Language API** (`generativelanguage.googleapis.com`); the two names are the same service. *Grounding with Google Search* is **not** a separate API to enable: it is the `google_search` tool exposed inside the Gemini `generateContent` call, so enabling the Gemini API is all that the Grounding backend needs. > * **Custom Search (legacy, `cx` set).** Enable the **Custom Search API** (`customsearch.googleapis.com`) and create a **Programmable Search Engine** at [programmablesearchengine.google.com](https://programmablesearchengine.google.com), noting its `cx`. Note the scope: a PSE returns results **only from the sites whitelisted in its context**, never the whole web; Google has **removed the "Search the entire web" option for new engines**. For broad web coverage, leave `cx` empty and use the Grounding backend instead. > > Enable it from **APIs & Services > Library** (or run `gcloud services enable generativelanguage.googleapis.com`). > > **2. Get a Google credential** > > In the [Google Cloud Console](https://console.cloud.google.com/apis/credentials), in that same project, create an **API key** (or a service-account key JSON). For a service account, the connector requests the `https://www.googleapis.com/auth/generative-language` scope when exchanging the JWT. > > **3. Enter the key through the core workspace's config app** > > Open the central `google-search` workspace and launch its **Configuration app** maintainer view: `/apps/google-search` (e.g. `https://studio.prisme.ai/apps/google-search`). Follow the in-app instructions to paste the **platform global key** (and optional `cx`). The app stores it in the core workspace's secrets for you; do not edit Studio's raw Secrets by hand. The global key stays in the `google-search` workspace and is never inherited by tenant instances; only search **results** are returned to tenants (proxied through the core `centralSearch` webhook). > > > [!NOTE] > > > > When a platform global key is set, the shared connector instance becomes a **global endpoint**: the per-agent allowlist no longer applies there, and every agent granted the capability (Option A in the *Agent builder* tab) is accepted. The global key is the gate. > > ## 2. Declare the capability in AI Governance > > Generic connectors (broad tool surfaces meant to be shared across many agents) are best exposed as a named **capability** in the org Capabilities catalog. Agent builders then enable that capability on their agents instead of pasting a raw MCP endpoint. > > > [!NOTE] > > > > **Easiest path: the one-click "Add to catalog" button.** The configuration app has an **Add to catalog** button (in the *MCP endpoint* section) that registers the connector org-wide in one click: it creates an `mcp`-type catalog entry pointing at this workspace's MCP endpoint with the *Scope* `context_id,agent_id,user_id` already set. It also detects an existing entry and offers **Update catalog entry** instead. The button is shown only to **org owners / admins**, and the published entry is **org-wide**; every builder in the org can then attach the connector. Use this instead of the manual steps below; they remain for when you want to author the capability by hand. > > **1. Open AI Governance > Capabilities** > > Create (or edit) the **Google Search** capability. > > **2. Point it at the MCP endpoint** > > Set the capability's MCP server URL to the connector's **MCP Endpoint**, and set its **Scope** to: > > ```text theme={null} > context_id,agent_id,user_id > ``` > > The `agent_id` in the scope is what lets the connector identify the calling agent. > > **3. Make it available to agent builders** > > Once created, the capability appears in the capability picker for agent builders in your organization, who enable it on their agents. Access to the catalog follows your organization's existing roles; there is no per-capability role grant. > > **4. Smoke-test** > > From an agent that has the capability, trigger any web question. The agent calls `search` and grounds its answer on the returned sources. > > > [!WARNING] > > > > Declaring the capability makes the connector **available**; it does not by itself authorize a specific agent. This connector follows the **tenant-context model**: when a workspace runs its own instance (Option B), which agents may actually call it is gated per-workspace by the **authorized-agents allowlist** in the configuration app. There is **no OAuth auth-config JSON** to attach in Governance: authentication is a server-side Google key, not a per-user OAuth flow. *** > [tab] Agent builder (Agent Creator) > > ## Agent builder > > **Goal:** let an agent you build in Agent Creator search the web through the `search` MCP tool. > > > [!NOTE] > > > > Before an agent can call the connector, a *Workspace builder* must have installed and configured the Google Search app in a workspace (see the *Workspace builder* tab), or a *Platform admin* must have set a shared platform key and published the capability (see the *Platform admin setup* accordion above). > > This connector runs in the **tenant app-instance context**: your agent is identified by the `agent_id` that Agent Creator injects through the capability *Scope*, and that agent must appear in the connector's **authorized-agents allowlist** (managed in the configuration app). The Google credential itself is resolved server-side and never exposed to the agent. > > There are two ways to wire it up. Pick based on how much isolation you need. > > ## Option A: Enable the shared capability from the catalog > > The fastest path: an *org owner / admin* has published a **Google Search** capability to the org Capabilities catalog (typically via the config app's one-click **Add to catalog** button; see the *Platform admin setup* accordion above, §2), so you just pick it from the catalog. When the published entry points at a shared instance backed by a platform Google key, no per-agent allowlist applies. > > **1. Open your agent in Agent Creator** > > Open the agent you want to extend and go to its capabilities / tools. > > **2. Add the Google Search capability** > > Browse the capability catalog, select **Google Search**, and enable it. The MCP endpoint URL and the *Scope* (`context_id,agent_id,user_id`) are already wired by the admin; nothing to paste, and the shared instance accepts every agent granted the capability, so there is no allowlist step on your side. > > **3. Use it** > > No sign-in is needed; the platform key backs every call. Ask the agent a question that needs the web; it calls `search` and grounds its answer with cited sources. > > > [!NOTE] > > > > Convenient, but your agent runs against a **shared, platform-managed instance**: its Google credential and quota are owned by the platform and the instance accepts every agent that is granted the capability. Prefer Option B for anything beyond quick experiments. > > ## Option B: Run it from your own workspace (recommended) > > For production agents, install the connector in **your own workspace** and point the agent at *that* workspace's MCP endpoint. > > > [!WARNING] > > > > **Prefer this mode for security.** Because the MCP runs in *your* app-instance context, the Google credential, the search quota and the authorized-agents allowlist are all **scoped to your workspace**, not shared platform-wide. You decide exactly which agents may call it and which Google key / backend backs them, and a misconfiguration elsewhere can never consume your quota. The shared catalog capability (Option A) is a broad surface many agents can reach; your own workspace is an isolated, least-privilege boundary. > > **1. Install and configure the connector in your workspace** > > Follow the *Workspace builder* tab: install **Google Search** in your workspace, open its **Configuration app**, paste your Google API key (or service-account JSON) and, optionally, a Programmable Search Engine `cx`. > > **2. Allowlist your agent** > > In that workspace's config app, open **Authorized agents** and tick your agent (the **Install capability** button does this for you), or enable **Allow all agents**. > > **3. Add the MCP capability to your agent** > > In your agent, add a capability pointing at **your workspace's MCP Endpoint** URL, and set its **Scope** to: > > ```text theme={null} > context_id,agent_id,user_id > ``` > > The `agent_id` is what lets the connector identify and authorize your agent; without it, every call is rejected with an explicit "agent could not be identified" message. > > > [!NOTE] > > > > To skip pasting the endpoint by hand, an org owner / admin can use the config app's one-click **Add to catalog** button to register *this workspace's* endpoint as a Capabilities-catalog entry; then any builder picks it from the catalog (Option A). The connector still enforces this workspace's authorized-agents allowlist, so only the agents you ticked can actually call it. > > ## Brief the agent in its system prompt > > Whichever option you pick, wiring the capability is not enough: the agent must know the tool exists and when to use it. Copy-pasteable starter: > > ```text theme={null} > You have access to the Google Search MCP server (tool: search). Use it whenever the question needs fresh, post-cutoff or external web information (news, prices, schedules, official docs, product specs); prefer calling search over guessing. Pass the user's intent as `q`; combine Google operators (site:, intitle:, -exclude, "exact phrase") inside q. When the tool returns an `answer` with sources, ground your reply on them and cite the links. > ``` > > > [!NOTE] > > > > **Legacy AI Knowledge agents** (no native MCP picker): add the connector under **Advanced > Tools > MCP** and paste the **MCP Endpoint** URL. The agent still has to be allowlisted in the config app and its identity propagated so the connector can read its `agent_id`. > > ## Available Tools > > | Tool | Description | > | - | - | > | `search` | Google web search returning top organic results plus, when available, a synthesized `answer` with cited sources. Backend auto-selected per tenant: Custom Search (with a configured `cx`, rich filters + image search) or Gemini Grounding (whole-web search of the entire web). Only `q` is required; combine Google operators inside `q`. | > > ## Output Formats > > The `search` tool accepts an `outputFormat` argument that controls the MCP response shape: > > * **`verbose`** (default): a human-readable markdown view (answer + sources with links + the queries actually run), optimized for LLM consumption and clickable source cards. > * **`structured`**: concise machine-readable JSON in `structuredContent`. > * **`both`**: the structured payload, with its JSON also rendered as text. > > The structured payload shape is: > > ```json theme={null} > { > "query": "…", > "backend": "grounding | customSearch", > "answer": "synthesized answer (Grounding only)", > "totalResults": "123000", > "searchQueries": ["…"], > "items": [{ "title": "…", "link": "…", "displayLink": "…", "snippet": "…" }], > "warnings": [] > } > ``` > > > [!NOTE] > > > > In Grounding mode, most `options.*` parameters are *hints* Gemini may ignore; anything skipped is reported in `warnings`. `searchType: "image"` is rejected in Grounding mode (Custom Search only). > > ## Tool Details > > ### search > > ```json theme={null} > { > "name": "search", > "arguments": { > "q": "prisme.ai pricing", > "options": { > "dateRestrict": "m1", > "siteSearch": "prisme.ai", > "num": 5 > } > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `q` | Yes | Search query. Supports Google operators (`site:`, `intitle:`, `-exclude`, `"exact phrase"`). | > | `options.cx` | No | Programmable Search Engine id; overrides the tenant `cx` for this call (Custom Search only). | > | `options.num` | No | Number of results, 1-10 (Custom Search only). | > | `options.dateRestrict` | No | Restrict by date: `d{n}` / `w{n}` / `m{n}` / `y{n}` (e.g. `d7` = last 7 days). | > | `options.siteSearch` | No | Limit to a site (e.g. `wikipedia.org`); pair with `options.siteSearchFilter` (`i` include / `e` exclude). | > | `options.lr` / `options.gl` / `options.hl` | No | Language restriction (`lang_fr`), country boost (`fr`), interface language. | > | `options.searchType` | No | Set to `image` for an image search (**Custom Search only**; rejected in Grounding). Pair with `imgSize` / `imgType` / `imgColorType` / `imgDominantColor`. | > | `outputFormat` | No | `verbose` (default), `structured`, or `both`. | > [tab] Workspace builder (DSUL) > > ## Workspace builder > > **Goal:** install the connector in a workspace, configure the Google credential and the agent allowlist, and call `search` from your automations. > > ## Installation > > 1. Go to **Apps** in your workspace > 2. Search for **Google Search** and install it > 3. Open the **Configuration app** (the link auto-populated on install) to paste your Google credential, optionally set a Programmable Search Engine `cx`, and allow the agents that may call the connector > > ## Configuration > > | Field | Description | > | - | - | > | **Configuration app** | Auto-populated on install; open this link to set the Google credential (API key or service-account JSON), choose the backend via `cx`, and manage the authorized-agents allowlist. | > > The configuration app drives everything; the app instance itself has no per-field credential form. From it you provide a credential, which selects the auth mode: > > | Credential | What you provide | Best for | > | - | - | - | > | **Google Cloud API key** | An `AIza…` key (sent as `X-goog-api-key`) | Simplest setup; interactive / low-volume use | > | **Service-account JSON** | A Google service-account key JSON (signed into a short-lived Bearer token, cached) | Server-to-server, no interactive key rotation | > > The **backend** is selected automatically from the `cx` field: > > | Backend | Selected when | Behavior | > | - | - | - | > | **Gemini Grounding** (default) | `cx` is empty | Real google.com search of the whole web; returns a synthesized `answer` + cited sources. `options.*` are hints. | > | **Custom Search JSON API** (legacy) | `cx` is set (a Programmable Search Engine id) | Ranked organic results with rich filters (`num`, `dateRestrict`, `siteSearch`, language) and image search. Scoped to the **sites whitelisted in the PSE context**, never the open web (Google retired "Search the entire web" for new engines). | > > > [!NOTE] > > > > Credentials are provisioned into the workspace's Secrets and resolved server-side. The agent allowlist (**Authorized agents**) gates which Agent Creator agents may call the MCP endpoint; see the *Agent builder* tab. A workspace with no credential of its own transparently falls back to the platform global key (if a *Platform admin* set one). > > ## Available Instructions > > Every instruction resolves the credential from the workspace configuration. > > ### Web Search > > | Instruction | Description | Returns | > | - | - | - | > | `search` | Run a Google web search. `q` (required) is the query; combine Google operators inside it (`site:`, `intitle:`, `-exclude`, `"exact phrase"`). `options` carries fine-grained filters (date, site, language, file type, image search) honored by the Custom Search backend and treated as hints by Grounding. The backend is auto-selected from the tenant `cx`. | `{ query, backend, answer, totalResults, searchQueries, items: [{ title, link, displayLink, snippet }], warnings }` | > > > [!NOTE] > > > > `Returns` shows the shape of the operation output. In Grounding mode `answer` is the synthesized response and `items` are the cited sources; in Custom Search mode `answer` is empty and `items` are the ranked organic results. > > ## DSUL Examples > > **Grounded web search (default backend):** > > ```yaml theme={null} > - Google Search.search: > q: "latest Prisme.ai release notes" > output: result > # result.answer = synthesized answer, result.items = cited sources > ``` > > **Recent news restricted to a site:** > > ```yaml theme={null} > - Google Search.search: > q: "AI regulation" > options: > dateRestrict: w2 > siteSearch: lemonde.fr > siteSearchFilter: i > num: 5 > output: news > ``` > > **Image search (Custom Search backend; requires a `cx`):** > > ```yaml theme={null} > - Google Search.search: > q: "Eiffel tower at night" > options: > searchType: image > imgSize: large > imgType: photo > num: 8 > output: images > ``` > > **Find PDFs on a specific domain:** > > ```yaml theme={null} > - Google Search.search: > q: "annual report filetype:pdf site:berkshirehathaway.com" > options: > num: 10 > output: docs > ``` *** ## Error Handling | HTTP code | Meaning | | - | - | | `400` | Bad request: invalid parameters or a malformed query. | | `401` | Authentication failed: the Google API key is missing, invalid or revoked. | | `403` | Forbidden: the key lacks access, or the matching API is not enabled (Generative Language API for Grounding, Custom Search API for the legacy `cx` backend). | | `404` | Not found: wrong endpoint or resource. | | `429` | Rate limit / quota exceeded: back off and retry (the Gemini free tier is especially low). | | `500` / `503` | Google service error: transient; retry shortly. | ### Common Issues **"This agent is not authorized to use this connector"**: The calling agent is not in the allowlist. Open the configuration app → **Authorized agents** → tick this agent (or enable **Allow all agents**) and Save. **"The calling agent could not be identified"**: The MCP capability *Scope* does not declare `agent_id`, so Agent Creator never injects the agent identity. Set the Scope to `context_id,agent_id,user_id` on the capability, then allow the agent in the config app. **"The platform global Google key is not configured" / "No platform global Google key is configured"**: The workspace has no credential of its own and no platform global key is set. Paste a Google API key in the config app, or ask the platform administrator to set the global key on the core `google-search` workspace. **"Google API credential is malformed"**: The pasted value is neither a valid `AIza…` API key nor a parseable service-account JSON. Re-copy the credential from the Google Cloud Console. **Image search returns nothing / an error**: `searchType: image` only works on the **Custom Search** backend. Configure a Programmable Search Engine `cx` in the config app; in Grounding mode image search is rejected. **Filters seem ignored**: In Grounding mode most `options.*` parameters (`num`, `dateRestrict`, `siteSearch`, …) are *hints* Gemini may not honor; check the `warnings` array in the structured output. Set a `cx` to switch to Custom Search, where filters are enforced. ## External Resources > [card] [Custom Search JSON API](https://developers.google.com/custom-search/v1/overview) > > Official reference for the Custom Search JSON API, query parameters and Programmable Search Engines. > [card] [Grounding with Google Search](https://ai.google.dev/gemini-api/docs/google-search) > > How Gemini grounds answers with Google Search, the default backend of this connector. > [card] [Tool Agents](/products/agent-factory/capabilities) > > Learn how Agent Creator agents consume MCP tools in Prisme.ai. # Google Workspaces Source: https://docs.prisme.ai/apps-store/marketplace/connectors/google-workspaces Drive, Docs, Sheets, Gmail and Calendar from Agent Creator agents and Builder workflows, with per-user OAuth, service-account or access-token auth ![Google Workspaces](https://mintcdn.com/prismeai/F02uRm0EmKM1XN6s/images/connectors/google-workspaces.png?fit=max\&auto=format\&n=F02uRm0EmKM1XN6s\&q=85\&s=f46c6d14b7a7968997acedd7affe51d8) The Google Workspaces app provides read/write access to five [Google Workspace](https://workspace.google.com) APIs (Drive, Docs, Sheets, Gmail and Calendar) through their official REST endpoints. It can be consumed two ways: as a remote MCP server that **Agent Creator** agents call as tools, or as a Builder app whose instructions you call directly from DSUL. The MCP surface groups every operation into **five entity tools** (`drive`, `docs`, `sheets`, `gmail`, `calendar`), each driven by an `action` argument, and runs in the **tenant app-instance context** (it resolves the installing workspace's own credentials). Authentication is per-user and supports several modes: * **Per-user OAuth2 with a central client** (`oauthCentral`, recommended): one Google OAuth Application is registered once by the platform maintainer; every end user signs in with their own Google account. Nothing to register per tenant: each workspace just installs the app and clicks *Connect*. * **Per-user OAuth2 with a tenant client** (`oauth`): paste your own Google OAuth client ID/secret in the connector config app. Each user signs in with their own account against your client (PKCE authorization-code flow). * **Service account with JWT Bearer** (`jwt`): a Google service-account key, with optional domain-wide delegation (`subject`) to impersonate users across a Workspace domain. No interactive sign-in. * **Direct access token** (`accessToken`): a caller-managed Google access token, used as-is with no exchange. > [card] Drive, Docs & Sheets > > Browse and manage Drive files, folders and sharing permissions, create and edit Docs, read and write Sheets values and structure > [card] Gmail & Calendar > > Read, send, label and organize Gmail messages, drafts and threads; list, create and update Calendar events and query free/busy > [card] Flexible per-user auth > > Per-user OAuth (central or tenant client), service-account JWT with optional domain-wide delegation, or a direct access token ## Who is this for? This connector is used by four different roles. Jump to the section that matches yours; each one is self-contained. > [card] Agent builder > > You build agents in **Agent Creator** and want them to read and act on Google Workspace. → *Agent builder* tab. > [card] Knowledge base owner > > You want Google Drive files indexed and searchable semantically, kept up to date. → *Knowledge base (sync)* tab. > [card] Platform admin > > You run the platform and set up the shared Google OAuth client once for everyone. → *Platform admin setup* accordion below. > [card] Workspace builder > > You write Builder automations (DSUL) that call Google operations directly. → *Workspace builder* tab. ## Prerequisites (Google side) * A **Google** account (or a Google Workspace domain for service-account / domain-wide delegation). * The Google APIs you intend to call must be **enabled** in the Cloud project: Drive, Docs, Sheets, Gmail, Calendar. * An OAuth client or service-account key, depending on the auth mode (see the *Platform admin setup* accordion below and the *Workspace builder* tab). The OAuth scopes requested by default are: ```text theme={null} https://www.googleapis.com/auth/drive https://www.googleapis.com/auth/documents https://www.googleapis.com/auth/spreadsheets https://www.googleapis.com/auth/gmail.modify https://www.googleapis.com/auth/calendar openid email ``` > [accordion] Platform admin (Governance): one-time platform setup > > **Goal:** two one-time tasks: (1) configure the shared **central OAuth client** so every workspace lets its users sign in with their own Google account, and (2) expose Google Workspaces as a reusable **capability** in AI Governance so agent builders can pick it without pasting endpoint URLs. > > ## 1. Configure the connector > > **1. Register the OAuth Application at Google** > > In the [Google Cloud Console](https://console.cloud.google.com/apis/credentials), open **APIs & Services > Credentials > Create credentials > OAuth client ID**, type *Web application*. Set the single authorized redirect URI to the core workspace callback: > > ```text theme={null} > /workspaces/slug:google-workspaces/webhooks/oauthCallback > ``` > > (e.g. `https://api.studio.prisme.ai/v2/workspaces/slug:google-workspaces/webhooks/oauthCallback` on production). Enable the Drive, Docs, Sheets, Gmail and Calendar APIs in the same project, and add the scopes listed in *Prerequisites*. Save the **Client ID** + **Client Secret**. > > **2. Enter the credentials through the configuration app** > > Open the central `google-workspaces` workspace and launch its **Configuration app** at `/apps/google-workspaces` (e.g. `https://studio.prisme.ai/apps/google-workspaces`), also linked as `Configuration app` on the installed instance. Follow the in-app instructions to paste the **Client ID** and **Client Secret**; the app stores them in the core workspace's secrets for you. Do not edit Studio's raw Secrets by hand. These credentials stay in the `google-workspaces` workspace and are never exposed to tenants or end users; token exchange is proxied through the core `centralTokenExchange` webhook so the client secret never leaves the core workspace. > > **3. Tell workspaces to use the central client** > > Each consuming workspace selects auth mode **`oauthCentral`** in the connector configuration app (no client id/secret to enter on their side). Their users then just click **Connect**. > > ## 2. Declare the capability in AI Governance > > Generic connectors (broad tool surfaces meant to be shared across many agents, like Google Workspaces) are best exposed as a named **capability** in AI Governance. Agent builders then enable that capability on their agents instead of pasting a raw MCP endpoint. > > **1. Open AI Governance > Capabilities** > > Create (or edit) the **Google Workspaces** capability. > > **2. Point it at the MCP endpoint** > > Set the capability's MCP server URL to the connector's **MCP Endpoint**, and set its **Scope** to: > > ```text theme={null} > context_id,agent_id,user_id > ``` > > The `agent_id` in the scope is what lets the connector identify and authorize the calling agent. > > **3. Make it available to agent builders** > > Once created, the capability appears in the capability picker for agent builders in your organization, who enable it on their agents. Access to the catalog follows your organization's existing roles; there is no per-capability role grant. > > **4. Smoke-test** > > From an agent that has the capability, in a workspace configured for `oauthCentral`, trigger any tool. The user is prompted to connect once (Google sign-in); subsequent calls reuse the stored token transparently and refresh it automatically. > > > [!WARNING] > > > > Declaring the capability makes the connector **available**; it does not by itself authorize a specific agent. This connector follows the **tenant-context model**: which agents may actually call it is gated per-workspace by the **authorized-agents allowlist** in the configuration app (see the *Workspace builder* tab). Agents show a **Connect** button only if the catalog entry carries the connector's connect / status / disconnect webhooks in its `auth` block. The configuration app's **Add to catalog** button writes it for you. If you create the entry by hand, paste that block into **Auth Configuration**: the platform adds it later on its own only for a workspace endpoint (ending in `.mcp`), never for the connector's global `/webhooks/mcp` endpoint. *** > [tab] Agent builder (Agent Creator) > > ## Agent builder > > **Goal:** let an agent you build in Agent Creator read and act on Google Workspace through MCP tools. > > > [!NOTE] > > > > Before an agent can call the connector, a *Workspace builder* must have installed and configured the Google Workspaces app in a workspace (see the *Workspace builder* tab), and, for the central OAuth mode, a *Platform admin* must have provisioned the shared OAuth client (see the *Platform admin setup* accordion above). > > This connector runs in the **tenant app-instance context**: your agent is authorized two ways at once: it is identified by the `agent_id` that Agent Creator injects through the capability *Scope*, and that agent must appear in the connector's **authorized-agents allowlist** (managed in the configuration app). The Google access token itself is resolved server-side from the configured auth mode. > > There are two ways to wire it up. Pick based on how much isolation you need. > > ## Option A: Enable the shared capability from the catalog > > The fastest path: a *Platform admin* has already published a **Google Workspaces** capability (see the *Platform admin setup* accordion above, §2), so you just pick it from the catalog. > > **1. Open your agent in Agent Creator** > > Open the agent you want to extend and go to its capabilities / tools. > > **2. Add the Google Workspaces capability** > > Browse the capability catalog, select **Google Workspaces**, and enable it. The MCP endpoint URL and the *Scope* (`context_id,agent_id,user_id`) are already wired by the admin; there is nothing to paste, and the shared instance accepts every agent, so there is no allowlist step on your side. > > **3. Connect a Google account (OAuth modes)** > > On the first tool call, an unconnected user is prompted to sign in; Agent Creator surfaces a `connect_url`. Service-account (`jwt`) and `accessToken` modes need no per-user sign-in. > > > [!NOTE] > > > > Convenient, but your agent runs against a **shared, platform-managed instance**: its Google credentials are owned by someone else and the instance accepts every agent that is granted the capability. Prefer Option B for anything beyond quick experiments. > > ## Option B: Run it from your own workspace (recommended) > > For production agents, install the connector in **your own workspace** and point the agent at *that* workspace's MCP endpoint. > > > [!WARNING] > > > > **Prefer this mode for security.** Because the MCP runs in *your* app-instance context, the Google credentials, the per-user OAuth tokens and the authorized-agents allowlist are all **scoped to your workspace**, not shared platform-wide. You decide exactly which agents may call it and which Google account / auth mode backs them, and a misconfiguration elsewhere can never expose your data. The shared catalog capability (Option A) is a broad surface many agents can reach; your own workspace is an isolated, least-privilege boundary. > > **1. Install and configure the connector in your workspace** > > Follow the *Workspace builder* tab: install **Google Workspaces** in your workspace, open its **Configuration app**, choose the auth mode and connect a Google account. > > **2. Allowlist your agent** > > In that workspace's config app, open **Authorized agents** and tick your agent (the **Install capability** button does this for you). > > **3. Add the MCP capability to your agent** > > In your agent, add a capability pointing at **your workspace's MCP Endpoint** URL, and set its **Scope** to: > > ```text theme={null} > context_id,agent_id,user_id > ``` > > The `agent_id` is what lets the connector identify and authorize your agent; without it, every call is rejected with an explicit "agent could not be identified" message. This *Scope* is separate from the Google OAuth scopes. > > **4. Connect a Google account (OAuth modes)** > > On the first tool call, the user is prompted to sign in (or uses **Connect** in the config app). > > ## Brief the agent in its system prompt > > Whichever option you pick, wiring the capability is not enough; the agent must know the MCP exists and when to use it. Copy-pasteable starter: > > ```text theme={null} > You have access to the Google Workspaces MCP server (tools: drive, docs, sheets, gmail, calendar). Each tool takes an `action` argument. Use it whenever the user asks about their Google Drive files, Docs, Sheets, Gmail or Calendar: listing, searching, reading, creating or updating. Prefer calling a tool over guessing, and confirm with the user before any destructive action (delete, trash, overwrite, share changes). > ``` > > > [!NOTE] > > > > **Legacy AI Knowledge agents** (no native MCP picker): add the connector under **Advanced > Tools > MCP** and paste the **MCP Endpoint** URL. The agent still has to be allowlisted in the config app and its identity propagated so the connector can read its `agent_id`. > > > [!NOTE] > > > > **Restricting to read-only (least privilege).** Google Workspaces tools cover both reads and writes (edit docs/sheets, modify Gmail, create events). The requested OAuth scopes **are** the grant, so the connector only obtains what the **Scopes** field in the configuration app asks for. To allow only read access, set a read-only scope list, e.g.: > > > > ```text theme={null} > > https://www.googleapis.com/auth/drive.readonly https://www.googleapis.com/auth/documents.readonly https://www.googleapis.com/auth/spreadsheets.readonly https://www.googleapis.com/auth/gmail.readonly https://www.googleapis.com/auth/calendar.readonly openid email > > ``` > > > > With central OAuth (`oauthCentral`) you do **not** create your own Google client; keep `oauthCentral` and just enter the read-only scopes; your tenant scope overrides the platform default (the central app's consent screen must declare these read scopes). Write calls are then rejected by Google with `403`. Note this is set at the workspace level: a workspace editor can widen it again; a provider-side restriction is the only hard guarantee. > > ## Available Tools > > Each tool takes an `action` argument selecting the concrete operation, plus the per-action parameters. > > | Tool | Description | > | - | - | > | `drive` | Google Drive: files & permissions. Actions: `list`, `get`, `create`, `update`, `delete`, `copy`, `export`, `permissionsList`, `permissionsCreate`, `permissionsDelete`. | > | `docs` | Google Docs. Actions: `get`, `create`, `batchUpdate`. | > | `sheets` | Google Sheets. Actions: `get`, `create`, `valuesGet`, `valuesUpdate`, `valuesAppend`, `valuesClear`, `batchUpdate`. | > | `gmail` | Gmail (current user). Actions: `getProfile`, `messagesList`, `messagesGet`, `messagesSend`, `messagesModify`, `messagesTrash`, `draftsCreate`, `labelsList`, `threadsGet`. | > | `calendar` | Google Calendar. Actions: `eventsList`, `eventsGet`, `eventsInsert`, `eventsUpdate`, `eventsDelete`, `calendarList`, `freebusy`. | > > ## Output Formats > > Every tool accepts an `outputFormat` argument that controls the MCP response shape: > > * **`verbose`** (default): human-readable text optimized for LLM consumption > * **`compact`**: concise machine-readable JSON in `structuredContent` > > ## Tool Details > > ### drive > > ```json theme={null} > { > "name": "drive", > "arguments": { > "action": "list", > "q": "name contains 'report' and trashed = false", > "fields": "files(id,name,mimeType,modifiedTime)" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | One of `list`, `get`, `create`, `update`, `delete`, `copy`, `export`, `permissionsList`, `permissionsCreate`, `permissionsDelete`. | > | `fileId` | For get/update/delete/copy/export/permissions\* | Drive file id. | > | `q` | No | Search query (list), e.g. `mimeType='application/vnd.google-apps.folder'`. | > | `mimeType` | For export | Target MIME type, e.g. `application/pdf`. | > | `body` | For create/update/copy/permissionsCreate | File metadata, or `{role,type,emailAddress}` for a permission. | > > ### sheets > > ```json theme={null} > { > "name": "sheets", > "arguments": { > "action": "valuesUpdate", > "spreadsheetId": "1AbcD...", > "range": "Sheet1!A1:C2", > "valueInputOption": "USER_ENTERED", > "body": { "values": [["Name", "Email", "Score"], ["Ada", "ada@x.io", 99]] } > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | One of `get`, `create`, `valuesGet`, `valuesUpdate`, `valuesAppend`, `valuesClear`, `batchUpdate`. | > | `spreadsheetId` | For all but create | Target spreadsheet id. | > | `range` | For values\* | A1 notation, e.g. `Sheet1!A1:C10`. | > | `valueInputOption` | For valuesUpdate/valuesAppend | `RAW` or `USER_ENTERED`. | > | `body` | For create/values\*/batchUpdate | Spreadsheet resource, `{values:[[...]]}`, or `{requests:[...]}`. | > > ### gmail > > ```json theme={null} > { > "name": "gmail", > "arguments": { > "action": "messagesSend", > "body": { "to": "ada@x.io", "subject": "Hello", "text": "Plain body, no base64." } > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | One of `getProfile`, `messagesList`, `messagesGet`, `messagesSend`, `messagesModify`, `messagesTrash`, `draftsCreate`, `labelsList`, `threadsGet`. | > | `id` | For messagesGet/Modify/Trash, threadsGet | Message or thread id. | > | `q` | No | Gmail search query (messagesList), e.g. `from:x is:unread`. | > | `body` | For messagesSend/draftsCreate/Modify | Send/draft: `{to,subject,text\|html,cc,bcc,replyTo,inReplyTo,threadId}` as plain strings (server-side MIME + base64; never encode yourself); modify: `{addLabelIds,removeLabelIds}`. | > > > [!NOTE] > > > > Resolve "me" / "my email" with a single `getProfile` call; it returns `{emailAddress, messagesTotal}`. Never list messages to discover the connected address. > > ### calendar > > ```json theme={null} > { > "name": "calendar", > "arguments": { > "action": "eventsList", > "calendarId": "primary", > "timeMin": "2026-07-01T00:00:00Z", > "timeMax": "2026-07-08T00:00:00Z", > "singleEvents": true, > "orderBy": "startTime" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | One of `eventsList`, `eventsGet`, `eventsInsert`, `eventsUpdate`, `eventsDelete`, `calendarList`, `freebusy`. | > | `calendarId` | No | Calendar id (defaults to `primary`). | > | `eventId` | For eventsGet/Update/Delete | Target event id. | > | `body` | For eventsInsert/Update, freebusy | Event resource `{summary,start,end,attendees}`, or freebusy request `{timeMin,timeMax,items}`. | > [tab] Workspace builder (DSUL) > > ## Workspace builder > > **Goal:** install the connector in a workspace, configure authentication and the agent allowlist, and call Google operations from your automations. > > ## Installation > > 1. Go to **Apps** in your workspace > 2. Search for **Google Workspaces** and install it > 3. Open the **Configuration app** (the link auto-populated on install) to choose the auth mode, provide credentials, connect, and allow the agents that may call the connector > > ## Configuration > > | Field | Description | > | - | - | > | **Configuration app** | Auto-populated on install; open this link to configure authentication (mode + credentials), connect a Google account (OAuth modes), and manage the authorized-agents allowlist. | > > The configuration app drives everything; the app instance itself has no per-field credential form. From it you pick one of: > > | Auth mode | What you provide | Best for | > | - | - | - | > | `oauthCentral` | Nothing; just click **Connect** | Workspaces on a platform where the admin set up the central client | > | `oauth` | Your own Google **Client ID + Secret** (redirect URI `/workspaces/slug:/webhooks/.oauthCallback`) | You manage your own Google OAuth app | > | `jwt` | A service-account **JSON key** (+ optional `subject` for domain-wide delegation) | Server-to-server, no interactive sign-in | > | `accessToken` | A pre-minted Google **access token** | Short-lived / caller-managed tokens | > > > [!NOTE] > > > > Credentials are provisioned into the workspace's Secrets by the `onInstall` flow and resolved server-side. The agent allowlist (**Authorized agents**) gates which Agent Creator agents may call the MCP endpoint; see the *Agent builder* tab. > > ## Available Instructions > > Every instruction resolves credentials from the workspace configuration. Operations are grouped by Google product; the MCP server exposes the same operations behind the five entity tools (see the *Agent builder* tab). > > ### Drive > > | Instruction | Description | Returns | > | - | - | - | > | `driveList` | List or search files and folders. Filter with `q` (Drive query syntax), paginate with `pageToken`, shape the payload with a `fields` selector. | `{ files: [{ id, name, mimeType, modifiedTime, … }], nextPageToken }` | > | `driveGet` | Fetch one file's metadata by `fileId`. | A File resource `{ id, name, mimeType, parents, webViewLink, … }` (fields-selectable). | > | `driveCreate` | Create a file or folder from a `body` metadata object (`{ name, mimeType, parents }`). | The created File resource `{ id, name, mimeType, … }`. | > | `driveUpdate` | Update file metadata or move it across folders with `addParents` / `removeParents`. | The updated File resource. | > | `driveDelete` | Permanently delete a file by `fileId`. | Empty (HTTP 204). | > | `driveCopy` | Duplicate a file by `fileId`; override metadata via `body`. | The new (copied) File resource `{ id, name, … }`. | > | `driveExport` | Export a Google-native file (Doc/Sheet/Slide) to a `mimeType` (e.g. `application/pdf`). | The exported file bytes in the requested format. | > | `drivePermissionsList` | List the sharing permissions on a file. | `{ permissions: [{ id, type, role, emailAddress }] }` | > | `drivePermissionsCreate` | Share a file: `body` = `{ role, type, emailAddress }`. | The created Permission `{ id, type, role }`. | > | `drivePermissionsDelete` | Revoke a permission by `permissionId`. | Empty (HTTP 204). | > > ### Docs > > | Instruction | Description | Returns | > | - | - | - | > | `docsGet` | Read a document's full content tree by `documentId`. | A Document resource `{ documentId, title, body, … }`. | > | `docsCreate` | Create a blank document; `body` = `{ title }`. | The created Document `{ documentId, title }`. | > | `docsBatchUpdate` | Apply an ordered list of edit requests (`body.requests[]`: insert text, format, tables, …) to a document. | `{ documentId, replies: [...] }` | > > ### Sheets > > | Instruction | Description | Returns | > | - | - | - | > | `sheetsGet` | Read spreadsheet structure and (optionally) grid data by `spreadsheetId`. | A Spreadsheet resource `{ spreadsheetId, properties, sheets: [...], spreadsheetUrl }`. | > | `sheetsCreate` | Create a spreadsheet from a `body` resource (e.g. `{ properties: { title } }`). | The created Spreadsheet `{ spreadsheetId, spreadsheetUrl, sheets }`. | > | `sheetsValuesGet` | Read cell values in A1 `range`. | `{ range, majorDimension, values: [[ … ]] }` | > | `sheetsValuesUpdate` | Overwrite cells in `range`; `body` = `{ values: [[ … ]] }`, with `valueInputOption` `RAW`/`USER_ENTERED`. | `{ spreadsheetId, updatedRange, updatedRows, updatedColumns, updatedCells }` | > | `sheetsValuesAppend` | Append rows after the last row of a table in `range`. | `{ spreadsheetId, tableRange, updates: { updatedRange, updatedRows, … } }` | > | `sheetsValuesClear` | Clear cell values in `range` (keeps formatting). | `{ spreadsheetId, clearedRange }` | > | `sheetsBatchUpdate` | Apply structural edit requests (`body.requests[]`: add sheets, formatting, charts, …). | `{ spreadsheetId, replies: [...] }` | > > ### Gmail > > | Instruction | Description | Returns | > | - | - | - | > | `gmailGetProfile` | Resolve the connected account ("me" / "my email") in one call. | `{ emailAddress, messagesTotal, threadsTotal, historyId }` | > | `gmailMessagesList` | List/search message ids; filter with `q` (Gmail search syntax) and `labelIds`. | `{ messages: [{ id, threadId }], nextPageToken, resultSizeEstimate }` | > | `gmailMessagesGet` | Fetch one message by `id`; `format` controls verbosity (`minimal`/`full`/`metadata`/`raw`). | A Message resource `{ id, threadId, labelIds, snippet, payload, … }`. | > | `gmailMessagesSend` | Send an email; `body` = `{ to, subject, text\|html, cc, bcc, … }` as plain strings (server builds the MIME). | The sent Message `{ id, threadId, labelIds }`. | > | `gmailMessagesModify` | Add/remove labels on a message; `body` = `{ addLabelIds, removeLabelIds }`. | The updated Message `{ id, threadId, labelIds }`. | > | `gmailMessagesTrash` | Move a message to Trash by `id`. | The trashed Message `{ id, threadId, labelIds }`. | > | `gmailDraftsCreate` | Create a draft; `body` like `messagesSend`. | `{ id, message: { id, threadId } }` | > | `gmailLabelsList` | List all labels in the mailbox. | `{ labels: [{ id, name, type }] }` | > | `gmailThreadsGet` | Fetch a full conversation thread by `id`. | `{ id, historyId, messages: [ Message ] }` | > > ### Calendar > > | Instruction | Description | Returns | > | - | - | - | > | `calendarEventsList` | List events on `calendarId` (default `primary`) between `timeMin`/`timeMax`; `singleEvents` expands recurrences. | `{ items: [ Event ], nextPageToken, nextSyncToken }` | > | `calendarEventsGet` | Fetch one event by `eventId`. | An Event resource `{ id, summary, start, end, attendees, … }`. | > | `calendarEventsInsert` | Create an event; `body` = `{ summary, start, end, attendees }`. `sendUpdates` notifies guests. | The created Event `{ id, htmlLink, start, end, … }`. | > | `calendarEventsUpdate` | Update an event by `eventId` with a new `body`. | The updated Event resource. | > | `calendarEventsDelete` | Delete an event by `eventId`. | Empty (HTTP 204). | > | `calendarCalendarList` | List the calendars the account can access. | `{ items: [{ id, summary, accessRole, primary, … }] }` | > | `calendarFreebusy` | Query busy intervals; `body` = `{ timeMin, timeMax, items: [{ id }] }`. | `{ timeMin, timeMax, calendars: { : { busy: [{ start, end }] } } }` | > > > [!NOTE] > > > > `Returns` shows the shape of the operation output (the underlying Google API resource). `calendarId` defaults to `primary` when omitted. Gmail send/draft bodies take plain strings (`to`, `subject`, `text`/`html`, optional `cc`, `bcc`, `replyTo`, `inReplyTo`, `threadId`); the server builds and base64-encodes the MIME message itself. > > ## DSUL Examples > > **List the 10 most recently modified Drive files:** > > ```yaml theme={null} > - Google Workspaces.driveList: > q: "trashed = false" > orderBy: modifiedTime desc > pageSize: 10 > fields: "files(id,name,mimeType,modifiedTime)" > output: files > ``` > > **Create a spreadsheet, then write a header row:** > > ```yaml theme={null} > - Google Workspaces.sheetsCreate: > body: > properties: > title: '{{reportName}}' > output: sheet > - Google Workspaces.sheetsValuesUpdate: > spreadsheetId: '{{sheet.spreadsheetId}}' > range: "Sheet1!A1:C1" > valueInputOption: USER_ENTERED > body: > values: > - ["Date", "Customer", "Amount"] > ``` > > **Send an email to the connected account ("send me a summary"):** > > ```yaml theme={null} > - Google Workspaces.gmailGetProfile: {} > output: profile > - Google Workspaces.gmailMessagesSend: > body: > to: '{{profile.emailAddress}}' > subject: 'Daily summary' > text: '{{summaryText}}' > ``` > > **Create a calendar event with attendees:** > > ```yaml theme={null} > - Google Workspaces.calendarEventsInsert: > calendarId: primary > sendUpdates: all > body: > summary: 'Project kickoff' > start: > dateTime: '2026-07-01T10:00:00+02:00' > end: > dateTime: '2026-07-01T11:00:00+02:00' > attendees: > - email: '{{attendeeEmail}}' > output: event > ``` > [tab] Knowledge base (sync) > > ## Knowledge base > > **Goal:** index Google Drive files into a knowledge base so an agent can search their **content**, and keep that base up to date. > > > [!NOTE] > > > > Before a base can be attached, a *Workspace builder* must have installed and configured the Google Workspaces app in a workspace and connected a Google account or a service account (see the *Workspace builder* tab). Nothing else is needed: the same app instance serves both the agent tools and the sync surface. The **Authorized agents** allowlist does **not** apply here — it gates the connector as an agent *tool*, and has no effect on synchronization. > > ## What can be synced > > Only **Drive** is exposed as a knowledge source. Gmail messages and Calendar events are agent tools, not indexable resources; Docs, Sheets and Slides *are* synced, because Drive is where they live. > > ## How it fits together > > ```mermaid theme={null} > flowchart LR > Drive["Google Drive"] > Conn["Google Workspaces connector
MCP resources"] > Sync["Knowledge Sync
browse · diff · index"] > KB["Knowledge base
vector store"] > Agent["Agent"] > > Sync -->|"resources/list · resources/read"| Conn > Conn -->|"Drive API"| Drive > Sync -->|"documents"| KB > Agent -->|"search"| KB > Agent -.->|"per-reader access check"| Sync > ``` > > The resource tree is two levels deep — a **drive** (My Drive or a shared drive), then its **items**, folders included — and any container can be picked as a sync root: > > ```text theme={null} > gdrive://drive/{driveId} > gdrive://drive/{driveId}/item/{fileId} > ``` > > ## Attach the connector to a base > > **1. Copy the MCP endpoint** > > Open the connector's **Configuration app** in the workspace where it is installed; it displays and copies that workspace's MCP endpoint: > > ```text theme={null} > /workspaces//webhooks/.mcp > ``` > > **2. Create the connection in Knowledges** > > Go to **Knowledges → Connectors → New Connection → Your own MCP server**, paste the endpoint and click **Check**. > > **3. Browse to the folder you want** > > Pick a drive, descend into folders, and confirm with **Use this location**. Everything below the selected root is synced, nested folders included. > > **4. Pick the destination and sync** > > Choose an existing knowledge base or create one from the same step, then click **Sync Now**. Large drives are spread over several runs; the schedule (*Hourly* to *Daily*, under **Auto-sync**) finishes the job. > > The full wizard, the run history and the connection settings are documented once for every provider in [Knowledges → Connectors](/products/ai-knowledge/connectors). This tab covers only what is specific to Google Drive. > > > [!NOTE] > > > > Google Drive is normally also published as a **catalog connector**, which appears under **Available Providers** and asks each person to sign in with their own Google account. Attaching this connector's own endpoint instead is what lets a base be fed by a **service account** (`jwt` mode, optionally with domain-wide delegation) rather than by a person — the credential then belongs to the workspace, and no reader ever signs in for the sync. > > ## Who may sync, and who may read > > | Moment | Acts as | Authorized by | > | - | - | - | > | Attaching the connection, browsing the tree | You | Your **role on the workspace** holding the connector's configuration — the right to read that workspace is the right to read this Drive through it | > | A scheduled sync run | No user at all | The calling workspace must be listed in `knowledgeSync.trustedCallers`; the Knowledge Sync workspace ships there by default | > | Answering a reader's question | The reader | A live per-reader access check (`drive` / `checkAccess`) against the Drive API | > > > [!NOTE] > > > > **Per-user access control is supported and worth keeping on.** The connector declares an access tool, so each reader's own rights are re-checked in Drive at query time: a file you lost access to stops appearing in answers without waiting for the next sync. Turning it off serves every synced file to anyone who can query the agent, whatever their Drive rights. Note that a **service-account** connection feeds the base with the service account's own reach — restrict it at the source rather than counting on the selection made in the wizard. > > ## What gets indexed > > | Aspect | Behavior | > | - | - | > | Document unit | One Drive **file** = one document. Drives and folders are containers, never indexed themselves. | > | Google-native documents | Docs, Sheets and Slides are **exported to plain text** on the way in. Drive offers no anonymous pre-signed download URL, so the text travels inline. | > | Other files | Downloaded with the connector's own token and inlined as a bounded data URL, up to **4 MB**; inline text is capped at 200 000 characters. | > | Revision marker | `version`, falling back to `modifiedTime`. Unchanged files are never re-read and never re-indexed. | > | Identity | The Drive **file id**. Renaming or moving a file inside the synced root therefore does *not* re-index it. | > | Deletions | The Drive API exposes no delta feed here, so each run is a **full traversal**: a file absent from a complete listing is removed from the base. A listing that failed halfway deletes nothing. | > | Trashed files | Excluded from listings, so they leave the base on the next complete run. | > > > [!NOTE] > > > > **The Knowledge profile this connector declares** — the descriptor Knowledges probes at `gdrive://profile/knowledge`: > > > > | Field | Value | > > | - | - | > > | `provider` | `google-workspaces` | > > | `hierarchy` | `drive` › `item` | > > | `canonical_uri` | `gdrive://drive/{driveId}/item/{fileId}` | > > | `revision` | `version`, fallback `modifiedTime` | > > | `read` | Native export to `text/plain`; binaries inline as a data URL ≤ 4 MB; 200 000 characters of inline text | > > | `list` | 50 resources per page by default, 200 max; `delta_on_drive: false` | > > | `access` | Tool `drive`, action `checkAccess` | > > | `authentication` | `oauth`, `oauthCentral`, `serviceAccount`, `accessToken` | > > ## Troubleshooting the sync > > **The URL check says "You are not allowed to read it"**: you have no role on the workspace holding the connector's configuration. Ask its administrator for one — this is not about your Drive rights. > > **The URL check says "It answered, but could not serve its content"**: the connector itself is not fully configured. Open its configuration app and connect an account. > > **A shared drive does not appear**: the connected account (or the service account) is not a member of it. Drive membership is the only thing browsing can see. > > **A large file is missing from the base**: binaries travel inline and are bounded at 4 MB. Above that the file is reported in the connection's synchronization errors rather than half-indexed. > > **An exported document reads oddly**: Google-native files are exported to *plain text*, so tables and layout flatten. That is the format retrieval works on; the citation link still opens the real document. > > **A scheduled sync keeps running after a right was revoked**: the role check runs on the interactive paths only. A scheduled run is authorized as the platform's synchronization workspace — delete the connection to stop it for certain. *** ## Security The answers that hold for every connector (agent access, shared knowledge bases, credentials, models, egress) are on [Connector security](/apps-store/marketplace/connectors/security). This section lists what is specific to Google Workspaces. | Topic | Google Workspaces | | - | - | | Authentication family | Delegated OAuth (Google, authorization code with PKCE): each user connects their own Google account. | | Production modes | `oauthCentral` or `oauth` | | Modes to avoid in production | `accessToken` (testing only, and a Google access token expires after about an hour), `jwt` (service account, application-level and not delegated: with domain-wide delegation, every caller acts as the impersonated user) | | Read-only scopes | `drive.readonly`, `documents.readonly`, `spreadsheets.readonly`, `gmail.readonly`, `calendar.readonly`, plus `openid` and `email` (the **Read-only preset** of the configuration app). The default scopes include `drive`, `documents`, `spreadsheets`, `gmail.modify` and `calendar`, which allow writing. | | Agent allowlist | Yes, on the tenant endpoint (empty at installation). The global endpoint accepts every agent. | | Per-reader access control on knowledge bases | Yes: each Drive file is checked against the reader's own Google connection. | | Outbound hosts | `www.googleapis.com`, `gmail.googleapis.com`, `docs.googleapis.com`, `sheets.googleapis.com`, `oauth2.googleapis.com` | | Audit events | None specific to this connector | The scope names in the table are short forms of `https://www.googleapis.com/auth/`. With the read-only scopes, Google itself refuses every create, update, send and delete call. The `jwt` mode also requests the write scopes by default when no scope is set. The per-reader check always uses the reader's own Google connection, even when the instance indexes the knowledge base with a service account. *** ## Error Handling | HTTP code | Meaning | | - | - | | `400` | Bad request: invalid parameters or malformed body (e.g. bad A1 range, invalid file metadata). | | `401` | Unauthorized: the Google access token is missing, expired or revoked. The user must reconnect (OAuth modes). | | `403` | Forbidden: insufficient OAuth scope, the target API is not enabled in the Cloud project, or the account lacks access to the resource. | | `404` | Not found: the file, document, spreadsheet, message or event id does not exist or is not visible to the account. | | `429` | Rate limit / quota exceeded: back off and retry. | | `500` / `503` | Google service error: transient; retry shortly, no reconnection needed. | ### Common Issues **"This agent is not authorized to use this connector"**: The calling agent is not in the allowlist. Open the configuration app → **Authorized agents** → tick this agent (or enable **Allow all agents**) and Save. **"The calling agent could not be identified"**: The MCP capability *Scope* does not declare `agent_id`, so Agent Creator never injects the agent identity. Set the Scope to `context_id,agent_id,user_id` on the capability, then allow the agent in the config app. **"Google is not connected for this user"**: No per-user OAuth token. Open the configuration app (OAuth mode) and click **Connect**, or use the agent's connect flow. **"Google token refresh failed … must reconnect"**: The stored refresh token was revoked or expired (Google invalidated it). The connection is dropped automatically; the user must reconnect from the config app. **"Google OAuth is not configured"**: Neither a tenant OAuth client nor the central platform client is available. Set the OAuth client ID/secret in the config app, or ask the platform maintainer to provision the central OAuth client. **Gmail send fails or arrives garbled**: Pass `to`, `subject`, `text`/`html` as plain strings in `body`. The server builds and base64-encodes the MIME message itself; never base64-encode the content yourself. ## External Resources > [card] [Google Workspace APIs](https://developers.google.com/workspace) > > Official reference for the Drive, Docs, Sheets, Gmail and Calendar REST APIs. > [card] [Tool Agents](/products/agent-factory/capabilities) > > Learn how Agent Creator agents consume MCP tools in Prisme.ai. # Gryzzly Source: https://docs.prisme.ai/apps-store/marketplace/connectors/gryzzly Read and write Gryzzly time-tracking data from Agent Creator agents and Builder workflows: projects, tasks, declarations, leave periods and payroll exports ![Gryzzly](https://mintcdn.com/prismeai/Oqq72tWGTtxufvRl/images/connectors/gryzzly.svg?fit=max\&auto=format\&n=Oqq72tWGTtxufvRl\&q=85\&s=6de060c96ecf7ada316a8bff92ffad7e) The Gryzzly app exposes the [Gryzzly](https://www.gryzzly.io) time-tracking SaaS (v1 REST-RPC API) through entity tools. It can be consumed two ways: as a remote MCP server that **Agent Creator** agents call as tools, or as a Builder app whose instructions you call directly from DSUL. It runs in the **tenant app-instance context** (it resolves the installing workspace's own Gryzzly API key) and covers customers, projects, tasks, declarations (time entries), leave periods, discounts, purchases, users, groups, groupsets, tags, tagsets and project metrics. Authentication is a **Gryzzly API key** sent server-side as `Authorization: Bearer `, never exposed to the agent. Agents are identified by the capability **Scope** `context_id,agent_id,user_id` and gated by a per-workspace authorized-agents allowlist. > [card] Time tracking > > Declarations (time entries), leave periods and payroll-grade exports for invoicing and HR. > [card] Project structure > > Customers, projects, tasks, discounts, purchases and project metrics with budgets and contributors. > [card] Admin & org > > Users and roles, groups, groupsets, tags and tagsets. ## Who is this for? This connector is used by three different roles. Jump to the section that matches yours; each one is self-contained. > [card] Agent builder > > You build agents in **Agent Creator** and want them to use Gryzzly. → *Agent builder* tab. > [card] Platform admin > > You run the platform and set up Gryzzly once for everyone. → *Platform admin setup* accordion below. > [card] Workspace builder > > You write Builder automations (DSUL) that call Gryzzly operations directly. → *Workspace builder* tab. ## Prerequisites * A **Gryzzly** account with administrator access. * A **Gryzzly API key**: generated in the Gryzzly dashboard under **Administration > API Keys**. * The API key owner must have the Gryzzly role required for the resources you intend to use (a key with insufficient role gets `403` on writes). * Base URL (default: `https://api.gryzzly.io/v1`). > [accordion] Platform admin (Governance): one-time platform setup > > **Goal:** Gryzzly is a **per-workspace** connector: each workspace configures its own Gryzzly API key (see the *Workspace builder* tab), so there is **no platform-wide credential to provision**. The only optional platform task is to publish Gryzzly as a reusable **capability** in your org's Capabilities catalog so agent builders can enable it from the catalog instead of pasting a raw MCP endpoint. > > > [!NOTE] > > > > There is no shared Gryzzly credential and no central OAuth client for this connector. The Gryzzly API key and the authorized-agents allowlist always live in the consuming workspace. A capability you publish here points at a specific workspace's MCP endpoint; that workspace still owns the credential and the allowlist; even after the capability is in the catalog, only the agents that workspace allowlists can actually call it. > > ## Declare the capability in the Capabilities catalog (optional) > > > [!NOTE] > > > > **Easiest path: the one-click "Add to catalog" button.** The configuration app (in the *MCP endpoint* section) has an **Add to catalog** button that registers the connector org-wide in one click: it creates an `mcp`-type catalog entry pointing at this workspace's MCP endpoint with the *Scope* `context_id,agent_id,user_id` already set. If an entry already exists it offers **Update catalog entry** instead. The button is shown only to **org owners / admins**, and the published entry is **org-wide**; every builder in the org can then attach the connector (subject to the workspace allowlist). Use this instead of the manual steps below; they remain for when you want to author the capability by hand. > > **1. Open AI Governance > Capabilities** > > Create (or edit) the **Gryzzly** capability. > > **2. Point it at the MCP endpoint** > > Set the capability's MCP server URL to the connector's **MCP Endpoint** (the workspace running the connector), and set its **Scope** to: > > ```text theme={null} > context_id,agent_id,user_id > ``` > > The `agent_id` in the scope is what lets the connector identify and authorize the calling agent. > > **3. Make it available to agent builders** > > Once created, the capability appears in the capability picker for agent builders in your organization, who enable it on their agents. Access to the catalog follows your organization's existing roles; there is no per-capability role grant. Which agents may actually call this tenant-context connector is gated separately by the per-workspace allowlist (see below). > > > [!WARNING] > > > > Declaring the capability makes the connector **available**; it does not by itself authorize a specific agent. This connector follows the **tenant-context model**: which agents may actually call it is gated per-workspace by the **authorized-agents allowlist** in the configuration app (see the *Workspace builder* tab). There is **no OAuth auth-config JSON** to attach in Governance: authentication is a server-side Gryzzly API key, not a per-user OAuth flow. *** > [tab] Agent builder (Agent Creator) > > ## Agent builder > > **Goal:** let an agent you build in Agent Creator use Gryzzly through MCP tools. > > > [!NOTE] > > > > Before an agent can call the connector, a *Workspace builder* must have installed and configured the Gryzzly app in a workspace (see the *Workspace builder* tab). Optionally, a *Platform admin* may have published a Gryzzly capability in AI Governance (see the *Platform admin setup* accordion above). > > This connector runs in the **tenant app-instance context**: your agent is identified by the `agent_id` that Agent Creator injects through the capability *Scope*, and that agent must appear in the connector's **authorized-agents allowlist** (managed in the configuration app). The Gryzzly API key itself is resolved server-side, never exposed to the agent. > > > [!NOTE] > > > > **Easy path: pick it from the catalog.** If an org owner / admin used the config app's one-click **Add to catalog** button (see the *Platform admin setup* accordion above), **Gryzzly** already appears in your org's capability catalog with the MCP endpoint and *Scope* (`context_id,agent_id,user_id`) pre-wired; just select it on your agent, no endpoint to paste. The connector still enforces the workspace's authorized-agents allowlist, so your agent must be ticked there (step 2 below). Otherwise, wire the capability by hand with the steps below. > > **1. Install and configure the connector in your workspace** > > Follow the *Workspace builder* tab: install **Gryzzly** in your workspace, open its **Configuration app**, and paste your Gryzzly API key (and base URL if you are not on the default host). > > **2. Allowlist your agent** > > In that workspace's config app, open **Authorized agents** and tick your agent (the **Install capability** button does this for you), or enable **Allow all agents**. > > **3. Add the MCP capability to your agent** > > In your agent, add a capability pointing at **your workspace's MCP Endpoint** URL, and set its **Scope** to: > > ```text theme={null} > context_id,agent_id,user_id > ``` > > The `agent_id` is what lets the connector identify and authorize your agent; without it, every call is rejected with an explicit "agent could not be identified" message. > > **4. Brief the agent** > > Tell the agent the tools exist and when to use them. Copy-pasteable starter: > > ```text theme={null} > You have access to the Gryzzly MCP server. Use it whenever the user asks about time-tracking data: customers, projects, tasks, declarations, leave periods or payroll exports. Each tool takes an `action` argument (list, get, create, update, delete). Examples: "How many hours did I declare last week?", "Create a new project under customer Acme", "List my pending leave requests", "Export this month's declarations". Prefer calling a tool over guessing, and confirm with the user before any destructive action (delete a project, remove a declaration, cancel a leave period). > ``` > > Refine the trigger keywords (customer names, project codes, internal task labels) so the agent reliably picks up the right intent in your context. > > > [!NOTE] > > > > **Legacy AI Knowledge agents** (no native MCP picker): add the connector under **Advanced > Tools > MCP** and paste the **MCP Endpoint** URL. The agent still has to be allowlisted in the config app and its identity propagated so the connector can read its `agent_id`. > > ## Available Tools > > Each tool maps to a Gryzzly entity and takes an `action` argument selecting the concrete operation (`list`, `get`, `create`, `update`, `delete`, `invite`), plus the per-action parameters. All IDs are UUIDs returned by Gryzzly; most list actions accept `limit` (max 1000) and `offset` for pagination. > > | Tool | Description | > | - | - | > | `customers` | Customers (clients). Actions: `list`, `get`, `create`, `update`, `delete`. | > | `projects` | Projects. Actions: `list`, `get`, `create`, `update`, `delete`. Billing modes are configured per-task in the Gryzzly UI, not via the API (see Tool Details). | > | `tasks` | Tasks (work items under projects). Actions: `list`, `get`, `create`, `update`, `delete`. | > | `declarations` | Declarations / time entries. Actions: `list` (requires `task_ids` + `user_ids`), `create`, `update`, `delete`. | > | `leavePeriods` | Leave periods (absences). Actions: `list`, `get`, `create`, `update`, `delete`. | > | `discounts` | Discounts on projects/tasks. Actions: `list`, `get`, `create`, `update`, `delete`. | > | `purchases` | Purchases / expenses. Actions: `list`, `get`, `create`, `update`, `delete`. | > | `users` | Users (members). Actions: `list`, `get`, `invite`. | > | `groups` | User groups. Actions: `list`, `get`. | > | `groupsets` | Group sets. Actions: `list`, `get`. | > | `tags` | Tags. Actions: `list`, `get`. | > | `tagsets` | Tag sets. Actions: `list`, `get`. | > | `metrics` | Project metrics (time/budget aggregates). Actions: `get`, `list` (requires `project_ids`). | > > ## Output Formats > > Every tool accepts an `outputFormat` argument that controls the MCP response shape: > > * **`verbose`** (default): human-readable text optimized for LLM consumption > * **`structured`**: machine-readable JSON in `structuredContent` > * **`both`**: both text and structured content > > ## Tool Details > > ### declarations: create > > Log a time entry on a task for a specific user. > > ```json theme={null} > { > "name": "declarations", > "arguments": { > "action": "create", > "user_id": "user-uuid", > "task_id": "task-uuid", > "date": "2026-04-20", > "duration": 7200, > "description": "Implementation review" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | `create`. | > | `date` | Yes | Declaration date (`YYYY-MM-DD`). | > | `duration` | Yes | Duration in seconds. | > | `task_id` | Yes | UUID of the task. | > | `user_id` | Yes | UUID of the user. | > | `description` | No | Free-form text, max 256 chars. | > > ### projects: create > > ```json theme={null} > { > "name": "projects", > "arguments": { > "action": "create", > "name": "Website Revamp", > "start_at": "2026-01-06", > "customer_id": "customer-uuid", > "visibility": "private", > "managers": ["manager-uuid"] > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | `create`. | > | `start_at` | Yes | Project start date (`YYYY-MM-DD`). | > | `name` | No | Project name. | > | `visibility` | No | `public` / `private`; `contributors` must be empty when `public`. | > | `customer_id`, `code`, `end_at`, `managers`, `contributors`, `groups`, `tags` | No | Optional structure. | > > > [!WARNING] > > > > **Billing trap:** the API cannot set `is_billable: true`; Gryzzly rejects it with `409 "can't handle billable project"`. Billing modes (fixed-fee, package, time-and-material) live at the **task** level and must be configured in the Gryzzly UI (`app.gryzzly.io`). Always create/update projects with `is_billable: false` (the default), then configure billing tasks in the UI. The billable → non-billable transition is irreversible and wipes financial data. > > ### tasks: create > > ```json theme={null} > { > "name": "tasks", > "arguments": { > "action": "create", > "project_id": "project-uuid", > "name": "Design System", > "start_at": "2026-01-06", > "budget_type": "time", > "planned_duration": 80 > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | `create`. | > | `name` | Yes | Task name. | > | `project_id` | Yes | UUID of the parent project. | > | `start_at` | Yes | Task start date (`YYYY-MM-DD`). | > | `budget_type` | No | `none` / `detailed` / `global` / `time`. | > | `hourly_rate_mode` | No | `task` / `group` / `contributor`. | > | `parent_id` / `is_container` | No | Build sub-tasks (`parent_id`) and parent containers (`is_container`). | > > ### leavePeriods: create > > ```json theme={null} > { > "name": "leavePeriods", > "arguments": { > "action": "create", > "user_id": "user-uuid", > "start_at": "2026-05-10", > "end_at": "2026-05-14", > "start_type": "full", > "end_type": "full", > "description": "Vacation" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | `create`. | > | `start_at` / `end_at` | No | Leave period bounds (`YYYY-MM-DD`). | > | `start_type` / `end_type` | No | `full` / `am` / `pm`. | > | `delete_declaration` | No | Set `true` to remove existing declarations in the range. | > | `description` | No | Free-form text, max 128 chars. | > > ### users: invite > > ```json theme={null} > { > "name": "users", > "arguments": { > "action": "invite", > "email": "new.hire@example.com", > "role": "contributor", > "group_ids": ["group-uuid"] > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | `invite`. | > | `email` | No | Invitee email address. | > | `role` | No | `contributor` / `collaborator` / `manager` / `director` / `admin`. | > | `group_ids` | No | UUIDs of the groups to add the user to. | > > ### declarations: list > > Read time entries over a window for given tasks and users. > > ```json theme={null} > { > "name": "declarations", > "arguments": { > "action": "list", > "task_ids": ["task-uuid"], > "user_ids": ["user-uuid"], > "from": "2026-03-01", > "to": "2026-03-31" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | `list`. | > | `task_ids` | Yes | UUIDs of the tasks to read declarations for. | > | `user_ids` | Yes | UUIDs of the users to read declarations for. | > | `from` / `to` | No | Date window (`YYYY-MM-DD`). | > | `limit` / `offset` | No | Pagination (`limit` max 1000). | > [tab] Workspace builder (DSUL) > > ## Workspace builder > > **Goal:** install the connector in a workspace, configure the Gryzzly API key and the agent allowlist, and call Gryzzly operations from your automations. > > ## Installation > > 1. Go to **Apps** in your workspace > 2. Search for **Gryzzly** and install it > 3. Open the **Configuration app** (the link auto-populated on install) to paste your Gryzzly API key, set the base URL if needed, and allow the agents that may call the connector > > ## Configuration > > | Field | Description | > | - | - | > | **Configuration app** | Auto-populated on install. Open this link to set the Gryzzly API key + base URL and manage the authorized-agents allowlist. | > > The configuration app drives everything; the app instance itself has no per-field credential form. From it you provide: > > | Auth mode | What you provide | Best for | > | - | - | - | > | `apiKey` (only mode) | A Gryzzly **API key** + optionally the **base URL** (default `https://api.gryzzly.io/v1`) | All setups: the key is stored as a workspace secret and sent server-side as `Authorization: Bearer ` | > > > [!NOTE] > > > > The API key is provisioned into the workspace's Secrets and resolved server-side. The agent allowlist (**Authorized agents**) gates which Agent Creator agents may call the MCP endpoint; see the *Agent builder* tab. > > ## Available Instructions > > Every instruction resolves credentials from the workspace configuration. All IDs are UUIDs returned by Gryzzly. Most list operations accept `limit` (max 1000) and `offset` for pagination. > > ### Customers > > | Instruction | Description | Returns | > | - | - | - | > | `listCustomers` | List customers; filter by `customer_ids`, `manager_ids`, `is_active`. | `{ data: [{ id, name, is_active, managers }], ... }` | > | `getCustomer` | Get a customer by `id`. | `{ id, name, is_active, managers }` | > | `createCustomer` | Create a customer from `name` (+ optional `managers`). | The created customer `{ id, name, ... }` | > | `updateCustomer` | Update a customer by `id` (+ `name`, `is_active`, `managers`). | The updated customer | > | `deleteCustomer` | Delete a customer by `id`. | Empty (HTTP 204) | > > ### Projects > > | Instruction | Description | Returns | > | - | - | - | > | `listProjects` | List projects; filter by `status` (`active`/`done`/`archived`). | `{ data: [{ id, name, status, customer_id }], ... }` | > | `getProject` | Get a project by `id`. | `{ id, name, status, ... }` | > | `createProject` | Create a project (`start_at` required; `is_billable` must stay false, see the Agent builder billing trap). | The created project `{ id, name, ... }` | > | `updateProject` | Update a project by `id`. | The updated project | > | `deleteProject` | Delete a project by `id`. | Empty (HTTP 204) | > | `getProjectMetrics` | Get a project's time/budget metrics by `project_id`. | `{ time, budget, ... }` | > | `listProjectsMetrics` | Metrics for several projects by `project_ids`. | `{ data: [{ project_id, time, budget }] }` | > > ### Tasks > > | Instruction | Description | Returns | > | - | - | - | > | `listTasks` | List tasks; filter by `project_ids`, `task_ids`. | `{ data: [{ id, name, project_id }], ... }` | > | `getTask` | Get a task by `id`. | `{ id, name, project_id, ... }` | > | `createTask` | Create a task (`name`, `project_id`, `start_at` required; `budget_type`, `hourly_rate_mode`, `parent_id`, `is_container`). | The created task | > | `updateTask` | Update a task by `id`. | The updated task | > | `deleteTask` | Delete a task by `id`. | Empty (HTTP 204) | > > ### Declarations (Time Entries) > > | Instruction | Description | Returns | > | - | - | - | > | `listDeclarations` | List declarations; `task_ids` + `user_ids` required, optional `from`/`to`. | `{ data: [{ id, date, duration, task_id, user_id }], ... }` | > | `createDeclaration` | Log a time entry (`date`, `duration` in seconds, `task_id`, `user_id` required). | The created declaration | > | `updateDeclaration` | Update a declaration by `id` (`date`, `duration`, `task_id` required). | The updated declaration | > | `deleteDeclaration` | Delete a declaration by `id`. | Empty (HTTP 204) | > > ### Leave Periods > > | Instruction | Description | Returns | > | - | - | - | > | `listLeavesPeriods` | List leave periods; filter by `user_ids`, `from`/`to`. | `{ data: [{ id, user_id, start_at, end_at }], ... }` | > | `getLeavesPeriod` | Get a leave period by `id`. | `{ id, user_id, start_at, end_at, ... }` | > | `createLeavesPeriod` | Create a leave period (`user_id`, `start_at`/`end_at`, `start_type`/`end_type` ∈ `full`/`am`/`pm`). | The created leave period | > | `updateLeavesPeriod` | Update a leave period by `id`. | The updated leave period | > | `deleteLeavesPeriod` | Delete a leave period by `id`. | Empty (HTTP 204) | > > ### Discounts > > | Instruction | Description | Returns | > | - | - | - | > | `listDiscounts` | List discounts; filter by `project_ids`, `task_ids`. | `{ data: [{ id, name, amount }], ... }` | > | `getDiscount` | Get a discount by `id`. | `{ id, name, amount }` | > | `createDiscount` | Create a discount (`name`; `project_id` or `task_id`). | The created discount | > | `updateDiscount` | Update a discount by `id` (`name`, `amount`). | The updated discount | > | `deleteDiscount` | Delete a discount by `id`. | Empty (HTTP 204) | > > ### Purchases > > | Instruction | Description | Returns | > | - | - | - | > | `listPurchases` | List purchases; filter by `project_ids`, `task_ids`. | `{ data: [{ id, name, billed_price }], ... }` | > | `getPurchase` | Get a purchase by `id`. | `{ id, name, billed_at, billed_price, paid_at, paid_price }` | > | `createPurchase` | Create a purchase (`project_id` or `task_id`; `billed_at`/`billed_price`, `paid_at`/`paid_price`, `billing_policy` ∈ `add`/`ignore`). | The created purchase | > | `updatePurchase` | Update a purchase by `id`. | The updated purchase | > | `deletePurchase` | Delete a purchase by `id`. | Empty (HTTP 204) | > > ### Users > > | Instruction | Description | Returns | > | - | - | - | > | `listUsers` | List users. | `{ data: [{ id, email, role }], ... }` | > | `getUser` | Get a user by `id`. | `{ id, email, role, ... }` | > | `inviteUser` | Invite a user (`email`, `role` ∈ `contributor`/`collaborator`/`manager`/`director`/`admin`, optional `group_ids`). | The invited user / invitation | > > ### Groups & Groupsets > > | Instruction | Description | Returns | > | - | - | - | > | `listGroups` | List groups; filter by `group_ids`, `groupset_ids`. | `{ data: [{ id, name, groupset_id }], ... }` | > | `getGroup` | Get a group by `id`. | `{ id, name, groupset_id }` | > | `listGroupsets` | List group sets; filter by `groupset_ids`. | `{ data: [{ id, name }], ... }` | > | `getGroupset` | Get a group set by `id`. | `{ id, name }` | > > ### Tags & Tagsets > > | Instruction | Description | Returns | > | - | - | - | > | `listTags` | List tags; filter by `tag_ids`, `tagset_ids`. | `{ data: [{ id, name, tagset_id }], ... }` | > | `getTag` | Get a tag by `id`. | `{ id, name, tagset_id }` | > | `listTagsets` | List tag sets; filter by `tagset_ids`. | `{ data: [{ id, name }], ... }` | > | `getTagset` | Get a tag set by `id`. | `{ id, name }` | > > > [!NOTE] > > > > `Returns` shows the shape of the operation output. Mutations return the affected resource; deletes return HTTP 204 with an empty body. > > ## DSUL Examples > > **Log a time declaration:** > > ```yaml theme={null} > - Gryzzly.createDeclaration: > user_id: '{{user_id}}' > task_id: '{{task_id}}' > date: '{{run.date}}' > duration: 7200 > description: Implementation review > output: declaration > ``` > > **Create a project with a task:** > > ```yaml theme={null} > - Gryzzly.createProject: > name: Website Revamp > start_at: 2026-01-06 > customer_id: '{{customer_id}}' > visibility: private > managers: > - '{{manager_user_id}}' > output: project > - Gryzzly.createTask: > project_id: '{{project.id}}' > name: Design System > start_at: 2026-01-06 > budget_type: time > planned_duration: 80 > output: task > ``` > > **Read declarations for a payroll window:** > > ```yaml theme={null} > - Gryzzly.listDeclarations: > task_ids: > - '{{task_id}}' > user_ids: > - '{{user_id}}' > from: 2026-03-01 > to: 2026-03-31 > output: declarations > ``` > > **Invite a contributor:** > > ```yaml theme={null} > - Gryzzly.inviteUser: > email: new.hire@example.com > role: contributor > group_ids: > - '{{group_id}}' > output: invitation > ``` *** ## Security The answers that hold for every connector (agent access, shared knowledge bases, credentials, models, egress) are on [Connector security](/apps-store/marketplace/connectors/security). This section lists what is specific to Gryzzly. | Topic | Gryzzly | | - | - | | Authentication family | Technical account or API key: one Gryzzly API key (`apiKey`, the only mode), sent as a bearer token. Gryzzly sees the owner of the key for every caller. | | Production modes | `apiKey` | | Modes to avoid in production | None: the API key is the only mode. Give it the lowest role that covers your use, keep it in the workspace secrets and rotate it. | | Read-only rights | The key carries the role of its owner: give that account the lowest Gryzzly role that covers the reads your agents need. | | Agent allowlist | Yes, on the tenant endpoint (empty at installation). **Allow all agents** accepts every agent. The connector has no global endpoint. | | Per-reader access control on knowledge bases | Not applicable: this connector does not feed knowledge bases. | | Outbound hosts | `api.gryzzly.io` by default, or the **Base URL** set at installation. | | Audit events | None specific to this connector | Gryzzly holds time entries, leave periods, purchases and user data, and the connector exposes create, update and delete operations on most of them. Every allowed agent reads and writes with the key's rights, whoever uses the agent: keep the **Authorized agents** list to the agents that need this data. *** ## Error Handling | HTTP Status | Error | Solution | | - | - | - | | 401 | Unauthorized | Verify the API key and `baseUrl` in the config app. | | 403 | Forbidden | The API key owner's Gryzzly role lacks permission for this resource. | | 404 | Not Found | Verify the UUIDs for customer, project, task, user, etc. | | 409 | Conflict | Business rule rejected the write, e.g. setting `is_billable: true` on a project (see the billing trap). | | 422 | Validation | Check required fields and enum values (roles, visibility, budget type, etc.). | | 429 | Rate Limited | Back off and retry with exponential delay. | | 500 | Server error | Transient Gryzzly outage; retry shortly. | ### Common Issues **"This agent is not authorized to use this connector"**: The calling agent is not in the allowlist. Open the configuration app → **Authorized agents** → tick this agent (or enable **Allow all agents**) and Save. **"The calling agent could not be identified"**: The MCP capability *Scope* does not declare `agent_id`, so Agent Creator never injects the agent identity. Set the Scope to `context_id,agent_id,user_id` on the capability, then allow the agent in the config app. **"Gryzzly is not configured for this workspace"**: No API key set. Open the configuration app and paste the Gryzzly API key (generated under **Administration > API Keys**) and, if needed, the base URL. **`409 "can't handle billable project"`**: You tried to create or update a project with `is_billable: true`. Leave it false; billing modes are configured at the task level in the Gryzzly UI (`app.gryzzly.io`), not via the API. **`contributors` rejected on a public project**: Set `visibility: private` or leave `contributors` empty. ## External Resources > [card] [Gryzzly API](https://api.gryzzly.io/v1/docs) > > Official Gryzzly v1 REST-RPC API documentation. > [card] [Tool Agents](/products/agent-factory/capabilities) > > Learn how Agent Creator agents consume MCP tools in Prisme.ai. # HubSpot Source: https://docs.prisme.ai/apps-store/marketplace/connectors/hubspot Let Agent Creator agents read and write HubSpot CRM and Marketing data through MCP, with per-user OAuth resolved server-side ![HubSpot](https://mintcdn.com/prismeai/wAgJDx_RXqITi8An/images/connectors/hubspot.png?fit=max\&auto=format\&n=wAgJDx_RXqITi8An\&q=85\&s=d2b528d415ff6468bdcf0bbe9bae6b12) The HubSpot connector exposes a HubSpot portal through the [HubSpot REST API](https://developers.hubspot.com/docs/api/overview) to **Agent Creator** agents (through MCP) and to Builder automations (through the `Hubspot.op:` App instructions), covering the CRM (contacts, companies, deals, tickets, engagements, associations, pipelines, properties, owners, lists) and the Marketing layer (forms, marketing emails, workflows, files). The \~120 HubSpot operations are grouped into **18 entity tools**, each driven by an `action` argument. The MCP server runs in the **tenant app-instance context**: it resolves the installing workspace's own credentials and authorizes the calling agent against that workspace's allowlist. Authentication supports several modes: * **Per-user OAuth2, central client** (`oauthCentral`, recommended): one HubSpot OAuth application is registered once by the platform maintainer; every end user signs in with their own HubSpot portal. Nothing to register per workspace: each one just installs the app and clicks *Connect*. * **Per-user OAuth2, tenant client** (`oauth`): paste your own HubSpot OAuth client ID/secret in the connector config app. Each user signs in with their own account against your client (authorization-code + PKCE flow). * **Private App token** (`accessToken`): a caller-managed HubSpot **Private App access token (PAT)**, used as-is with no exchange. Best for service-account / non-interactive automations where a single identity is preferable. > [card] CRM Records > > Contacts, companies, deals and tickets with list/search/get/create/update/archive plus batch and merge operations > [card] Engagements & Marketing > > Notes, tasks, calls, emails, meetings; pipelines, properties, owners, lists; forms, marketing emails, workflows and files > [card] Per-user auth > > Per-user OAuth (central or tenant client) resolved server-side, or a caller-managed Private App token ## Who is this for? This connector is used by three different roles. Jump to the section that matches yours; each one is self-contained. > [card] Agent builder > > You build agents in **Agent Creator** and want them to use HubSpot. → *Agent builder* tab. > [card] Platform admin > > You run the platform and set up the shared HubSpot OAuth client once for everyone. → *Platform admin setup* accordion below. > [card] Workspace builder > > You write Builder automations (DSUL) that call HubSpot operations directly. → *Workspace builder* tab. ## Prerequisites * A **HubSpot account** with access to the portal you want to expose. * For the **OAuth modes**: a HubSpot OAuth application. **HubSpot's Developer Platform 2025.2 retired the legacy *Public Apps* UI**: the OAuth app is now declared as code in a HubSpot project and deployed via the HubSpot CLI (from a free **HubSpot developer account** at [developers.hubspot.com](https://developers.hubspot.com/), separate from any CRM account). The platform maintainer registers one app for the central mode; a workspace can also register its own for the tenant mode. Copy the **Client ID** and **Client Secret** from the deployed app's *Auth* tab. * For the **Private App token mode**: a **Private App access token** created at *HubSpot Settings → Integrations → Private Apps* (`https://app.hubspot.com/private-apps/`), with the scopes covering the operations you intend to call. * **OAuth scopes**: the connector requests the free-tier essentials by default (`oauth`, `crm.objects.contacts.*`, `crm.objects.companies.*`, `crm.objects.deals.*`, `crm.objects.owners.read`, `tickets`). Paid-tier features (lists, content, automation, forms, files) require their own scopes and a matching HubSpot subscription; every requested scope must be declared in the deployed app's `requiredScopes` / `optionalScopes`. * Base URL: `https://api.hubapi.com` (single host). > [accordion] Platform admin (Governance): one-time platform setup > > **Goal:** two one-time tasks: (1) configure the shared **central OAuth client** so every workspace lets its users sign in with their own HubSpot portal, and (2) optionally expose HubSpot as a reusable **capability** in AI Governance so agent builders can pick it without pasting endpoint URLs. Throughout, `` is your environment's API URL (`https://api.studio.prisme.ai/v2` on production). > > ## 1. Configure the connector > > **1. Register the OAuth application at HubSpot** > > Create a free **HubSpot developer account**, install the CLI (`npm install -g @hubspot/cli@latest`), then deploy the OAuth app project. The `hubspot` workspace ships ready-to-deploy projects under `workspaces/hubspot/project/` (one per environment); each `app-hsmeta.json` declares the redirect URI, required and optional scopes. Set the single Authorized redirect URI to the **core workspace** callback: > > ```text theme={null} > /workspaces/slug:hubspot/webhooks/oauthCallback > ``` > > (e.g. `https://api.studio.prisme.ai/v2/workspaces/slug:hubspot/webhooks/oauthCallback` on production). Deploy with `hs project upload && hs project deploy`, allowlist the portals (numeric Hub IDs) that may install the app, then copy the **Client ID** and **Client Secret** from the app's *Auth* tab (the secret is shown only once). > > **2. Enter the credentials through the configuration app** > > Open the central `hubspot` workspace and launch its **Configuration app**: `/apps/hubspot` (e.g. `https://studio.prisme.ai/apps/hubspot`). Loaded from the core workspace, the app shows the **maintainer view** (org owner / editor / admin only); paste the **Client ID** and **Client Secret** there and Save; the app stores them in the core workspace's secrets for you. Do not edit Studio's raw Secrets by hand. These credentials stay in the `hubspot` workspace and are never exposed to tenants or end users; token exchange is proxied through the core `centralTokenExchange` webhook so the client secret never leaves the core workspace. > > **3. Tell workspaces to use the central client** > > Each consuming workspace selects auth mode **`oauthCentral`** in the connector configuration app (no client id/secret to enter on their side). Their users then just click **Connect**. > > **4. (Optional) Publish to the Capabilities catalog** > > From that same maintainer view, the **Add to catalog** button publishes HubSpot to the org-wide **Capabilities catalog** in one click (org owner / admin only; it stays disabled until the central client is saved). Once published, every agent builder in the org can enable HubSpot from the catalog without pasting an endpoint; see *Option A* in the *Agent builder* tab. > > ## 2. Declare the capability in AI Governance > > As an alternative to (or in addition to) the catalog button, you can declare HubSpot as a named **capability** in AI Governance. Agent builders then enable that capability on their agents instead of pasting a raw MCP endpoint. > > **1. Open AI Governance > Capabilities** > > Create (or edit) the **HubSpot** capability. > > **2. Point it at the MCP endpoint** > > Set the capability's MCP server URL to the connector's **MCP Endpoint**, and set its **Scope** to: > > ```text theme={null} > context_id,agent_id,user_id > ``` > > The `agent_id` in the scope is what lets the connector identify and authorize the calling agent. > > **3. Make it available to agent builders** > > Once created, the capability appears in the capability picker for agent builders in your organization, who enable it on their agents. Access to the catalog follows your organization's existing roles; there is no per-capability role grant. > > **4. Smoke-test** > > From an agent that has the capability, in a workspace configured for `oauthCentral`, trigger any tool (e.g. `contacts` with `action: "list"`). The user is prompted to connect once (HubSpot sign-in, pick a portal); subsequent calls reuse the stored token transparently and refresh it automatically. > > > [!WARNING] > > > > Declaring the capability makes the connector **available**; it does not by itself authorize a specific agent. This connector follows the **tenant-context model**: which agents may actually call it is gated per-workspace by the **authorized-agents allowlist** in the configuration app (see the *Workspace builder* tab). There is also **no OAuth auth-config JSON** to attach in Governance: connect / status / disconnect are handled by the connector's own webhooks, wired automatically. > > > [!NOTE] > > > > **HubSpot scope handling has a strict OAuth-URL contract**: the connector lists required scopes in `scope=` and optional scopes in `optional_scope=`, and **every requested scope must already be declared in the HubSpot app's `requiredScopes` or `optionalScopes`**. Putting an optional-tier scope (Marketing Hub Pro+, CMS Hub, etc.) into `scope=` triggers a "domain mismatch" rejection. The shipped `app-hsmeta.json` keeps `requiredScopes` to the free-tier essentials; paid-tier scopes sit in `optionalScopes`. To add a scope, edit `app-hsmeta.json` for each environment and re-run `hs project upload && hs project deploy`. *** > [tab] Agent builder (Agent Creator) > > ## Agent builder > > **Goal:** let an agent you build in Agent Creator use HubSpot through MCP tools. > > > [!NOTE] > > > > Before an agent can call the connector, a *Workspace builder* must have installed and configured the HubSpot app in a workspace (see the *Workspace builder* tab), and, for the central OAuth mode, a *Platform admin* must have provisioned the shared OAuth client (see the *Platform admin setup* accordion above). > > This connector runs in the **tenant app-instance context**: your agent is authorized two ways at once: it is identified by the `agent_id` that Agent Creator injects through the capability *Scope*, and that agent must appear in the connector's **authorized-agents allowlist** (managed in the configuration app). The HubSpot access token itself is resolved server-side from the configured auth mode. > > There are two ways to wire it up. Pick based on how much isolation you need. > > ## Option A: Enable the shared capability from the catalog > > The fastest path: a *Platform admin* has already published a **HubSpot** capability to the Capabilities catalog (see the *Platform admin setup* accordion above: the **Add to catalog** button, or §2), so you just pick it from the catalog. > > **1. Open your agent in Agent Creator** > > Open the agent you want to extend and go to its capabilities / tools. > > **2. Add the HubSpot capability** > > Browse the capability catalog, select **HubSpot**, and enable it. The MCP endpoint URL and the *Scope* (`context_id,agent_id,user_id`) are already wired by the admin; nothing to paste, and the shared instance accepts every agent, so there is no allowlist step on your side. > > **3. Connect a HubSpot account** > > On the first tool call, an unconnected user is prompted to sign in: Agent Creator surfaces a `connect_url` to HubSpot's authorization page, where the user picks the portal to authorize (from the allowlisted set) and reviews the requested scopes. After sign-in the per-user token is stored and reused on subsequent calls. > > > [!NOTE] > > > > Convenient, but your agent runs against a **shared, platform-managed instance**: its HubSpot credentials are owned by someone else and the instance accepts every agent that is granted the capability. Prefer Option B for anything beyond quick experiments. > > ## Option B: Run it from your own workspace (recommended) > > For production agents, install the connector in **your own workspace** and point the agent at *that* workspace's MCP endpoint. > > > [!WARNING] > > > > **Prefer this mode for security.** Because the MCP runs in *your* app-instance context, the HubSpot credentials, the per-user OAuth tokens and the authorized-agents allowlist are all **scoped to your workspace**, not shared platform-wide. You decide exactly which agents may call it and which HubSpot account / auth mode backs them, and a misconfiguration elsewhere can never expose your data. The shared catalog capability (Option A) is a broad surface many agents can reach; your own workspace is an isolated, least-privilege boundary. > > **1. Install and configure the connector in your workspace** > > Follow the *Workspace builder* tab: install **HubSpot** in your workspace, open its **Configuration app**, choose the auth mode and connect a HubSpot account (or paste a Private App token). > > **2. Allowlist your agent** > > In that workspace's config app, open **Authorized agents** and tick your agent (the **Install capability** button does this for you), or enable **Allow all agents**. > > **3. Add the MCP capability to your agent** > > In your agent, add a capability pointing at **your workspace's MCP Endpoint** URL, and set its **Scope** to: > > ```text theme={null} > context_id,agent_id,user_id > ``` > > The `agent_id` is what lets the connector identify and authorize your agent; without it, every call is rejected with an explicit "agent could not be identified" message. This *Scope* is separate from the HubSpot OAuth scopes. > > **4. Connect a HubSpot account** > > On the first tool call, the user is prompted to sign in (or uses **Connect** in the config app). The per-user token is stored and reused; refresh is automatic. > > ## Brief the agent in its system prompt > > Whichever option you pick, wiring the capability is not enough: the agent must know the connector exists and when to reach for it. Add a short paragraph to the agent's system prompt. Copy-pasteable starter: > > ```text theme={null} > You have access to the HubSpot MCP server. Use it whenever the user asks about CRM data: contacts, companies, deals, tickets, engagements, pipelines or marketing assets (forms, emails, workflows). Each tool is an entity that takes an `action` argument. Always prefer `action: search` over `action: list` for filtered lookups. For batch work, use the `batch*` actions instead of looping individual calls. Always confirm with the user before destructive actions (archive, delete, batchArchive, unenrollContact, removeMembers). > ``` > > Refine the trigger keywords (resource names, business domains, typical user phrasings) so the agent reliably picks up the right intent in your context. > > > [!NOTE] > > > > **Legacy AI Knowledge agents** (no native MCP picker): add the connector under **Advanced > Tools > MCP** and paste the **MCP Endpoint** URL. The agent still has to be allowlisted in the config app and its identity propagated so the connector can read its `agent_id`. > > > [!NOTE] > > > > **Restricting to read-only (least privilege).** HubSpot tools cover both reads and writes (create/update contacts, companies, deals). The requested OAuth scopes **are** the grant. To allow only read access, set the **Scopes** field in the configuration app to the read-only set, dropping every `*.write` scope, e.g.: > > > > ```text theme={null} > > oauth crm.objects.contacts.read crm.objects.companies.read crm.objects.deals.read crm.objects.owners.read tickets > > ``` > > > > With central OAuth (`oauthCentral`) you do **not** create your own HubSpot app; keep `oauthCentral` and enter the read scopes; your tenant scope overrides the platform default (the central app must list these read scopes). Write calls are then rejected by HubSpot with `403`. The scope is set at the workspace level (a workspace editor can widen it again). > > ## Available Tools > > The MCP server exposes 18 entity-level tools, each with an `action` argument to select the operation. Every tool accepts an `outputFormat` parameter (see *Output Formats*). > > ### `contacts` / `companies` / `deals` > > These three CRM tools share the same set of actions. > > | Action | Description | > | - | - | > | `list` | List records with pagination and property selection | > | `get` | Retrieve a single record by id (or by `idProperty`) | > | `create` | Create a record with properties and optional associations | > | `update` | Update a record by id | > | `archive` | Archive (soft-delete) a record | > | `search` | Full-text and structured search with filter groups, sorts and a `query` shortcut | > | `merge` | Merge two records into one (`primaryObjectId` ← `objectIdToMerge`) | > | `batchRead` | Read up to 100 records at once | > | `batchCreate` | Create up to 100 records in one call | > | `batchUpdate` | Update up to 100 records in one call | > | `batchArchive` | Archive up to 100 records in one call | > > ### `tickets` > > Same actions as the CRM trio above, minus `merge`. > > ### `associations` > > | Action | Description | > | - | - | > | `list` | List associations from a record to a target object type | > | `create` | Create an association between two records | > | `archive` | Remove an association between two records | > > ### `notes` / `tasks` / `calls` / `engagementEmails` / `meetings` > > All five engagement tools share the same actions. > > | Action | Description | > | - | - | > | `list` | List engagements | > | `get` | Retrieve a single engagement | > | `create` | Create an engagement, optionally with associations to CRM records | > | `update` | Update an engagement | > | `archive` | Archive an engagement | > > ### `pipelines` > > | Action | Description | > | - | - | > | `list` | List pipelines for an object type | > | `get` | Retrieve a pipeline | > | `create` | Create a pipeline | > | `update` | Update a pipeline | > | `archive` | Archive a pipeline | > | `listStages` | List the stages of a pipeline | > | `getStage` | Retrieve a stage | > | `createStage` | Add a stage to a pipeline | > | `updateStage` | Update a stage | > | `archiveStage` | Archive a stage | > > ### `properties` > > | Action | Description | > | - | - | > | `list` | List properties for an object type | > | `get` | Retrieve a property | > | `create` | Create a property | > | `update` | Update a property | > | `archive` | Archive a property | > | `listGroups` | List property groups for an object type | > | `createGroup` | Create a property group | > | `updateGroup` | Update a property group | > | `archiveGroup` | Archive a property group | > > ### `owners` > > | Action | Description | > | - | - | > | `list` | List owners (optionally filter by email) | > | `get` | Retrieve an owner by id | > > ### `lists` > > | Action | Description | > | - | - | > | `create` | Create a list | > | `get` | Retrieve a list (optionally with filters) | > | `update` | Rename a list | > | `delete` | Delete a list | > | `search` | Search lists by name and processing type | > | `addMembers` | Add records to a static list | > | `removeMembers` | Remove records from a static list | > | `getMemberships` | List the members of a list | > > ### `forms` > > | Action | Description | > | - | - | > | `list` | List marketing forms | > | `get` | Retrieve a form | > | `create` | Create a form | > | `update` | Update a form | > | `archive` | Archive a form | > | `submit` | Submit values to a form on behalf of a visitor | > > ### `marketingEmails` > > | Action | Description | > | - | - | > | `list` | List marketing emails | > | `get` | Retrieve a marketing email | > | `create` | Create a marketing email | > | `update` | Update a marketing email | > | `archive` | Archive a marketing email | > | `sendTransactional` | Send a transactional single-send email to a recipient | > > ### `workflows` > > | Action | Description | > | - | - | > | `list` | List workflows | > | `get` | Retrieve a workflow | > | `enrollContact` | Enroll a contact in a workflow by email | > | `unenrollContact` | Unenroll a contact from a workflow by email | > > ### `files` > > | Action | Description | > | - | - | > | `list` | List files | > | `get` | Retrieve file metadata | > | `getSignedUrl` | Create a signed URL to download a file | > | `archive` | Archive a file | > | `importFromUrl` | Import a file from a public URL | > | `listFolders` | List folders | > | `createFolder` | Create a folder | > | `archiveFolder` | Archive a folder | > > ## Output Formats > > Every tool accepts an `outputFormat` parameter that controls the MCP response shape: > > * **`verbose`** (default): human-readable text for LLM consumption > * **`structured`**: machine-readable JSON in `structuredContent` > * **`both`**: both text and structured content > > ## Tool Details > > ### `contacts` (action: `search`) > > ```json theme={null} > { > "name": "contacts", > "arguments": { > "action": "search", > "filterGroups": [ > { > "filters": [ > { "propertyName": "email", "operator": "EQ", "value": "alice@acme.com" } > ] > } > ], > "properties": ["email", "firstname", "lastname", "lifecyclestage"], > "limit": 1 > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | Must be `search` | > | `filterGroups` | No | Array of `{ filters: [{ propertyName, operator, value }] }`. Filters inside a group are AND'd; groups are OR'd | > | `sorts` | No | Array of `{ propertyName, direction }` | > | `query` | No | Free-text query alternative to `filterGroups` | > | `properties` | No | Properties to include in the response | > | `limit` | No | Page size (max 100) | > | `after` | No | Cursor from a previous response (`paging.next.after`) | > > ### `deals` (action: `create`) > > ```json theme={null} > { > "name": "deals", > "arguments": { > "action": "create", > "properties": { > "dealname": "Acme - annual contract", > "amount": "120000", > "dealstage": "appointmentscheduled", > "pipeline": "default", > "closedate": "2026-09-30" > }, > "associations": [ > { > "to": { "id": "11223344" }, > "types": [ > { "associationCategory": "HUBSPOT_DEFINED", "associationTypeId": 5 } > ] > } > ] > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | Must be `create` | > | `properties` | Yes | Map of HubSpot deal properties | > | `associations` | No | Optional list of association targets (`{ to.id, types: [{ associationCategory, associationTypeId }] }`) | > > ### `lists` (action: `addMembers`) > > ```json theme={null} > { > "name": "lists", > "arguments": { > "action": "addMembers", > "listId": "12345" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | Must be `addMembers` | > | `listId` | Yes | Target list ID (only valid for static / `MANUAL` lists) | > > ### `marketingEmails` (action: `sendTransactional`) > > ```json theme={null} > { > "name": "marketingEmails", > "arguments": { > "action": "sendTransactional", > "emailId": "67890", > "message": { > "to": "alice@acme.com", > "from": "noreply@acme.com" > }, > "contactProperties": { "firstname": "Alice" }, > "customProperties": { "orderId": "ORD-12345" } > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | Must be `sendTransactional` | > | `emailId` | Yes | The single-send email template ID | > | `message` | Yes | `{ to, from, cc, bcc, replyTo, sendId }` | > | `contactProperties` | No | Properties to set on the contact for personalization | > | `customProperties` | No | Custom merge tags resolved inside the email body | > > ### `workflows` (action: `enrollContact`) > > ```json theme={null} > { > "name": "workflows", > "arguments": { > "action": "enrollContact", > "workflowId": "98765", > "email": "alice@acme.com" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | Must be `enrollContact` | > | `workflowId` | Yes | Target workflow | > | `email` | Yes | Email of the contact to enroll | > [tab] Workspace builder (DSUL) > > ## Workspace builder > > **Goal:** install the connector in a workspace, configure authentication and the agent allowlist, and call HubSpot operations from your automations. > > ## Installation > > 1. Go to **Apps** in your workspace > 2. Search for **HubSpot** and install it > 3. Open the **Configuration app** (the link auto-populated on install) to choose the auth mode, provide credentials, connect a HubSpot account, and allow the agents that may call the connector > > ## Configuration > > | Field | Description | > | - | - | > | **Configuration app** | Auto-populated on install: open this link to configure authentication (mode + credentials), connect a HubSpot account (OAuth modes), and manage the authorized-agents allowlist. | > > The configuration app drives everything; the app instance itself has no per-field credential form. From it you pick one of: > > | Auth mode | What you provide | Best for | > | - | - | - | > | `oauthCentral` | Nothing; just click **Connect** | Workspaces on a platform where the maintainer set up the central HubSpot client; human-facing agents where each user acts as themselves | > | `oauth` | Your own HubSpot **Client ID + Secret** (redirect URI shown in the config app) | You manage your own HubSpot OAuth app | > | `accessToken` | A HubSpot **Private App access token (PAT)** | Service-account / non-interactive automations where one identity is preferable | > > > [!NOTE] > > > > Credentials are stored in the workspace's Secrets (`hubspotAuth`) and resolved server-side. The agent allowlist (**Authorized agents**, secret `hubspotAuthorizedAgents`) gates which Agent Creator agents may call the MCP endpoint; see the *Agent builder* tab. Builder automations calling `Hubspot.op:` instructions resolve the same workspace credentials. > > ## Available Instructions > > Every instruction resolves credentials from the workspace configuration. CRM list operations accept `limit` (default 100) and `after` for cursor pagination, plus `properties` to request specific fields. > > ### Contacts > > | Instruction | Description | Returns | > | - | - | - | > | `listContacts` | List contacts; paginate with `limit`/`after`, pick fields with `properties` | `{ results: [{ id, properties }], paging }` | > | `getContact` | Get a contact by `contactId` (or by `idProperty`) | `{ id, properties, associations }` | > | `createContact` | Create a contact from `properties`, optional `associations` | `{ id, properties }` | > | `updateContact` | Update a contact by `contactId` with `properties` | `{ id, properties }` | > | `archiveContact` | Archive a contact by `contactId` | Empty (HTTP 204) | > | `searchContacts` | Search with `filterGroups`/`sorts`/`query`, select `properties` | `{ total, results, paging }` | > | `mergeContacts` | Merge `objectIdToMerge` into `primaryObjectId` | `{ id, properties }` | > | `batchReadContacts` / `batchCreateContacts` / `batchUpdateContacts` / `batchArchiveContacts` | Batch ops on up to 100 `inputs` | `{ status, results }` | > > ### Companies > > Same shape as contacts: `listCompanies`, `getCompany`, `createCompany`, `updateCompany`, `archiveCompany`, `searchCompanies`, `mergeCompanies`, `batchReadCompanies`, `batchCreateCompanies`, `batchUpdateCompanies`, `batchArchiveCompanies`. > > ### Deals > > Same shape as contacts: `listDeals`, `getDeal`, `createDeal`, `updateDeal`, `archiveDeal`, `searchDeals`, `mergeDeals`, `batchReadDeals`, `batchCreateDeals`, `batchUpdateDeals`, `batchArchiveDeals`. > > ### Tickets > > Same shape as the CRM trio, minus merge: `listTickets`, `getTicket`, `createTicket`, `updateTicket`, `archiveTicket`, `searchTickets`, `batchReadTickets`, `batchCreateTickets`, `batchUpdateTickets`, `batchArchiveTickets`. > > ### Associations > > | Instruction | Description | Returns | > | - | - | - | > | `listAssociations` | List associations from `fromObjectType`/`fromObjectId` to `toObjectType` | `{ results: [{ toObjectId, associationTypes }], paging }` | > | `createAssociation` | Default association between `fromObject` and `toObject` | `{ fromObjectTypeId, toObjectId, labels }` | > | `archiveAssociation` | Remove an association between two records | Empty (HTTP 204) | > > ### Engagements (Notes / Tasks / Calls / Emails / Meetings) > > | Instruction | Description | Returns | > | - | - | - | > | `listNotes` / `listTasks` / `listCalls` / `listEmails` / `listMeetings` | List engagements; `limit`, `after`, `properties`, `associations` | `{ results, paging }` | > | `getNote` / `getTask` / `getCall` / `getEmail` / `getMeeting` | Get an engagement by its id | `{ id, properties, associations }` | > | `createNote` / `createTask` / `createCall` / `createEmail` / `createMeeting` | Create from `properties`, optional `associations` | `{ id, properties }` | > | `updateNote` / `updateTask` / `updateCall` / `updateEmail` / `updateMeeting` | Update an engagement by id | `{ id, properties }` | > | `archiveNote` / `archiveTask` / `archiveCall` / `archiveEmail` / `archiveMeeting` | Archive an engagement by id | Empty (HTTP 204) | > > ### Pipelines > > | Instruction | Description | Returns | > | - | - | - | > | `listPipelines` | List pipelines for `objectType` (`deals` or `tickets`) | `{ results: [{ id, label, stages }] }` | > | `getPipeline` | Get a pipeline by `objectType` + `pipelineId` | `{ id, label, stages }` | > | `createPipeline` | Create a pipeline (`label`, `stages`, `displayOrder`) | `{ id, label, stages }` | > | `updatePipeline` | Update a pipeline by `pipelineId` | `{ id, label, stages }` | > | `archivePipeline` | Archive a pipeline by `pipelineId` | Empty (HTTP 204) | > | `listPipelineStages` / `getPipelineStage` | List / get pipeline stages | `{ results }` / `{ id, label, metadata }` | > | `createPipelineStage` / `updatePipelineStage` / `archivePipelineStage` | Manage a stage by `stageId` | `{ id, label, metadata }` / 204 | > > ### Properties > > `listProperties`, `getProperty`, `createProperty`, `updateProperty`, `archiveProperty`, `listPropertyGroups`, `createPropertyGroup`, `updatePropertyGroup`, `archivePropertyGroup`: each scoped by `objectType`; returns property / property-group definitions. > > ### Owners > > | Instruction | Description | Returns | > | - | - | - | > | `listOwners` | List owners; optional `email` filter | `{ results: [{ id, email, firstName, lastName }], paging }` | > | `getOwner` | Get an owner by `ownerId` (match on `idProperty`) | `{ id, email, firstName, lastName }` | > > ### Lists > > | Instruction | Description | Returns | > | - | - | - | > | `createList` | Create a list (`name`, `objectTypeId`, `processingType`, `filterBranch`) | `{ list: { listId, name } }` | > | `getList` | Get a list by `listId`; `includeFilters` for the filter tree | `{ list: { listId, name, filtersUpdatedAt } }` | > | `updateList` | Rename a list (`listId`, `listName`) | `{ list }` | > | `deleteList` | Delete a list by `listId` | Empty (HTTP 204) | > | `searchLists` | Search by `query`, paginate with `count`/`offset` | `{ lists, total, offset }` | > | `addListMembers` / `removeListMembers` | Add / remove members of a static list by `listId` | `{ recordsIdsAdded }` / `{ recordsIdsRemoved }` | > | `getListMemberships` | List the members of a list by `listId` | `{ results, paging }` | > > ### Forms > > | Instruction | Description | Returns | > | - | - | - | > | `listForms` | List marketing forms; `formTypes` filter | `{ results, paging }` | > | `getForm` | Get a form by `formId` | `{ id, name, fieldGroups }` | > | `createForm` | Create a form (`name`, `formType`, `fieldGroups`, `configuration`) | `{ id, name }` | > | `updateForm` | Update a form by `formId` | `{ id, name }` | > | `archiveForm` | Archive a form by `formId` | Empty (HTTP 204) | > | `submitForm` | Submit `fields` to a form (`portalId`, `formGuid`, `context`) | `{ inlineMessage }` | > > ### Marketing Emails > > | Instruction | Description | Returns | > | - | - | - | > | `listMarketingEmails` | List marketing emails; `type`, `isPublished` filters | `{ results, paging }` | > | `getMarketingEmail` | Get a marketing email by `emailId`; `includeStats` | `{ id, name, subject, stats }` | > | `createMarketingEmail` | Create a marketing email (`name`, `subject`, `fromName`, `content`) | `{ id, name }` | > | `updateMarketingEmail` | Update a marketing email by `emailId` | `{ id, name }` | > | `archiveMarketingEmail` | Archive a marketing email by `emailId` | Empty (HTTP 204) | > | `sendTransactionalEmail` | Send a single-send email (`emailId`, `message`, `contactProperties`, `customProperties`) | `{ status, sendResult }` | > > ### Workflows > > | Instruction | Description | Returns | > | - | - | - | > | `listWorkflows` | List workflows; `limit`, `offset` | `{ workflows }` | > | `getWorkflow` | Get a workflow by `workflowId` | `{ id, name, enabled }` | > | `enrollContactInWorkflow` | Enroll a contact (`workflowId`, `email`) | Empty (HTTP 204) | > | `unenrollContactFromWorkflow` | Unenroll a contact (`workflowId`, `email`) | Empty (HTTP 204) | > > ### Files > > | Instruction | Description | Returns | > | - | - | - | > | `listFiles` | List files; filter by folder, `name`, `type`, `extension` | `{ results, paging }` | > | `getFile` | Get file metadata by `fileId` | `{ id, name, url, size }` | > | `getFileSignedUrl` | Temporary signed URL for a file (`expirationSeconds`, `size`, `upscale`) | `{ url, expiresAt }` | > | `archiveFile` | Archive a file by `fileId` | Empty (HTTP 204) | > | `importFileFromUrl` | Async import from a public `url` (`access`, `folderId`, `duplicateValidationStrategy`) | `{ id, requestId }` | > | `listFolders` / `createFolder` / `archiveFolder` | Manage folders | `{ results }` / `{ id, name }` / 204 | > > > [!NOTE] > > > > `Returns` shows the shape of the operation output (the underlying HubSpot API resource). > > ## DSUL Examples > > ### Look up a contact by email > > ```yaml theme={null} > - Hubspot.searchContacts: > filterGroups: > - filters: > - propertyName: email > operator: EQ > value: '{{lead.email}}' > properties: > - email > - firstname > - lastname > - lifecyclestage > limit: 1 > output: matched > ``` > > ### Create a deal and associate it to a company > > ```yaml theme={null} > - Hubspot.createDeal: > properties: > dealname: '{{opportunity.name}}' > amount: '{{opportunity.amount}}' > dealstage: 'appointmentscheduled' > pipeline: 'default' > closedate: '{{opportunity.closeDate}}' > associations: > - to: > id: '{{companyId}}' > types: > - associationCategory: HUBSPOT_DEFINED > associationTypeId: 5 > output: created > ``` > > ### Add a contact to a static list > > ```yaml theme={null} > - Hubspot.addListMembers: > listId: '{{leadsListId}}' > recordIds: > - '{{contactId}}' > ``` > > ### Send a transactional email > > ```yaml theme={null} > - Hubspot.sendTransactionalEmail: > emailId: '{{templateId}}' > message: > to: '{{lead.email}}' > from: 'noreply@acme.com' > contactProperties: > firstname: '{{lead.firstName}}' > customProperties: > orderId: '{{order.id}}' > orderTotal: '{{order.total}}' > ``` > > ### Bulk-import contacts > > ```yaml theme={null} > - Hubspot.batchCreateContacts: > inputs: > - properties: > email: 'alice@acme.com' > firstname: 'Alice' > lastname: 'Doe' > - properties: > email: 'bob@acme.com' > firstname: 'Bob' > lastname: 'Smith' > output: batchResult > ``` *** ## Error Handling | HTTP Status | Meaning | Typical Cause | | - | - | - | | `400` | Bad Request | Invalid property value, malformed `filterGroups`, missing required field | | `401` | Unauthorized | Missing / invalid PAT or OAuth token, revoked refresh token | | `403` | Forbidden | The token lacks the required scope, or the portal does not have the feature enabled (Marketing Hub Pro+, etc.) | | `404` | Not Found | Record / list / workflow / form does not exist (or was archived) | | `409` | Conflict | Unique-property collision (e.g. a contact with the same email already exists) | | `429` | Rate Limited | Per-portal quota exceeded; back off using the `X-HubSpot-RateLimit-Secondly-Remaining` headers | | `500` / `502` / `503` | Server Error | Transient HubSpot API error; retry with exponential backoff | ### Common Issues **"This agent is not authorized to use this connector"**: The calling agent is not in the allowlist. Open the configuration app → **Authorized agents** → tick this agent (id is shown in the error) or enable **Allow all agents**, and Save. The **Install capability** button does this for you. **"The calling agent could not be identified"**: The MCP capability *Scope* does not declare `agent_id`, so Agent Creator never injects the agent identity. Set the Scope to `context_id,agent_id,user_id` on the capability (this is separate from the HubSpot OAuth scopes), then allow the agent in the config app. **"HubSpot is not connected for this user"**: No per-user OAuth token is stored for the caller. Open the configuration app (OAuth mode) and click **Connect**, or use the agent's connect flow. **"HubSpot token refresh failed … must reconnect"**: The stored refresh token was rejected by HubSpot (revoked, or expired after \~6 months idle). The connection is dropped automatically; the user must reconnect from the config app. **"HubSpot OAuth is not configured"**: Neither a tenant OAuth client nor the central platform client is available. Set the OAuth client ID/secret in the config app (tenant mode), or ask the platform maintainer to provision the central OAuth client from the core workspace's config app. **`invalid_scope` / "domain mismatch" during the OAuth dance**: The OAuth URL requests a scope the deployed HubSpot app does not declare. Every requested scope must appear in `requiredScopes` or `optionalScopes` of `app-hsmeta.json`; re-run `hs project upload && hs project deploy` after editing. **`OBJECT_ALREADY_EXISTS` on contact create**: A contact with the same email already exists. Either `update` the existing contact (use `email` as `idProperty`) or query first with `search`. **`Lists API: cannot add members to a dynamic list`**: Only static / `MANUAL` lists accept `addMembers` and `removeMembers`. Dynamic lists are driven by their filter criteria. **No token revocation**: HubSpot exposes no RFC 7009 revocation endpoint, so disconnecting deletes the platform-stored tokens rather than revoking them at HubSpot; refresh tokens may stay valid until they naturally expire (typically 6 months idle). ## External Resources > [card] [HubSpot Developer Docs](https://developers.hubspot.com/docs/api/overview) > > Official HubSpot REST API reference > [card] [HubSpot OAuth scopes](https://developers.hubspot.com/docs/apps/developer-platform/build-apps/authentication/scopes) > > Required vs optional scopes, scope-tier matrix, scope group reference > [card] [Tool Agents](/products/agent-factory/capabilities) > > Learn how Agent Creator agents consume MCP tools in Prisme.ai. # Jira Source: https://docs.prisme.ai/apps-store/marketplace/connectors/jira Search, create and manage Atlassian Jira Cloud and Data Center issues, projects, users, metadata and agile boards from Agent Creator agents and Builder workflows, with per-user Atlassian OAuth ![Jira](https://mintcdn.com/prismeai/dzAaoAETtV2DGkv4/images/connectors/jira-next.png?fit=max\&auto=format\&n=dzAaoAETtV2DGkv4\&q=85\&s=9e1ce01bb19b6ac2a0b7783ca6c4244b) The Jira app provides read/write access to [Atlassian Jira](https://www.atlassian.com/software/jira) through the official platform REST API and Agile 1.0 (Jira Software). It supports both **Jira Cloud** (platform REST API v3) and **Jira Data Center 10.3** (platform REST API v2); the `deployment` setting selects the API routes and is chosen independently from the authentication method. It can be consumed two ways: as a remote MCP server that **Agent Creator** agents call as tools, or as a Builder app whose instructions you call directly from DSUL. The MCP surface groups every operation into **seven entity tools** (`issues`, `search`, `projects`, `users`, `metadata`, `agile`, `attachments`), each driven by an `action` argument, and runs in the **tenant app-instance context** (it resolves the installing workspace's own credentials and gates which agents may call it). Authentication is per-user and supports several modes: * **Per-user OAuth2, central client** (`oauthCentral`, recommended): one Atlassian 3LO OAuth app is registered once by the platform maintainer; every end user signs in with their own Atlassian account. Nothing to register per tenant: each workspace just installs the app and clicks *Connect*. * **Per-user OAuth2, tenant client** (`oauth`): paste your own Atlassian OAuth client ID/secret in the connector config app. Each user signs in with their own account against your client (PKCE authorization-code, 3LO). * **API token, HTTP Basic** (`apiToken`): an Atlassian account email + API token + your `*.atlassian.net` site. A single shared service identity, no interactive sign-in. * **Direct access token** (`accessToken`): a caller-managed Atlassian access token, used as-is with no exchange. * **Per-user OAuth1 RSA-SHA1** (`oauth1`, Data Center only): a Jira Application Link signs each request with a shared consumer key and RSA private key, plus an access token that each user obtains from that Application Link. Use it on Data Center instances where OAuth2 is not available. Selecting it on a Cloud deployment fails with `oauth1 is supported only with deployment=dataCenter.` > [card] Issues & workflow > > Search with JQL, create, read, update, delete, assign and comment on issues; list and apply workflow transitions. > [card] Projects & metadata > > List projects, components, versions and statuses; discover fields, issue types, priorities and create-screen metadata before writing. > [card] Per-user Atlassian OAuth > > Per-user 3LO OAuth (central or tenant client), an HTTP Basic API token, or a direct access token, resolved server-side. ## Video tutorial This three-and-a-half-minute tutorial walks through the four ways to use this connector, from the simplest to the most advanced: connecting your own Atlassian account from a chat, adding the Jira Next capability to an agent in Agent Creator, controlling authentication and authorized agents from a Builder workspace (with an API token and a `searchJql` automation), and declaring the platform OAuth client as an administrator. Use the buttons in the top-right corner of the player to switch the narration language and the subtitles. The sections on the left are clickable. Screens show the English interface; narration and subtitles are available in English and French. ## Who is this for? This connector is used by three different roles. Jump to the section that matches yours; each one is self-contained. > [card] Agent builder > > You build agents in **Agent Creator** and want them to read and act on Jira. → *Agent builder* tab. > [card] Platform admin > > You run the platform and set up the shared Atlassian OAuth client once for everyone. → *Platform admin setup* accordion below. > [card] Workspace builder > > You write Builder automations (DSUL) that call Jira operations directly. → *Workspace builder* tab. ## Prerequisites (Atlassian side) * An **Atlassian Jira Cloud** site (`https://yoursite.atlassian.net`) or a **Jira Data Center 10.3** base URL (an absolute HTTP or HTTPS URL, optionally with a context path such as `/jira`, and without credentials, query string or fragment), plus an account with permission on the projects you intend to use. * For the OAuth modes: an **OAuth 2.0 (3LO) app** registered in the [Atlassian Developer Console](https://developer.atlassian.com/console/myapps/), with the **Jira platform REST API** added and the scopes below granted. For the `apiToken` mode instead: an **Atlassian account email** + an **API token** generated at [Atlassian API Tokens](https://id.atlassian.com/manage-profile/security/api-tokens). * The base URL is resolved automatically: OAuth modes call `https://api.atlassian.com/ex/jira/{cloudId}` (the `cloudId` is discovered from the granted site); the `apiToken` mode calls `https://{site}.atlassian.net` directly. * On a **Data Center** deployment you supply the base URL yourself, the connector calls it directly, and every platform route is served under `/rest/api/2` instead of `/rest/api/3` (JQL search uses `/rest/api/2/search`). Agile operations stay on `/rest/agile/1.0` for both deployments. Data Center OAuth2 uses the instance endpoints `{baseUrl}/rest/oauth2/latest/authorize` and `{baseUrl}/rest/oauth2/latest/token`. The OAuth scopes requested by default are the **classic** Jira platform scopes, which cover every platform operation (issues, search, projects, users, metadata, attachments): ```text theme={null} read:jira-work write:jira-work read:jira-user manage:jira-project manage:jira-configuration offline_access ``` > [!WARNING] > > **Agile boards/sprints/backlog need a different, fully-granular OAuth app; they do not work with the classic scopes above.** The Jira Agile 1.0 API (the `agile` tool: boards, sprints, backlog) only accepts the **granular** Jira Software scopes (`read:board-scope:jira-software`, `write:board-scope:jira-software`, `read:sprint:jira-software`, `write:sprint:jira-software`) **and refuses any token that also carries a classic scope** ("scope does not match"). So enabling Agile requires migrating the *entire* Atlassian app to granular scopes (\~30-40 verbose scopes covering all platform operations too), which is incompatible with the simple classic setup. With the default classic scopes, the seven `agile` operations are not usable. This is an Atlassian platform limitation, not a connector limitation; see the *Platform admin setup* accordion for the trade-off. > [accordion] Platform admin (Governance): one-time platform setup > > **Goal:** two one-time tasks: (1) configure the shared **central Atlassian OAuth client** so every workspace lets its users sign in with their own Atlassian account, and (2) expose Jira as a reusable **capability** in AI Governance so agent builders can pick it without pasting endpoint URLs. > > ## 1. Configure the connector > > **1. Register the OAuth 2.0 (3LO) app at Atlassian** > > In the [Atlassian Developer Console](https://developer.atlassian.com/console/myapps/), create an app → **Authorization > OAuth 2.0 (3LO)**, and set the **Callback URL** to the core workspace callback: > > ```text theme={null} > /workspaces/slug:jira-next/webhooks/oauthCallback > ``` > > (e.g. `https://api.studio.prisme.ai/v2/workspaces/slug:jira-next/webhooks/oauthCallback` on production; `` is the production API URL. Copy the exact URI from the connector's configuration app, which renders it for you.) Then under **Permissions**, add the **Jira platform REST API** and enable the scopes listed in *Prerequisites*. Note the **Client ID** and **Secret** from **Settings**. > > **2. Choose classic or granular scopes, and decide about Agile** > > Atlassian enforces **classic XOR granular scopes per product** in the developer console: the classic scopes (`read:jira-work`, `write:jira-work`, `read:jira-user`, `manage:jira-project`, `manage:jira-configuration`) do **not** appear in the granular list and cannot be mixed with granular Jira Software scopes on the same token. > > * For the 36 platform operations (issues, search, projects, users, metadata, attachments), keep the **classic** scope set above. Simple, recommended. > > * To additionally enable the `agile` tool (boards / sprints / backlog), you must migrate the app to a **fully-granular** set (every platform scope plus `read:board-scope:jira-software`, `write:board-scope:jira-software`, `read:sprint:jira-software`, `write:sprint:jira-software`), because the Agile API rejects a token that also carries any classic scope. This is verbose (\~30-40 scopes) and is the only way to use Agile. > > > [!WARNING] > > > > The connector requests exactly the scopes set in its **Scopes** field (the central scopes entered in step 3, overridable per workspace), **not** whatever is enabled on the Atlassian app. Enabling more scopes in the Atlassian developer console has no effect until you also add them to the connector's Scopes field. Conversely the Scopes field can never grant a permission the Atlassian app does not expose. > > **3. Enter the credentials through the configuration app** > > Open the central `jira-next` workspace and launch its **Configuration app** at `/apps/jira-next` (e.g. `https://studio.prisme.ai/apps/jira-next`), also linked as `Configuration app` on the installed instance. Switch to the maintainer view and follow the in-app instructions to paste the **Client ID**, **Client Secret** and the **Scopes**; the app stores them in the core workspace's secrets for you. Do not edit Studio's raw Secrets by hand. These credentials stay in the `jira-next` workspace and are never exposed to tenants or end users; token exchange is proxied through the core `centralTokenExchange` webhook so the client secret never leaves the core workspace. > > > [!NOTE] > > > > **One Atlassian OAuth app can serve both Jira and Confluence.** A single Atlassian app (one Client ID/Secret) can have both the Jira platform REST API and the Confluence API enabled. Each connector requests **its own** Scopes, so Jira can stay on classic scopes while Confluence uses its required granular scopes on the very same app; point both connectors' config apps at the same Client ID/Secret and give each its own Scopes field. > > **4. Tell workspaces to use the central client** > > Each consuming workspace selects auth mode **`oauthCentral`** in the connector configuration app (no client id/secret to enter on their side). Their users then just click **Connect**. > > ## 2. Declare the capability in AI Governance > > Generic connectors (broad tool surfaces meant to be shared across many agents, like Jira) are best exposed as a named **capability** in AI Governance. Agent builders then enable that capability on their agents instead of pasting a raw MCP endpoint. > > **1. Open AI Governance > Capabilities** > > Create (or edit) the **Jira** capability. > > **2. Point it at the MCP endpoint** > > Set the capability's MCP server URL to the connector's **MCP Endpoint**, and set its **Scope** to: > > ```text theme={null} > context_id,agent_id,user_id > ``` > > The `agent_id` in the scope is what lets the connector identify and authorize the calling agent. > > **3. Make it available to agent builders** > > Once created, the capability appears in the capability picker for agent builders in your organization, who enable it on their agents. Access to the catalog follows your organization's existing roles; there is no per-capability role grant. > > **4. Smoke-test** > > From an agent that has the capability, in a workspace configured for `oauthCentral`, trigger any tool. The user is prompted to connect once (Atlassian sign-in); subsequent calls reuse the stored token transparently and refresh it automatically. > > > [!WARNING] > > > > Declaring the capability makes the connector **available**; it does not by itself authorize a specific agent. This connector follows the **tenant-context model**: which agents may actually call it is gated per-workspace by the **authorized-agents allowlist** in the configuration app (see the *Workspace builder* tab). Agents show a **Connect** button only if the catalog entry carries the connector's connect / status / disconnect webhooks in its `auth` block. The configuration app's **Add to catalog** button writes it for you. If you create the entry by hand, paste that block into **Auth Configuration**: the platform adds it later on its own only for a workspace endpoint (ending in `.mcp`), never for the connector's global `/webhooks/mcp` endpoint. *** > [tab] Agent builder (Agent Creator) > > ## Agent builder > > **Goal:** let an agent you build in Agent Creator read and act on Jira through MCP tools. > > > [!NOTE] > > > > Before an agent can call the connector, a *Workspace builder* must have installed and configured the Jira app in a workspace (see the *Workspace builder* tab), and, for the central OAuth mode, a *Platform admin* must have provisioned the shared OAuth client (see the *Platform admin setup* accordion above). > > This connector runs in the **tenant app-instance context**: your agent is authorized two ways at once: it is identified by the `agent_id` that Agent Creator injects through the capability *Scope*, and that agent must appear in the connector's **authorized-agents allowlist** (managed in the configuration app). The Atlassian token itself is resolved server-side from the configured auth mode. > > There are two ways to wire it up. Pick based on how much isolation you need. > > ## Option A: Enable the shared capability from the catalog > > The fastest path: a *Platform admin* has already published a **Jira** capability (see the *Platform admin setup* accordion above, §2), so you just pick it from the catalog. > > **1. Open your agent in Agent Creator** > > Open the agent you want to extend and go to its capabilities / tools. > > **2. Add the Jira capability** > > Browse the capability catalog, select **Jira**, and enable it. The MCP endpoint URL and the *Scope* (`context_id,agent_id,user_id`) are already wired by the admin; nothing to paste, and the shared instance accepts every agent, so there is no allowlist step on your side. > > **3. Connect an Atlassian account (OAuth modes)** > > On the first tool call, an unconnected user is prompted to sign in; Agent Creator surfaces a `connect_url`. The `apiToken` and `accessToken` modes need no per-user sign-in. > > > [!NOTE] > > > > Convenient, but your agent runs against a **shared, platform-managed instance**: its Atlassian credentials are owned by someone else and the instance accepts every agent that is granted the capability. Prefer Option B for anything beyond quick experiments. > > ## Option B: Run it from your own workspace (recommended) > > For production agents, install the connector in **your own workspace** and point the agent at *that* workspace's MCP endpoint. > > > [!WARNING] > > > > **Prefer this mode for security.** Because the MCP runs in *your* app-instance context, the Atlassian credentials, the per-user OAuth tokens and the authorized-agents allowlist are all **scoped to your workspace**, not shared platform-wide. You decide exactly which agents may call it and which Atlassian account / auth mode backs them, and a misconfiguration elsewhere can never expose your data. The shared catalog capability (Option A) is a broad surface many agents can reach; your own workspace is an isolated, least-privilege boundary. > > **1. Install and configure the connector in your workspace** > > Follow the *Workspace builder* tab: install **JiraNext** in your workspace, open its **Configuration app**, choose the auth mode and connect an Atlassian account. > > **2. Allowlist your agent** > > In that workspace's config app, open **Authorized agents** and tick your agent (the **Install capability** button does this for you). > > **3. Add the MCP capability to your agent** > > In your agent, add a capability pointing at **your workspace's MCP Endpoint** URL, and set its **Scope** to: > > ```text theme={null} > context_id,agent_id,user_id > ``` > > The `agent_id` is what lets the connector identify and authorize your agent; without it, every call is rejected with an explicit "agent could not be identified" message. This *Scope* is separate from the Atlassian OAuth scopes. > > **4. Connect an Atlassian account (OAuth modes)** > > On the first tool call, the user is prompted to sign in (or uses **Connect** in the config app). > > ## Brief the agent in its system prompt > > Whichever option you pick, wiring the capability is not enough: the agent must know the MCP exists and when to use it. Copy-pasteable starter: > > ```text theme={null} > You have access to the Jira MCP server (tools: issues, search, projects, users, metadata, agile, attachments). Each tool takes an `action` argument. Use `search` (action `jql`) to find issues, `issues` (action `get`) to read one by key (e.g. PROJ-123), and `issues` create/update/delete/assign to manage them. To move an issue, call `issues` getTransitions then doTransition. Rich text (description, comment body) uses Atlassian Document Format (ADF), and users are referenced by `accountId` (resolve with the `users` tool). Before creating an issue, discover the required fields with `metadata` createmeta then createmetaFields. Confirm with the user before any create, update, delete, assign or transition. > ``` > > > [!NOTE] > > > > **Legacy AI Knowledge agents** (no native MCP picker): add the connector under **Advanced > Tools > MCP** and paste the **MCP Endpoint** URL. The agent still has to be allowlisted in the config app and its identity propagated so the connector can read its `agent_id`. > > > [!NOTE] > > > > **Restricting to read-only (least privilege).** Jira tools cover both reads and writes (create / update / delete / assign issues, transitions, comments). The requested OAuth scopes **are** the grant, so the connector only obtains what the **Scopes** field in the configuration app asks for. To allow only read access, set a read-only scope list: > > > > ```text theme={null} > > read:jira-work read:jira-user offline_access > > ``` > > > > (Drop `write:jira-work`, `manage:jira-project` and `manage:jira-configuration`.) With central OAuth (`oauthCentral`) you do **not** create your own Atlassian client: keep `oauthCentral` and just enter the read-only scopes; your tenant scope overrides the platform default (the central app must expose those read scopes). Write calls are then rejected by Atlassian with `403`. Note this is set at the workspace level; a workspace editor can widen it again, and a provider-side restriction (a read-only Atlassian account/permission scheme) is the only hard guarantee. For the `apiToken` mode, restrict at the provider instead by backing the connection with a Jira account that has read-only project permissions. > > ## Available Tools > > Each tool takes an `action` argument selecting the concrete operation, plus the per-action parameters. > > | Tool | Description | > | - | - | > | `issues` | Jira issues (REST v3). Actions: `get`, `create`, `update`, `delete`, `assign`, `getTransitions`, `doTransition`, `getComments`, `addComment`, `getEditMeta`. Rich text uses ADF; users by `accountId`. | > | `search` | Search issues with JQL (`POST /rest/api/3/search/jql`). Action: `jql`. Token-based pagination via `nextPageToken`. | > | `projects` | Jira projects. Actions: `list`, `get`, `components`, `versions`, `statuses`. | > | `users` | Jira users (identified by `accountId`). Actions: `search`, `get`, `myself`, `assignable`. | > | `metadata` | Discover fields, types and create metadata. Actions: `fields`, `issuetypes`, `priorities`, `statuses`, `createmeta`, `createmetaFields`. | > | `agile` | Jira Software boards, sprints & backlog (Agile 1.0). Actions: `boards`, `getBoard`, `boardIssues`, `sprints`, `getSprint`, `sprintIssues`, `backlog`. **Requires a fully-granular Jira Software OAuth setup** (see Prerequisites). | > | `attachments` | Issue attachments. Actions: `getMeta`, `delete` (`add` is not available inline; upload binaries via Jira directly). | > > ## Output Formats > > Every tool accepts an `outputFormat` argument that controls the MCP response shape: > > * **`verbose`** (default): human-readable text optimized for LLM consumption > * **`structured`**: machine-readable JSON in `structuredContent` > * **`both`**: both the text and the structured content > > ## Tool Details > > ### search > > ```json theme={null} > { > "name": "search", > "arguments": { > "action": "jql", > "body": { > "jql": "project = DEV AND status = \"In Progress\" ORDER BY updated DESC", > "maxResults": 25, > "fields": ["summary", "status", "assignee"] > } > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | `jql`. | > | `body` | Yes | Search request `{ jql, maxResults (≤100), nextPageToken, fields: [..], expand }`. Always pass `fields` to limit the payload. | > | `body.nextPageToken` | No | Cursor from a previous response to fetch the next page (the legacy `startAt` is not used here). | > > ### issues > > ```json theme={null} > { > "name": "issues", > "arguments": { > "action": "create", > "body": { > "fields": { > "project": { "key": "DEV" }, > "issuetype": { "name": "Task" }, > "summary": "Implement new feature", > "description": { > "type": "doc", > "version": 1, > "content": [ > { "type": "paragraph", "content": [{ "type": "text", "text": "Detailed description here." }] } > ] > } > } > } > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | One of `get`, `create`, `update`, `delete`, `assign`, `getTransitions`, `doTransition`, `getComments`, `addComment`, `getEditMeta`. | > | `issueIdOrKey` | For everything but create | Issue id or key, e.g. `DEV-123`. | > | `body` | For create/update/assign/doTransition/addComment | Jira v3 JSON body. Create/update use `{ fields }` (or `{ update }`); assign `{ accountId }`; doTransition `{ transition: { id } }`; addComment `{ body: }`. | > | `fields` | No | `fields` query param (comma-separated list, or `*all`) for `get`. | > | `deleteSubtasks` | No | `delete` only: `"true"` to delete subtasks. | > > ### metadata > > ```json theme={null} > { > "name": "metadata", > "arguments": { > "action": "createmetaFields", > "projectIdOrKey": "DEV", > "issueTypeId": "10002" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | One of `fields`, `issuetypes`, `priorities`, `statuses`, `createmeta`, `createmetaFields`. | > | `projectIdOrKey` | For createmeta/createmetaFields | Project id or key. | > | `issueTypeId` | For createmetaFields | Issue type id (from `createmeta`). | > > Resolve a custom field's technical id (`customfield_…`) with `metadata` `fields`, then confirm it is on the create screen for that project + issue type with `createmeta` → `createmetaFields` before passing it in `issues` create/update. > > ### agile > > ```json theme={null} > { > "name": "agile", > "arguments": { > "action": "sprintIssues", > "sprintId": "42", > "jql": "assignee = currentUser()", > "fields": "summary,status", > "maxResults": 50 > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | One of `boards`, `getBoard`, `boardIssues`, `sprints`, `getSprint`, `sprintIssues`, `backlog`. | > | `boardId` | For getBoard/boardIssues/sprints/backlog | Agile board id. | > | `sprintId` | For getSprint/sprintIssues | Sprint id. | > | `state` | No | `sprints` only: `future`, `active` or `closed`. | > | `jql` / `fields` | No | Optional JQL filter and comma-separated field list (boardIssues, sprintIssues, backlog). | > > > [!WARNING] > > > > The `agile` tool needs a fully-granular Jira Software OAuth app (see *Prerequisites* and the *Platform admin setup* accordion). With the default **classic** scopes, every `agile` action fails with an Atlassian "scope does not match" error. > > ### users > > ```json theme={null} > { > "name": "users", > "arguments": { > "action": "assignable", > "project": "DEV", > "query": "ada" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | One of `search`, `get`, `myself`, `assignable`. | > | `query` | For search/assignable | Name or email fragment. | > | `accountId` | For get | Atlassian `accountId`. | > | `project` / `issueKey` | For assignable | Scope assignable users to a project or issue. | > > Reference users by `accountId` (not username) in every issue body; `myself` returns the connected user's own `accountId`. > [tab] Workspace builder (DSUL) > > ## Workspace builder > > **Goal:** install the connector in a workspace, configure authentication and the agent allowlist, and call Jira operations from your automations. > > ## Installation > > 1. Go to **Apps** in your workspace > 2. Search for **JiraNext** and install it > 3. Open the **Configuration app** (the link auto-populated on install) to choose the auth mode, provide credentials, connect, and allow the agents that may call the connector > > ## Configuration > > | Field | Description | > | - | - | > | **Configuration app** | Auto-populated on install; open this link to configure authentication (mode + credentials), connect an Atlassian account (OAuth modes), and manage the authorized-agents allowlist. | > > The configuration app drives everything; the app instance itself has no per-field credential form. From it you pick one of: > > | Auth mode | What you provide | Best for | > | - | - | - | > | `oauthCentral` | Nothing; just click **Connect** | Workspaces on a platform where the admin set up the central Atlassian client | > | `oauth` | Your own Atlassian **Client ID + Secret** (callback URI `/workspaces/slug:jira-next/webhooks/oauthCallback`) + **Scopes** | You manage your own Atlassian OAuth app | > | `apiToken` | Atlassian **account email** + **API token** + **site** (`yoursite.atlassian.net`) | A single shared service identity, no interactive sign-in | > | `accessToken` | A pre-minted Atlassian **access token** | Short-lived / caller-managed tokens | > > > [!NOTE] > > > > Credentials are provisioned into the workspace's Secrets by the `onInstall` flow and resolved server-side. The agent allowlist (**Authorized agents**) gates which Agent Creator agents may call the MCP endpoint; see the *Agent builder* tab. The OAuth **Scopes** field is what the connector actually requests (default classic scopes; see *Prerequisites*); set a read-only list there to restrict writes. > > ## Available Instructions > > Every instruction resolves credentials from the workspace configuration. Operations are grouped by resource; the MCP server exposes the same operations behind the seven entity tools (see the *Agent builder* tab). > > ### Issues > > | Instruction | Description | Returns | > | - | - | - | > | `getIssue` | Fetch one issue by `issueIdOrKey` (e.g. `DEV-123`); narrow with `fields`/`expand`. | `{ id, key, fields: { summary, status, … } }` | > | `createIssue` | Create an issue from `body.fields` (`{ project, issuetype, summary, … }`; ADF for rich text). | `{ id, key, self }` | > | `updateIssue` | Edit an issue by `issueIdOrKey`; `body` = `{ fields }` or `{ update }`. `notifyUsers: "false"` suppresses mail. | Empty (HTTP 204) | > | `deleteIssue` | Delete an issue by `issueIdOrKey`; `deleteSubtasks: "true"` to cascade. | Empty (HTTP 204) | > | `assignIssue` | Set the assignee by `issueIdOrKey`; `body` = `{ accountId }`. | Empty (HTTP 204) | > | `getTransitions` | List the available workflow transitions for an `issueIdOrKey`. | `{ transitions: [{ id, name, to }] }` | > | `doTransition` | Move the issue by `issueIdOrKey`; `body` = `{ transition: { id } }`. | Empty (HTTP 204) | > | `getComments` | List comments on an `issueIdOrKey`; page with `startAt`/`maxResults`. | `{ comments: [{ id, body, author, created }], total }` | > | `addComment` | Add a comment to an `issueIdOrKey`; `body` = `{ body: }`. | `{ id, body, author, created }` | > | `getEditMeta` | Editable-fields metadata for an `issueIdOrKey`. | `{ fields: { : { required, schema, … } } }` | > > ### Search > > | Instruction | Description | Returns | > | - | - | - | > | `searchJql` | Run a JQL search; `body` = `{ jql, maxResults (≤100), nextPageToken, fields: [..], expand }`. | `{ issues: [{ id, key, fields }], nextPageToken }` | > > ### Projects > > | Instruction | Description | Returns | > | - | - | - | > | `listProjects` | List/search projects (paginated); `query`, `startAt`, `maxResults`, `orderBy`, `expand`. | `{ values: [{ id, key, name }], total, isLast }` | > | `getProject` | Get a project by `projectIdOrKey`. | `{ id, key, name, projectTypeKey, lead }` | > | `getProjectComponents` | List a project's components by `projectIdOrKey`. | `[{ id, name, lead }]` | > | `getProjectVersions` | List a project's versions by `projectIdOrKey`. | `[{ id, name, released, archived }]` | > | `getProjectStatuses` | List the issue-type statuses of a project by `projectIdOrKey`. | `[{ id, name, statuses: [{ id, name }] }]` | > > ### Users > > | Instruction | Description | Returns | > | - | - | - | > | `searchUsers` | Find users by name/email fragment `query`. | `[{ accountId, displayName, emailAddress }]` | > | `getUserByAccountId` | Get a user by `accountId`. | `{ accountId, displayName, active, … }` | > | `getMyself` | The current authenticated user. | `{ accountId, displayName, emailAddress }` | > | `findAssignableUsers` | Users assignable to a `project`/`issueKey`; filter with `query`. | `[{ accountId, displayName }]` | > > ### Metadata > > | Instruction | Description | Returns | > | - | - | - | > | `listFields` | List all fields (system + custom). | `[{ id, name, custom, schema }]` | > | `listIssueTypes` | List all issue types. | `[{ id, name, subtask }]` | > | `listPriorities` | List priorities (paginated); `startAt`, `maxResults`. | `{ values: [{ id, name }], total }` | > | `listStatuses` | List all statuses. | `[{ id, name, statusCategory }]` | > | `getCreateMetaIssueTypes` | Issue types creatable in a `projectIdOrKey`. | `{ issueTypes: [{ id, name }] }` | > | `getCreateMetaFields` | Fields required to create a given type in `projectIdOrKey` + `issueTypeId`. | `{ fields: [{ fieldId, required, schema }] }` | > > ### Agile > > | Instruction | Description | Returns | > | - | - | - | > | `listBoards` | List boards; filter by `type`, `name`, `projectKeyOrId`. | `{ values: [{ id, name, type }], isLast }` | > | `getBoard` | Get a board by `boardId`. | `{ id, name, type, location }` | > | `getBoardIssues` | Issues on a `boardId`; optional `jql`, `fields`. | `{ issues: [{ id, key, fields }], total }` | > | `listSprints` | List a board's sprints by `boardId`; `state` = `future`/`active`/`closed`. | `{ values: [{ id, name, state }], isLast }` | > | `getSprint` | Get a sprint by `sprintId`. | `{ id, name, state, startDate, endDate }` | > | `getSprintIssues` | Issues in a `sprintId`; optional `jql`, `fields`. | `{ issues: [{ id, key, fields }], total }` | > | `getBacklogIssues` | Backlog issues of a `boardId`; optional `jql`. | `{ issues: [{ id, key, fields }], total }` | > > > [!NOTE] > > > > The Agile instructions require a fully-granular Jira Software OAuth setup; they do not work with the default classic scopes (see *Prerequisites*). > > ### Attachments > > | Instruction | Description | Returns | > | - | - | - | > | `getAttachmentMeta` | Get an attachment's metadata by `id`. | `{ id, filename, size, mimeType, content }` | > | `deleteAttachment` | Delete an attachment by `id`. | Empty (HTTP 204) | > > > [!NOTE] > > > > `Returns` shows the shape of the operation output (the underlying Jira REST resource). Attachment **upload** (`add`) is not available inline, because binary multipart cannot transit the connector; upload via the Jira UI or REST API directly. To list an issue's attachments, call `getIssue` with `fields` including `attachment`. > > ## DSUL Examples > > **Search issues with JQL:** > > ```yaml theme={null} > - JiraNext.searchJql: > body: > jql: "project = DEV AND status = 'In Progress' ORDER BY updated DESC" > maxResults: 25 > fields: > - summary > - status > - assignee > output: results > ``` > > **Create an issue (ADF description):** > > ```yaml theme={null} > - JiraNext.createIssue: > body: > fields: > project: > key: DEV > issuetype: > name: Task > summary: '{{summary}}' > description: > type: doc > version: 1 > content: > - type: paragraph > content: > - type: text > text: '{{detail}}' > output: newIssue > ``` > > **Discover create metadata, then transition an issue:** > > ```yaml theme={null} > - JiraNext.getCreateMetaIssueTypes: > projectIdOrKey: DEV > output: types > > - JiraNext.getTransitions: > issueIdOrKey: '{{issueKey}}' > output: transitions > > - JiraNext.doTransition: > issueIdOrKey: '{{issueKey}}' > body: > transition: > id: '{{transitions.transitions[0].id}}' > ``` > > **Assign an issue to the connected user:** > > ```yaml theme={null} > - JiraNext.getMyself: {} > output: me > > - JiraNext.assignIssue: > issueIdOrKey: DEV-123 > body: > accountId: '{{me.accountId}}' > ``` *** ## Security The answers that hold for every connector (agent access, shared knowledge bases, credentials, models, egress) are on [Connector security](/apps-store/marketplace/connectors/security). This section lists what is specific to Jira. | Topic | Jira | | - | - | | Authentication family | Delegated OAuth (Atlassian, authorization code with PKCE): each user connects their own Atlassian account. On Data Center, each user can also enter their own personal access token or OAuth1 access token. | | Production modes | `oauthCentral` or `oauth`. On Data Center, also `personalAccessToken` or `oauth1`. | | Modes to avoid in production | `accessToken` (testing only), `apiToken` (one email and API token shared by every caller) | | Read-only scopes | Cloud: `read:jira-work`, `read:jira-user`, `offline_access`. Data Center: `READ`. These are the **read-only** presets of the configuration app. The default scopes include `write:jira-work`, `manage:jira-project` and `manage:jira-configuration` on Cloud, and `READ WRITE` on Data Center. | | Agent allowlist | Yes, on the tenant endpoint (empty at installation). The global endpoint accepts every agent. | | Per-reader access control on knowledge bases | Not applicable: this connector does not feed knowledge bases. | | Outbound hosts | Cloud: `api.atlassian.com`, `auth.atlassian.com`, and `.atlassian.net` in `apiToken` mode. Data Center: the base address the administrator sets at installation. | | Audit events | None specific to this connector | With the read-only scopes, Atlassian itself refuses every create, update, transition and delete call. On Data Center, the `personalAccessToken` and `oauth1` modes keep per-user permissions because each user enters their own token, but the scopes do not apply to them: a Jira personal access token carries all the permissions of its owner. Ask users to set an expiry date on their tokens. *** ## Error Handling | HTTP code | Meaning | | - | - | | `400` | Bad request: invalid JQL, malformed body, or a field value Jira cannot parse. | | `401` | Unauthorized: the Atlassian token is missing, expired or revoked. The user must reconnect (OAuth modes). | | `403` | Forbidden: insufficient OAuth scope (e.g. a write with read-only scopes), or the account lacks permission on the project. | | `404` | Not found: the issue, project, board, sprint or attachment id does not exist or is not visible to the account. | | `422` | Unprocessable: a required field is missing or invalid; resolve field ids with `metadata` `fields` / `createmetaFields`. | | `429` | Rate limit: back off and retry. | | `500` / `503` | Atlassian service error: transient; retry shortly, no reconnection needed. | ### Common Issues **"This agent is not authorized to use this connector"**: The calling agent is not in the allowlist. Open the configuration app → **Authorized agents** → tick this agent (or enable **Allow all agents**) and Save. **"The calling agent could not be identified"**: The MCP capability *Scope* does not declare `agent_id`, so Agent Creator never injects the agent identity. Set the Scope to `context_id,agent_id,user_id` on the capability, then allow the agent in the config app. **"Jira is not connected for this user"**: No per-user OAuth token. Open the configuration app (OAuth mode) and click **Connect**, or use the agent's connect flow. **"token refresh failed … must reconnect"**: The stored refresh token was revoked or expired (Atlassian invalidated it). The connection is dropped automatically; the user must reconnect from the config app. **"OAuth is not configured"**: Neither a tenant Atlassian client nor the central platform client is available. Set the OAuth client ID/secret in the config app, or ask the platform maintainer to provision the central OAuth client. **Agile call fails with "scope does not match"**: The `agile` tool needs a fully-granular Jira Software OAuth app; it cannot run on a token that carries classic scopes. Either migrate the Atlassian app (and the connector **Scopes** field) to the fully-granular set, or avoid the `agile` operations. This is an Atlassian platform limitation (classic and granular Jira Software scopes are mutually exclusive on a token). ## External Resources > [card] [Jira Cloud REST API v3](https://developer.atlassian.com/cloud/jira/platform/rest/v3/) > > Official reference for the Jira platform REST API v3. > [card] [Jira Software (Agile) REST](https://developer.atlassian.com/cloud/jira/software/rest/) > > Official reference for the Agile 1.0 boards / sprints / backlog API. > [card] [Atlassian OAuth 2.0 (3LO) scopes](https://developer.atlassian.com/cloud/jira/platform/scopes-for-oauth-2-3LO-and-forge-apps/) > > Classic vs granular scopes reference for Jira OAuth 2.0 apps. > [card] [Tool Agents](/products/agent-factory/capabilities) > > Learn how Agent Creator agents consume MCP tools in Prisme.ai. # Jira (legacy) Source: https://docs.prisme.ai/apps-store/marketplace/connectors/jira-legacy Search, create, and manage Jira issues from Agent Creator agents and Builder workflows, for Cloud and Data Center > [!NOTE] > > This is the **legacy** Jira connector (static Basic-Auth / PAT credential held by the installing workspace, flat tool names). It is superseded by the new **[Jira](/apps-store/marketplace/connectors/jira)** connector (App+MCP, tenant-context, central Atlassian 3LO OAuth, with issues / search / projects / users / metadata / agile / attachments entity tools). Use the new Jira connector for any new work; this page is kept for existing installations only. ![Jira](https://mintcdn.com/prismeai/Oqq72tWGTtxufvRl/images/connectors/jira.svg?fit=max\&auto=format\&n=Oqq72tWGTtxufvRl\&q=85\&s=e4022802c4da894a5ebfbfc647cfccc6) The Jira connector exposes [Atlassian Jira](https://www.atlassian.com/software/jira) issue tracking as tools, supporting both **Jira Cloud** and **Jira Data Center** deployments. It can be consumed two ways: as a remote MCP server that **Agent Creator** agents call as tools, or as a Builder app whose instructions you call directly from DSUL. Authentication is a **static credential** held by the installing workspace (Basic Auth with Atlassian account email + API token for Cloud, or a Bearer **Personal Access Token (PAT)** for Data Center), resolved server-side so the credential is never exposed to the agent. > [card] Issue management > > Search with JQL, then create, read, update and delete issues, including custom fields once they are resolved by id. > [card] Workflow operations > > List and apply status transitions, add comments and attach files to move issues through their workflow. > [card] Project & field discovery > > List accessible projects, inspect create screens, and discover field ids (including custom fields) before writing. ## Who is this for? This connector is used by three different roles. Jump to the section that matches yours; each one is self-contained. > [card] Agent builder > > You build agents in **Agent Creator** and want them to use Jira. → *Agent builder* tab. > [card] Platform admin > > You run the platform and want to know what to set up once for everyone. → *Platform admin setup* accordion below. > [card] Workspace builder > > You write Builder automations (DSUL) that call Jira operations directly. → *Workspace builder* tab. ## Prerequisites * A **Jira Cloud** or **Jira Data Center** instance, and an account with permission on the projects you intend to use. * Your **base URL**: for Cloud `https://yoursite.atlassian.net`, for Data Center `https://jira.yourcompany.com`. * **For Jira Cloud:** an **Atlassian account email** and an **API token**, generated at [Atlassian API Tokens](https://id.atlassian.com/manage-profile/security/api-tokens). The connector uses these for Basic Auth. * **For Jira Data Center:** a **Personal Access Token (PAT)**, generated under your Jira profile **Personal Access Tokens**. The connector sends it as a Bearer token. > [accordion] Platform admin (Governance): one-time platform setup > > **Goal:** Jira is a **per-workspace** connector: each workspace pastes its own Jira credential (see the *Workspace builder* tab), so there is **no platform-wide credential to provision** and no central OAuth client. > > > [!NOTE] > > > > There is no shared Jira credential for this connector. The base URL, email/API token (Cloud) or PAT (Data Center) always live in the consuming workspace's app configuration. The only optional platform task is to publish Jira as a reusable **capability** in AI Governance so agent builders can enable it from the catalog instead of pasting a raw MCP endpoint. > > ## Declare the capability in AI Governance (optional) > > **1. Open AI Governance > Capabilities** > > Create (or edit) the **Jira** capability. > > **2. Point it at the MCP endpoint** > > Set the capability's MCP server URL to the connector's **MCP Endpoint** (the workspace running the connector), and set its **Scope** to: > > ```text theme={null} > context_id,agent_id,user_id > ``` > > The `agent_id` in the scope is what lets the connector identify the calling agent. > > **3. Make it available to agent builders** > > Once created, the capability appears in the capability picker for agent builders in your organization. Access to the catalog follows your organization's existing roles; there is no per-capability role grant for this static-credential connector. Each workspace running the connector still owns its Jira credential. > > > [!WARNING] > > > > Declaring the capability makes the connector **available**; it does not provision any credential. This connector follows the **static-credential model**: the Jira base URL and token live in the consuming workspace's app configuration. There is **no OAuth auth-config JSON** to attach in Governance. *** > [tab] Agent builder (Agent Creator) > > ## Agent builder > > **Goal:** let an agent you build in Agent Creator search and manage Jira through MCP tools. > > > [!NOTE] > > > > Before an agent can call the connector, a *Workspace builder* must have installed and configured the Jira app in a workspace (see the *Workspace builder* tab). Optionally, a *Platform admin* may have published a Jira capability in AI Governance (see the *Platform admin setup* accordion above). > > This connector runs on a **static credential** owned by the workspace that installed it. Your agent is identified by the `agent_id` that Agent Creator injects through the capability *Scope*; the Jira credential itself is resolved server-side and is never exposed to the agent. > > **1. Install and configure the connector in a workspace** > > Follow the *Workspace builder* tab: install **Jira** in your workspace and provide the base URL, deployment type, and credential (Cloud email + API token, or Data Center PAT). > > **2. Add the MCP capability to your agent** > > In your agent, add a capability pointing at the workspace's **MCP Endpoint** URL, and set its **Scope** to: > > ```text theme={null} > context_id,agent_id,user_id > ``` > > The `agent_id` lets the connector identify your agent. The credential is resolved from the workspace configuration server-side. > > **3. Brief the agent** > > Tell the agent the tools exist and when to use them. See *Brief the agent in its system prompt* below. > > ## Brief the agent in its system prompt > > A short brief keeps the agent from guessing field ids or skipping discovery. Copy-pasteable starter: > > ```text theme={null} > You have access to the Jira MCP server. Use searchJira with a JQL query to find issues, getIssue to read one by key (e.g. DEV-123), and createIssue / updateIssue / deleteIssue to manage them. To move an issue, call getTransitions then transitionIssue with the chosen transitionId. Use addComment and addAttachment for collaboration. Before writing a custom field, resolve its id with listFields (customOnly: true) and confirm availability with listCreateIssueTypes / getCreateIssueFields. Confirm with the user before any create, update, delete or transition. > ``` > > > [!NOTE] > > > > **Legacy AI Knowledge agents** (no native MCP picker): add the connector under **Advanced > Tools > MCP** and paste the **MCP Endpoint** URL. The agent is still identified by the capability *Scope* and the credential is resolved from the workspace configuration. > > ## Available Tools > > ### Issue Operations > > | Tool | Description | > | - | - | > | `searchJira` | Search issues using JQL | > | `getIssue` | Get issue details by key | > | `createIssue` | Create a new issue | > | `updateIssue` | Update an existing issue | > | `deleteIssue` | Delete an issue | > > ### Field Discovery > > | Tool | Description | > | - | - | > | `listFields` | List or search Jira fields, including custom fields | > | `listCreateIssueTypes` | List issue types available when creating issues in a project | > | `getCreateIssueFields` | Get fields available on the create screen for a project and issue type | > > ### Workflow Operations > > | Tool | Description | > | - | - | > | `getTransitions` | Get available status transitions | > | `transitionIssue` | Change issue status | > | `addComment` | Add a comment to an issue | > | `addAttachment` | Add an attachment to an issue | > > ### Project Operations > > | Tool | Description | > | - | - | > | `listProjects` | List accessible projects | > | `getProject` | Get project details | > > ### Configuration > > | Tool | Description | > | - | - | > | `configureJira` | Store Jira credentials for the calling user (per-user connection) | > > ## Output Formats > > All tools accept an `outputFormat` argument that controls the MCP response shape: > > * **`verbose`** (default): human-readable text optimized for LLM consumption > * **`structured`**: machine-readable JSON in `structuredContent` > * **`both`**: both the text and the structured content > > ## Tool Details > > ### searchJira > > ```json theme={null} > { > "name": "searchJira", > "arguments": { > "jql": "project = DEV AND status = \"In Progress\"", > "maxResults": 10 > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `jql` | Yes | JQL query string (project, status, assignee, labels, text search, …). | > | `maxResults` | No | Max results per page (default 50). | > | `nextPageToken` | No | Cursor for the next page of results. | > | `fields` | No | Comma-separated list of fields to return. | > > ### getIssue > > ```json theme={null} > { > "name": "getIssue", > "arguments": { > "issueKey": "DEV-123" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `issueKey` | Yes | The issue key, e.g. `DEV-123`. | > > ### createIssue > > ```json theme={null} > { > "name": "createIssue", > "arguments": { > "projectKey": "DEV", > "issueType": "Task", > "summary": "Implement new feature", > "description": "Detailed description here", > "priority": "High", > "fields": { > "customfield_10016": 8 > } > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `projectKey` | Yes | Target project key. | > | `issueType` | Yes | Issue type name (e.g. `Task`, `Bug`, `Story`). | > | `summary` | Yes | Issue summary / title. | > | `description` | No | Issue description. | > | `priority` | No | Priority name (e.g. `High`). | > | `fields` | No | Map of additional fields by id, e.g. `customfield_10016`. Resolve custom-field ids with `listFields` first. | > > ### listFields > > ```json theme={null} > { > "name": "listFields", > "arguments": { > "query": "testPrismeField", > "customOnly": true, > "maxResults": 50 > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `query` | No | Substring to match field names. | > | `customOnly` | No | Restrict to custom fields when `true`. | > | `maxResults` | No | Max fields to return. | > > Use the returned `customfield_...` id in `createIssue` or `updateIssue` only after Jira reports the field as available for that project and issue type (confirm with `listCreateIssueTypes` / `getCreateIssueFields`). > > ### transitionIssue > > ```json theme={null} > { > "name": "transitionIssue", > "arguments": { > "issueKey": "DEV-123", > "transitionId": "31", > "comment": "Moving to In Progress" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `issueKey` | Yes | The issue to transition. | > | `transitionId` | Yes | The transition id from `getTransitions`. | > | `comment` | No | Optional comment added with the transition. | > > ### configureJira > > ```json theme={null} > { > "name": "configureJira", > "arguments": { > "baseUrl": "https://yoursite.atlassian.net", > "type": "cloud", > "email": "you@example.com", > "apiToken": "your-api-token" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `baseUrl` | Yes | Jira base URL. | > | `type` | Yes | `cloud` or `datacenter`. | > | `email` | For Cloud | Atlassian account email. | > | `apiToken` | For Cloud | Atlassian API token. | > | `personalAccessToken` | For Data Center | PAT for Jira Data Center. | > > Stores the credential securely in the calling user's platform secrets, so a per-user connection persists across requests without relying on the shared workspace credential. > [tab] Workspace builder (DSUL) > > ## Workspace builder > > **Goal:** install the connector in a workspace, configure the Jira credential, and call Jira operations from your automations. > > ## Installation > > 1. Go to **Apps** in your workspace > 2. Search for **Jira** and install it > 3. Configure the app instance with your Jira base URL, deployment type, and credential (Cloud email + API token, or Data Center PAT) > > ## Configuration > > | Field | Description | > | - | - | > | **Jira Base URL** | The instance URL: `https://yoursite.atlassian.net` (Cloud) or `https://jira.yourcompany.com` (Data Center). | > | **Deployment Type** | `cloud` or `datacenter`. | > | **Atlassian Email** | Cloud only: the Atlassian account email used with the API token. Stored as a workspace secret. | > | **API Token** | Cloud only: the Atlassian API token (Basic Auth). Stored as a workspace secret. | > | **Personal Access Token** | Data Center only: the PAT sent as a Bearer token. Stored as a workspace secret. | > > The connector resolves credentials with the following priority, so the same instance works for shared and per-user setups: > > | Auth source | What you provide | Best for | > | - | - | - | > | Workspace config (default) | Base URL + type + Cloud email/API token or Data Center PAT | Shared workspace connection; all callers use the same Jira account | > | Per-user secrets | Call `configureJira` once per user | A personal Jira connection scoped to the calling user | > > > [!NOTE] > > > > Credentials are stored as workspace (or per-user) secrets and resolved server-side. Jira Cloud uses Basic Auth (email + API token); Jira Data Center uses a Bearer PAT. > > ## Available Instructions > > Every instruction resolves credentials from the workspace configuration (or per-user secrets). > > ### Issues > > | Instruction | Description | Returns | > | - | - | - | > | `searchJira` | Search issues with a `jql` query; page with `maxResults`/`nextPageToken`, narrow with `fields`. | `{ issues: [{ key, fields }], nextPageToken }` | > | `getIssue` | Fetch a single issue by `issueKey` (e.g. `DEV-123`). | `{ key, fields: { summary, status, … } }` | > | `createIssue` | Create an issue from `projectKey`, `issueType`, `summary` (+ optional `description`, `priority`, `fields` map). | `{ id, key, self }` | > | `updateIssue` | Update an existing issue by `issueKey`; pass changed `fields`. | Empty (HTTP 204) | > | `deleteIssue` | Delete an issue by `issueKey`. | Empty (HTTP 204) | > > ### Field Discovery > > | Instruction | Description | Returns | > | - | - | - | > | `listFields` | List or search Jira fields by `query`; `customOnly: true` restricts to custom fields. | `[{ id, name, custom, schema }]` | > | `listCreateIssueTypes` | List issue types available when creating issues in a project. | `{ issueTypes: [{ id, name }] }` | > | `getCreateIssueFields` | Get fields available on the create screen for a `projectKeyOrId` + `issueTypeId`. | `{ fields: [{ fieldId, required, schema }] }` | > > ### Workflow > > | Instruction | Description | Returns | > | - | - | - | > | `getTransitions` | Get available status transitions for an `issueKey`. | `{ transitions: [{ id, name, to }] }` | > | `transitionIssue` | Change an issue's status by `issueKey` + `transitionId`, with an optional `comment`. | Empty (HTTP 204) | > | `addComment` | Add a comment to an issue by `issueKey`; `body` is the comment text. | `{ id, body, author, created }` | > | `addAttachment` | Attach a file to an issue by `issueKey`. | `[{ id, filename, size }]` | > > ### Projects > > | Instruction | Description | Returns | > | - | - | - | > | `listProjects` | List projects accessible to the configured account. | `[{ id, key, name }]` | > | `getProject` | Get a project's details by key or id. | `{ id, key, name, projectTypeKey }` | > > ### Configuration > > | Instruction | Description | Returns | > | - | - | - | > | `configureJira` | Store Jira credentials in the calling user's platform secrets (Cloud email + API token, or Data Center PAT). | `{ success, configuration: { baseUrl, type } }` | > > > [!NOTE] > > > > `Returns` shows the shape of the operation output. > > ## DSUL Examples > > **Search issues:** > > ```yaml theme={null} > - Jira.searchJira: > jql: "project = DEV AND status = 'In Progress'" > maxResults: 10 > output: results > ``` > > **Get issue details:** > > ```yaml theme={null} > - Jira.getIssue: > issueKey: DEV-123 > output: issue > ``` > > **Create an issue with a custom field:** > > Jira custom fields must already exist and be available for the target project and issue type. Resolve the technical field id with `listFields`, then pass values through `fields`. > > ```yaml theme={null} > - Jira.listFields: > query: testPrismeField > customOnly: true > output: fieldLookup > > - Jira.createIssue: > projectKey: KAN > issueType: Task > summary: Create issue with a custom labels field > fields: > customfield_10104: > - prisme-test > - label-type > output: newIssue > ``` > > If Jira rejects a custom field during creation, verify the field context and the create screen/layout. For team-managed projects the field must be added to the work-type layout; confirm availability with `listCreateIssueTypes` and `getCreateIssueFields` before creating. > > **Transition an issue and comment:** > > ```yaml theme={null} > - Jira.transitionIssue: > issueKey: DEV-123 > transitionId: "31" > comment: Moving to In Progress > output: result > ``` > > **Add a comment:** > > ```yaml theme={null} > - Jira.addComment: > issueKey: DEV-123 > body: "This issue has been reviewed." > output: comment > ``` *** ## Error Handling | HTTP Status | Error | Solution | | - | - | - | | 401 | Unauthorized | Verify the API token (Cloud) or PAT (Data Center) and the account email. | | 403 | Forbidden | Check the account's permissions on the target Jira project. | | 404 | Not Found | Verify the issue key, project key, or transition id exists and is visible to the account. | | 422 | Unprocessable | A field value is invalid or a required field is missing; resolve field ids with `listFields` / `getCreateIssueFields`. | | 429 | Rate Limited | Wait and retry. | | 500 | Server error | Transient Jira error; retry shortly. | ### Common Issues **"Not configured" / "Jira not configured"**: No base URL or credential is set. Open the Jira app configuration and provide the base URL, deployment type, and the matching credential (Cloud email + API token, or Data Center PAT). Agent builders should confirm with the workspace owner that the connector is configured. **"Missing credentials"**: The deployment type is set but the matching secret is empty: Cloud needs `email` + `apiToken`; Data Center needs `personalAccessToken`. Fill the missing field in the app configuration. **"Invalid type"**: `type` is neither `cloud` nor `datacenter`. Set it to one of those two values. **"The calling agent could not be identified"**: The MCP capability *Scope* does not declare `agent_id`. Set the Scope to `context_id,agent_id,user_id` on the capability. **Custom field rejected on create**: The field is not on the create screen for that project/issue type, or you used the wrong id. Resolve the id with `listFields` (`customOnly: true`), then confirm availability with `listCreateIssueTypes` and `getCreateIssueFields`. For team-managed projects, add the field to the work-type layout in Jira first. ## External Resources > [card] [Jira Cloud REST API](https://developer.atlassian.com/cloud/jira/platform/rest/v3/) > > Official API documentation for Jira Cloud. > [card] [Jira Data Center REST API](https://docs.atlassian.com/software/jira/docs/api/REST/latest/) > > Official API documentation for Jira Data Center. > [card] [Atlassian API Tokens](https://id.atlassian.com/manage-profile/security/api-tokens) > > Generate API tokens for Jira Cloud. > [card] [Tool Agents](/products/agent-factory/capabilities) > > Learn how Agent Creator agents consume MCP tools in Prisme.ai. # Knowledges Source: https://docs.prisme.ai/apps-store/marketplace/connectors/knowledges Create knowledge bases, ingest documents and web sources, and run semantic search from Agent Creator agents and Builder workflows ![Knowledges](https://mintcdn.com/prismeai/0oOaAiI-J3uUtnDD/images/connectors/knowledges.png?fit=max\&auto=format\&n=0oOaAiI-J3uUtnDD\&q=85\&s=290e90e0466a2aebe9db6996b41c82a6) The Knowledges app exposes the **Prisme.ai Knowledges API** (`/v1/knowledge_bases*`) — the RAG layer where documents and crawled web pages are chunked, embedded and searched. It can be consumed two ways: as a remote MCP server that **Agent Creator** agents call as tools, or as a Builder app whose instructions you call directly from DSUL. Unlike third-party connectors, **there is no credential to paste**: the connector runs in the installing workspace's app-instance context and forwards the caller's own Prisme.ai identity to the Knowledges backend, which applies that caller's permissions. An agent therefore sees exactly the knowledge bases its user is allowed to see. Three entity tools cover 20 operations: knowledge bases, their documents and their web crawl sources. > [card] Knowledge bases > > Create, list, update and delete knowledge bases; tune embedding model, chunking and parsing. > [card] Documents > > Attach files and URLs, follow indexing status, inspect chunks, reindex, resolve download links. > [card] Search & crawl > > Semantic search with tag filters, plus web crawl seeds with per-seed metrics and recrawl. ## Who is this for? This connector is used by three different roles. Jump to the section that matches yours; each one is self-contained. > [card] Agent builder > > You build agents in **Agent Creator** and want them to manage or search knowledge bases. → *Agent builder* tab. > [card] Platform admin > > You run the platform and want to publish Knowledges as a reusable capability. → *Platform admin setup* accordion below. > [card] Workspace builder > > You write Builder automations (DSUL) that manage knowledge bases directly. → *Workspace builder* tab. ## Prerequisites * A Prisme.ai account on the same instance as the workspace running the connector. **No API key, OAuth client or third-party account is required** — the connector calls the platform's own Knowledges backend. * Permission on the knowledge bases you intend to reach. Every call inherits the caller's own permissions: a user sees the knowledge bases they own or that were shared with them, and nothing else. * (Optional) A **service access token**, if you want the connector to act under a fixed identity instead of the caller's — for example an unattended automation that must always reach the same knowledge base. > [!NOTE] > > Knowledge bases created through this connector are the same objects you see in the **Knowledges** product UI. The connector adds automation and agent access on top of them; it does not create a separate store. > [!NOTE] > > Knowledges replaces the deprecated [Storage connector](/apps-store/marketplace/connectors/storage-client), which exposed the same knowledge bases under the older `vectorStores` naming. Two things live only on that older connector: per-knowledge-base **API keys** and **RBAC access bindings**, and **agent skills** plus admin diagnostics. Keep it installed if you need those; use Knowledges for everything else. > [accordion] Platform admin (Governance): one-time platform setup > > **Goal:** Knowledges needs **no platform-level credential**. There is no OAuth client to register and no shared secret to provision: the connector authenticates every call as the caller. The only platform task is to publish Knowledges as a reusable **capability** in AI Governance, so agent builders can enable it from the catalog instead of pasting a raw MCP endpoint. > > > [!NOTE] > > > > Each workspace that installs the app gets its own MCP endpoint and its own agent allowlist. A capability you declare here points at one workspace's endpoint; that workspace still decides which agents may call it. > > ## Declare the capability in AI Governance (optional) > > **1. Open AI Governance > Capabilities** > > Create (or edit) the **Knowledges** capability. > > **2. Point it at the MCP endpoint** > > Set the capability's MCP server URL to the connector's **MCP Endpoint** (the workspace running the connector), and set its **Scope** to: > > ```text theme={null} > context_id,agent_id,user_id,attachment_urls > ``` > > `agent_id` is what lets Agent Creator identify the calling agent, and `attachment_urls` passes the URLs of files the user uploaded in the chat so the agent can ingest them. > > **3. Make it available to agent builders** > > Once created, the capability appears in the capability picker for agent builders in your organization. Access to the catalog follows your organization's existing roles; there is no per-capability role grant for this connector. > > > [!WARNING] > > > > Declaring the capability makes the connector **available**; it does not authorize a specific agent. Per-agent gating is the **Authorized agents** allowlist in the connector's configuration app (see the *Agent builder* tab). There is no OAuth auth-config JSON to attach here, since authentication forwards the caller's own identity rather than a per-user OAuth token. *** > [tab] Agent builder (Agent Creator) > > ## Agent builder > > **Goal:** let an agent you build in Agent Creator create knowledge bases, ingest documents and search them through MCP tools. > > > [!NOTE] > > > > Before an agent can call the connector, a *Workspace builder* must have installed the Knowledges app in a workspace (see the *Workspace builder* tab). Optionally, a *Platform admin* may have published a Knowledges capability in AI Governance (see the *Platform admin setup* accordion above). > > No credential is pasted into the agent. The connector forwards the calling user's Prisme.ai identity to the Knowledges backend, which applies that user's permissions — so an agent can only reach knowledge bases its user is allowed to reach. > > **1. Install the connector in your workspace** > > Follow the *Workspace builder* tab: install **Knowledges** in your workspace. The default authentication mode needs no configuration. > > **2. Add the MCP capability to your agent** > > In your agent, add a capability pointing at your workspace's **MCP Endpoint** URL, and set its **Scope** to: > > ```text theme={null} > context_id,agent_id,user_id,attachment_urls > ``` > > `agent_id` lets Agent Creator identify the calling agent — without it the connector cannot tell which agent is calling and rejects the call. `attachment_urls` carries the URLs of files the user uploaded in the conversation, which the document tools can ingest directly. > > **3. Authorize the agent** > > Open the connector's **configuration app** from the app instance, go to **Authorized agents**, tick your agent and save — or enable **Allow all agents**. The **Install capability** button does both steps (declare the capability, allow the agent) in one click. > > **4. Brief the agent in its system prompt** > > Wiring the capability is not enough: the agent also needs to know the MCP exists and when to reach for it. Add a short paragraph to the agent's system prompt. Copy-pasteable starter: > > ```text theme={null} > You have access to the Knowledges MCP server through three tools — `knowledges` (knowledge bases), `documents` (their sources) and `webSources` (web crawl seeds) — each taking an `action` argument. Use `knowledges` with action `search` to answer questions from an existing knowledge base, `documents` with action `add` to ingest a file the user uploaded (pass its native_file_id) or a URL (source_url), and `documents` with action `get` to report indexing status. Always confirm with the user before `delete` on a knowledge base or a document. > ``` > > Refine the trigger keywords (knowledge base names, business domains, typical user phrasings) so the agent reliably picks up the right intent in your context. > > > [!NOTE] > > > > **Restricting to read-only (least privilege).** The connector never forces write permissions: it acts as the caller, so what an agent may do is exactly what its user may do on each knowledge base. To make an agent read-only, share the target knowledge bases with the calling users in a **read** role rather than as owners — write calls then fail with `403` while search keeps working (the connection itself stays healthy, since every check is a read). When the workspace uses the **service token** mode instead, back the token with an account that only holds read bindings. This is enforced by the Knowledges backend on every call, not by the connector, so it is a hard boundary rather than a declarative hint. > > > [!NOTE] > > > > **Legacy AI Knowledge agents** (no native MCP picker): add the connector under **Advanced > Tools > MCP** and paste the **MCP Endpoint** URL. Identity is still resolved server-side. > > ## Available Tools > > The MCP server exposes three entity-level tools, each dispatching across its actions through an `action` argument. > > ### `knowledges` > > | Action | Description | > | - | - | > | `list` | List knowledge bases. `scope` accepts `owned`, `shared`, `all`, `agents` (comma-separable); filter by `name` substring or `status`. | > | `create` | Create a knowledge base. Only `name` is required; `embedding`, `chunking_strategy`, `parser` and `provider` default to the platform settings. | > | `get` | Get a knowledge base by `knowledge_id`. Pass `include: "processing"` to probe live crawler status and metrics. | > | `update` | Update metadata (`name`, `description`, `chunking_strategy`, `parser`, `file_parsing`) and `crawl_settings`. | > | `delete` | Delete a knowledge base. Cascades to its documents and vectors; native platform files are preserved. | > | `search` | Semantic search. Hits carry `document_id`, which `documents.download` resolves into a link. | > > ### `documents` > > | Action | Description | > | - | - | > | `list` | List a knowledge base's documents; filter by `status`, `source_type`, `origin`, `web_source_id` or a `search` substring. | > | `add` | Attach a source: `source_url` (a URL to ingest) and/or `native_file_id` (an already-uploaded platform file). Idempotent — re-adding the same source refreshes it. | > | `get` | Get a document, including its indexing state (`status`, `last_error`, `indexed_at`). | > | `update` | Edit `tags`, `metadata`, `expires_at` or `filename`. Source fields are immutable. | > | `delete` | Detach the source and delete its vectors. The native file is never deleted. | > | `getChunks` | List the chunks produced for a document (paginated). | > | `reindex` | Re-run indexing on an existing document, optionally overriding `parser` or `chunking_strategy`. | > | `download` | Resolve a browser-usable URL: a short-lived link for uploads, the original `source_url` otherwise. | > > ### `webSources` > > | Action | Description | > | - | - | > | `list` | List the knowledge base's crawl seeds, each with its metrics, plus a knowledge-base-wide summary. | > | `add` | Register a crawl start URL. URL-idempotent: re-adding a known URL returns the existing seed. | > | `get` | Get a seed's configuration and metrics. | > | `update` | Update a seed's `crawler_options`. The URL is immutable. | > | `delete` | Delete a seed. Only pages attributed solely to it are removed. | > | `recrawl` | Trigger an immediate crawl of the seed. Returns `409` if a crawl is already running for the knowledge base. | > > > [!WARNING] > > > > Direct binary upload is not available over MCP. Upload the file to the platform first, then pass its `native_file_id` to `documents.add`. When the capability declares `attachment_urls`, files the user drops in the conversation are reachable as URLs and can be passed as `source_url`. > > ## Output Formats > > Every tool accepts an `outputFormat` argument that controls the MCP response shape: > > * **`verbose`** (default): human-readable text for LLM consumption. > * **`structured`**: machine-readable JSON in `structuredContent`. > * **`both`**: both text and structured content. > > ## Tool Details > > ### `knowledges` (action: `create`) > > ```json theme={null} > { > "name": "knowledges", > "arguments": { > "action": "create", > "name": "Product documentation", > "description": "Public docs and release notes", > "embedding": { "model": "text-embedding-3-small", "dimensions": 1536 }, > "chunking_strategy": { "type": "static", "max_chunk_size_tokens": 1500, "chunk_overlap_tokens": 200 } > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | Must be `create`. | > | `name` | Yes | Display name of the knowledge base. | > | `description` | No | Free-text description. | > | `embedding` | No | Object `{ model, dimensions }`. Defaults to the platform's embedding settings. | > | `dimensions` | No | Shorthand for `embedding.dimensions`. | > | `chunking_strategy` | No | `{ type: "auto" }` (default) or `{ type: "static", max_chunk_size_tokens, chunk_overlap_tokens }`. | > | `parser` | No | Parsing backend override: `tika`, `tika-ocr`, `unstructured`, `unstructured-ocr`, `llm`. | > | `provider` | No | Vector index backend. Defaults to the platform setting. | > > ### `knowledges` (action: `search`) > > ```json theme={null} > { > "name": "knowledges", > "arguments": { > "action": "search", > "knowledge_id": "vs_81c2e3ae9d3c4d9989e3c06b95f01a3f", > "query": "What is the retention policy for exports?", > "limit": 8, > "min_score": 0.35, > "filter": { "op": "eq", "field": "tags.department", "value": "legal" } > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | Must be `search`. | > | `knowledge_id` | Yes | The knowledge base to search. | > | `query` | Yes | Natural-language query (max 2048 characters). | > | `limit` | No | Maximum number of hits. | > | `min_score` | No | Score threshold below which hits are dropped. | > | `filter` | No | Structured filter AST over `tags.*` fields: a leaf `{ op, field, value }` (`op` = `eq`, `ne`, `in`, `nin`, `gt`, `gte`, `lt`, `lte`) composed with `{ and: [...] }`, `{ or: [...] }`, `{ not: {...} }`. | > | `scope` | No | `knowledge` (default) or `conversation`. | > > ### `documents` (action: `add`) > > ```json theme={null} > { > "name": "documents", > "arguments": { > "action": "add", > "knowledge_id": "vs_81c2e3ae9d3c4d9989e3c06b95f01a3f", > "source_url": "https://docs.example.com/handbook.pdf", > "filename": "handbook.pdf", > "tags": { "department": "hr", "year": "2026" } > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | Must be `add`. | > | `knowledge_id` | Yes | Target knowledge base. | > | `source_url` | No\* | Stable URL to ingest. Also the dedup key for non-native sources. | > | `native_file_id` | No\* | Id of a file already uploaded to the platform. | > | `filename` | No | Display name of the document. | > | `mime_type` | No | Content type hint for the ingested URL. | > | `tags` | No | Key/value **object** (not an array), used later as search filters. | > | `metadata` | No | Free-form key/value object. | > | `expires_at` | No | Unix seconds or ISO date after which the document is dropped. | > > > [!NOTE] > > > > \* At least one of `source_url` / `native_file_id` is required. Adding a source that already exists returns `200` with the same document id and reschedules indexing, so re-running an ingestion never creates duplicates. > > ### `documents` (action: `get`) > > ```json theme={null} > { > "name": "documents", > "arguments": { > "action": "get", > "knowledge_id": "vs_81c2e3ae9d3c4d9989e3c06b95f01a3f", > "document_id": "vsf_6b19d0f0a3f2417ea6c9a1a4b7a2c8de" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | Must be `get`. | > | `knowledge_id` | Yes | Knowledge base the document belongs to. | > | `document_id` | Yes | The document id returned by `add` / `list`. | > > Returns the document with its indexing state: `status` (`queued`, `in_progress`, `completed`, `failed`, `fetch_expired`, `rejected`), `last_error` and `indexed_at`. This is the call to make when a user asks "is my file ready?". > > ### `webSources` (action: `add`) > > ```json theme={null} > { > "name": "webSources", > "arguments": { > "action": "add", > "knowledge_id": "vs_81c2e3ae9d3c4d9989e3c06b95f01a3f", > "url": "https://docs.example.com/" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | Must be `add`. | > | `knowledge_id` | Yes | Knowledge base that owns the crawl. | > | `url` | Yes | Crawl start URL. Immutable once created, and SSRF-validated. | > | `crawler_options` | No | Advanced per-seed crawler tuning. | > > > [!WARNING] > > > > Crawl volume and scheduling (`webpages_limit`, `periodicity`, `paused`) are **not** per-seed: there is one crawler per knowledge base, configured through `knowledges` action `update` with a `crawl_settings` object. Adding a seed to a paused knowledge base does not resume the crawler. > [tab] Workspace builder (DSUL) > > ## Workspace builder > > **Goal:** install the connector in a workspace, pick an authentication mode, and call knowledge-base operations from your automations. > > ## Installation > > 1. Go to **Apps** in your workspace > 2. Search for **Knowledges** and install it > 3. Open the app instance configuration — the default mode works with no further input > > ## Configuration > > | Field | Description | > | - | - | > | **Configuration app** | Opens the connector's configuration app: authentication mode, authorized agents, capability install. | > | **MCP Endpoint** | Auto-populated on install: URL of the MCP endpoint for this instance. | > > Everything else is driven from the configuration app. Pick one of the two authentication modes: > > | Auth mode | What you provide | Best for | > | - | - | - | > | **Caller identity** (default) | Nothing | Agents and automations that should see exactly what their user sees. Permissions are enforced per call by the Knowledges backend. | > | **Service token** | A Prisme.ai **access token** | Unattended flows (crons, webhooks triggered by anonymous callers) that must always act under one fixed identity, regardless of who triggered them. | > > > [!NOTE] > > > > In caller-identity mode the connector sends no credential of its own: the platform forwards the caller's user and workspace identity on cross-workspace calls, and the Knowledges backend authorizes from there. A cron or an anonymous webhook has no user to forward — that is when the service-token mode is needed. > > ## Available Instructions > > Every instruction resolves authentication from the workspace configuration and targets the Knowledges API of the current environment. > > ### Knowledge bases > > | Instruction | Description | Returns | > | - | - | - | > | `listKnowledges` | List knowledge bases; `scope` = `owned,shared,all,agents`, plus `name`, `status`, `limit`, `page`. | `{ data: [KnowledgeBase], total, page, limit }` | > | `createKnowledge` | Create a knowledge base by `name`; optional `embedding`, `chunking_strategy`, `parser`, `provider`, `expires_after`. | `KnowledgeBase` (HTTP 201, `status: active`) | > | `getKnowledge` | Get one by `knowledge_id`; `include: "processing"` probes live crawler status and metrics. | `KnowledgeBase` | > | `updateKnowledge` | Update `name`, `description`, `chunking_strategy`, `parser`, `file_parsing` and `crawl_settings`. | `KnowledgeBase` | > | `deleteKnowledge` | Delete by `knowledge_id`; cascades documents, vectors and bindings (native files preserved). | `{ status: "deleting" }` (HTTP 202) | > | `searchKnowledge` | Semantic search by `query`; optional `limit`, `min_score`, `filter` AST, `scope`, `conversation_id`. | `{ data: [{ document_id, score, content, tags }] }` | > > ### Documents > > | Instruction | Description | Returns | > | - | - | - | > | `listDocuments` | List a knowledge base's documents; filters `status`, `source_type`, `origin`, `web_source_id`, `search`, `scope`, `conversation_id`. | `{ data: [Document], total, page, limit }` | > | `addDocument` | Attach `source_url` and/or `native_file_id`; optional `filename`, `mime_type`, `tags`, `metadata`, `expires_at`, `chunking_strategy`. | `Document` (201 new, 200 refreshed) | > | `getDocument` | Get a document by `document_id`, with `status`, `last_error`, `indexed_at`. | `Document` | > | `updateDocument` | Edit `tags`, `metadata`, `expires_at`, `filename`. | `Document` | > | `deleteDocument` | Detach the source and delete its vectors; the native file survives. | Empty (HTTP 204) | > | `getDocumentChunks` | List the document's chunks; `limit` defaults to 50, capped at 100. | `{ data: [{ id, content, position }], total, page, limit }` | > | `reindexDocument` | Re-index an existing document; optional `parser`, `chunking_strategy`, `reason`. | `Document` | > | `getDocumentSourceUrl` | Resolve a download URL: short-lived share link for uploads, `source_url` as-is otherwise. | `{ url, expires_at }` | > > ### Web sources > > | Instruction | Description | Returns | > | - | - | - | > | `listWebSources` | List crawl seeds with per-seed metrics, plus a knowledge-base-wide `summary`. | `{ data: [WebSource], summary, total, page, limit }` | > | `addWebSource` | Register a crawl start `url` (SSRF-validated, idempotent); optional `crawler_options`. | `WebSource` | > | `getWebSource` | Get a seed by `seed_id`, with its configuration and metrics. | `WebSource` | > | `updateWebSource` | Update `crawler_options`. The `url` is immutable. | `WebSource` | > | `deleteWebSource` | Delete a seed; only pages attributed solely to it are removed. | Empty (HTTP 204) | > | `recrawlWebSource` | Trigger an immediate crawl of the seed. | `WebSource` (HTTP 202, `metrics.last_run_status: running`) | > > ## DSUL Examples > > ### Search a knowledge base and keep the best hits > > ```yaml theme={null} > - Knowledges.searchKnowledge: > knowledge_id: '{{config.knowledgeId}}' > query: '{{body.question}}' > limit: 8 > min_score: 0.3 > output: hits > ``` > > ### Ingest a document and tag it > > ```yaml theme={null} > - Knowledges.addDocument: > knowledge_id: '{{config.knowledgeId}}' > source_url: '{{document.url}}' > filename: '{{document.name}}' > tags: > department: '{{document.department}}' > year: '{{run.year}}' > output: created > ``` > > ### Poll a document until indexing completes > > ```yaml theme={null} > - repeat: > until: 10 > do: > - Knowledges.getDocument: > knowledge_id: '{{config.knowledgeId}}' > document_id: '{{created.id}}' > output: doc > - conditions: > '{{doc.status}} == "completed"': > - break: > scope: all > - wait: > timeout: 5 > ``` > > ### Register a crawl seed and cap the crawl > > ```yaml theme={null} > - Knowledges.addWebSource: > knowledge_id: '{{config.knowledgeId}}' > url: 'https://docs.example.com/' > output: seed > - Knowledges.updateKnowledge: > knowledge_id: '{{config.knowledgeId}}' > crawl_settings: > webpages_limit: 500 > periodicity: weekly > ``` > > ### Rebuild a document with a different parser > > ```yaml theme={null} > - Knowledges.reindexDocument: > knowledge_id: '{{config.knowledgeId}}' > document_id: '{{doc.id}}' > parser: 'unstructured-ocr' > reason: 'scanned PDF, OCR required' > ``` *** ## Security The answers that hold for every connector (agent access, shared knowledge bases, credentials, models, egress) are on [Connector security](/apps-store/marketplace/connectors/security). This section lists what is specific to Knowledges. | Topic | Knowledges | | - | - | | Authentication family | Platform only: the connector forwards the caller's Prisme.ai identity, and the Knowledges backend applies that user's permissions. There is no third-party provider. | | Production modes | **Caller identity** (default) | | Modes to avoid in production | **Service token** when each user's permissions must apply: every caller then acts with the identity of the token. Keep it for unattended flows (crons, anonymous webhooks), with an account that holds only the bindings these flows need. | | Read-only scopes | Not applicable: there are no provider scopes. Read-only access comes from sharing the knowledge bases with users in a read role. | | Agent allowlist | Yes (empty at installation). Knowledges has no global endpoint. | | Per-reader access control on knowledge bases | Not applicable: this connector does not feed knowledge bases. It reads and searches existing ones with the caller's own permissions. | | Outbound hosts | The Prisme.ai API of your platform only (the `storage` workspace webhooks). An administrator can override this base URL in the connector configuration. | | Audit events | None specific to this connector | An agent can create, update and delete knowledge bases, documents and crawl sources on behalf of its user. To keep an agent read-only, share the target knowledge bases with its users in a read role rather than as owners. *** ## Error Handling The Knowledges API uses standard HTTP status codes. | HTTP Status | Meaning | Typical Cause | | - | - | - | | `400` | Bad Request | Missing `action`, unknown action for the entity, malformed `filter` AST, `tags` sent as an array instead of an object. | | `401` | Unauthorized | No identity could be forwarded (anonymous or cron caller) and no service token is configured. | | `403` | Forbidden | The caller has no permission on this knowledge base, or only a read binding on a write call. | | `404` | Not Found | Unknown `knowledge_id`, `document_id` or `seed_id` — or a `native_file_id` that does not exist. | | `409` | Conflict | `webSources` action `recrawl` while a crawl is already running for this knowledge base. | | `413` | Payload Too Large | The ingested source exceeds the platform's document size limit. | | `429` | Rate Limited | Too many indexing or search calls in a short window. | | `500` / `503` | Server Error | Transient backend or indexing-pipeline error. Retry with exponential backoff. | ### Common Issues **"This agent is not authorized to use this connector"**: the calling agent is not in the connector's allowlist. Open the configuration app → **Authorized agents**, tick the agent and save, or enable **Allow all agents**. The **Install capability** button does this for you. **"The calling agent could not be identified"**: the MCP capability does not inject the agent id. Set its **Scope** to `context_id,agent_id,user_id,attachment_urls` and retry. **`401` from a cron or a webhook**: scheduled runs and anonymous webhooks carry no user identity to forward. Switch the app instance to the **service token** mode so the connector acts under a fixed identity. **A search returns nothing while the UI shows documents**: check the documents' `status` with `documents.get`. Sources still `queued` or `in_progress` are not searchable yet, and a `failed` document reports why in `last_error`. **A filter matches nothing**: only `tags.*` fields are filterable, the match is exact, and tags must have been set as a key/value **object** at ingestion time (`{"department": "hr"}`, not `["hr"]`). **Re-adding a file creates no new document**: this is intended. `documents.add` is an idempotent upsert on the source key — the same `source_url` or native file returns the existing document id and reschedules indexing. **Deleting a document leaves the file in place**: also intended. `documents.delete` detaches the source and drops its vectors; the native platform file is never deleted by the connector. ## External Resources > [card] [Knowledges](/products/ai-knowledge/overview) > > How knowledge bases, ingestion and RAG work in the Knowledges product. > [card] [Tool Agents](/products/agent-factory/capabilities) > > Learn how Agent Creator agents consume MCP tools in Prisme.ai. # Microsoft Teams Source: https://docs.prisme.ai/apps-store/marketplace/connectors/microsoft-teams Teams, channels, chats, messages and online meetings from Agent Factory agents and Builder workflows, plus an inbound Teams bot, via Microsoft Graph with per-user Microsoft Entra OAuth ![Microsoft Teams](https://mintcdn.com/prismeai/fsgYuEVH_4FwcGGE/images/connectors/microsoft-teams.png?fit=max\&auto=format\&n=fsgYuEVH_4FwcGGE\&q=85\&s=521de0c1109cfffd5b3ba601a0ff0a92) The Microsoft Teams app provides read/write access to Microsoft Teams through the [Microsoft Graph](https://learn.microsoft.com/en-us/graph/overview) REST API (v1.0): teams and channels, channel messages and their reply threads, one-to-one and group chats, and online meetings with their transcripts, recordings and attendance reports. It can be consumed three ways: as a remote MCP server that **Agent Factory** agents call as tools, as a Builder app whose instructions you call directly from DSUL, and as a **chat connector** — an inbound Teams bot that hands each incoming message to your own automation. The MCP surface groups every operation into **four entity tools** (`teams`, `channelMessages`, `chats`, `meetings`), each driven by an `action` argument, and runs in the **tenant app-instance context** (it resolves the installing workspace's own credentials). Authentication is per-user and supports several modes: * **Per-user OAuth2 (central client)** (`oauthCentral`, recommended): one Microsoft Entra OAuth Application is registered once by the platform maintainer; every end user signs in with their own Microsoft account. Nothing to register per tenant: each workspace just installs the app and clicks *Connect*. * **Per-user OAuth2 (tenant client)** (`oauth`): paste your own Entra application (client) ID/secret in the connector config app. Each user signs in with their own account against your client (PKCE authorization-code flow). * **Application (client credentials)** (`clientCredentials`): an Entra app with **application** Graph permissions and admin consent, acting without an interactive sign-in. Best for back-office / service automations and content indexing. * **Direct access token** (`accessToken`): a caller-managed Microsoft Graph access token, used as-is with no exchange. > [card] Conversations > > Browse joined teams and channels, read channel messages and their reply threads, read and post one-to-one and group chats, and inspect team, channel and chat rosters > [card] Meetings & transcripts > > Find meetings through the calendar, resolve a join URL into a meeting, schedule and update meetings, and read transcripts, recordings metadata and attendance reports > [card] Chat connector > > Register a Teams bot whose messages are signature-verified and handed to your automation, so people can talk to an agent from a Teams conversation ## Who is this for? This connector is used by three different roles. Jump to the section that matches yours; each one is self-contained. > [card] Agent builder > > You build agents in **Agent Factory** and want them to read Teams conversations and meeting transcripts. → *Agent builder* tab. > [card] Platform admin > > You run the platform and set up the shared Microsoft Entra OAuth client once for everyone. → *Platform admin setup* accordion below. > [card] Workspace builder > > You write Builder automations (DSUL) that call Teams operations, or run the inbound bot. → *Workspace builder* and *Chat connector* tabs. ## Prerequisites (Microsoft side) * A **Microsoft 365** tenant with Teams, and an **Azure / Microsoft Entra ID** tenant where you can register an application (or a maintainer who already did). * An **app registration** in [Microsoft Entra ID](https://entra.microsoft.com) (Azure portal → **App registrations**), with a **client secret** created under **Certificates & secrets**. * **Microsoft Graph delegated permissions** granted on the app (for the per-user OAuth modes), covering the resources you intend to use: * Teams & channels: `Team.ReadBasic.All`, `Channel.ReadBasic.All`, `TeamMember.Read.All` * Channel messages: `ChannelMessage.Read.All` (add `ChannelMessage.Send` to post) * Chats: `Chat.Read`, `ChatMessage.Read` (or `Chat.ReadWrite` + `ChatMessage.Send` to post) * Meetings: `Calendars.Read` (meeting discovery goes through the calendar), `OnlineMeetings.Read` (or `OnlineMeetings.ReadWrite`), `OnlineMeetingTranscript.Read.All`, `OnlineMeetingArtifact.Read.All` * Sign-in / identity: `openid`, `profile`, `offline_access`, `User.Read` * For the **application (client-credentials)** mode instead, grant the equivalent **application** permissions and have a Global Administrator grant admin consent. Reading channel messages with application permissions additionally requires Microsoft's [protected API approval](https://learn.microsoft.com/en-us/graph/teams-protected-apis). * For the **chat connector** only: an **Azure Bot** resource with the Microsoft Teams channel enabled (see the *Chat connector* tab). The OAuth scopes requested by the read-only preset are: ```text theme={null} offline_access https://graph.microsoft.com/User.Read https://graph.microsoft.com/Team.ReadBasic.All https://graph.microsoft.com/Channel.ReadBasic.All https://graph.microsoft.com/TeamMember.Read.All https://graph.microsoft.com/ChannelMessage.Read.All https://graph.microsoft.com/Chat.Read https://graph.microsoft.com/ChatMessage.Read https://graph.microsoft.com/Calendars.Read https://graph.microsoft.com/OnlineMeetings.Read https://graph.microsoft.com/OnlineMeetingTranscript.Read.All https://graph.microsoft.com/OnlineMeetingArtifact.Read.All ``` > [accordion] Platform admin (Governance): one-time platform setup > > **Goal:** two one-time tasks: (1) configure the shared **central Microsoft Entra OAuth client** so every workspace lets its users sign in with their own Microsoft account, and (2) expose Microsoft Teams as a reusable **capability** in AI Governance so agent builders can pick it without pasting endpoint URLs. > > ## 1. Configure the connector > > **1. Register the OAuth Application in Microsoft Entra ID** > > In [Microsoft Entra ID](https://entra.microsoft.com) → **App registrations > New registration**, register a **Web** application. Add a **Redirect URI** pointing at the core workspace callback: > > ```text theme={null} > /workspaces//webhooks/oauthCallback > ``` > > > [!WARNING] > > > > Microsoft Entra rejects redirect URIs that contain a colon in the path, so use the **raw workspace id** of the core Microsoft Teams workspace, **not** the `slug:microsoft-teams-next` form used by other connectors. Copy the exact URI from the connector's configuration app, which renders it for you. > > Add the Microsoft Graph **delegated** permissions listed in *Prerequisites*, create a **client secret** under **Certificates & secrets**, and note the **Application (client) ID**, the **secret value**, and the **Directory (tenant) ID** (or use `common` / `organizations` for multi-tenant). > > **2. Enter the credentials through the configuration app** > > Open the central `microsoft-teams-next` workspace and launch its **Configuration app**: `/apps/microsoft-teams-next`, also linked as `Configuration app` on the installed instance. Switch to the maintainer view and follow the in-app instructions to paste the **Client ID**, **Client Secret**, **Tenant** and (optionally) scopes; the app stores them in the core workspace's secrets for you. Do not edit Studio's raw Secrets by hand. These credentials stay in the `microsoft-teams-next` workspace and are never exposed to tenants or end users; token exchange is proxied through the core `centralTokenExchange` webhook so the client secret never leaves the core workspace. > > **3. Tell workspaces to use the central client** > > Each consuming workspace selects auth mode **`oauthCentral`** in the connector configuration app (no client id/secret to enter on their side). Their users then just click **Connect**. > > ## 2. Declare the capability in AI Governance > > Generic connectors (broad tool surfaces meant to be shared across many agents, like Microsoft Teams) are best exposed as a named **capability** in AI Governance. Agent builders then enable that capability on their agents instead of pasting a raw MCP endpoint. > > **1. Open AI Governance > Capabilities** > > Create (or edit) the **Microsoft Teams** capability. > > **2. Point it at the MCP endpoint** > > Set the capability's MCP server URL to the connector's **MCP Endpoint**, and set its **Scope** to: > > ```text theme={null} > context_id,agent_id,user_id > ``` > > The `agent_id` in the scope is what lets the connector identify and authorize the calling agent. > > **3. Make it available to agent builders** > > Once created, the capability appears in the capability picker for agent builders in your organization, who enable it on their agents. Access to the catalog follows your organization's existing roles; there is no per-capability role grant. > > **4. Smoke-test** > > From an agent that has the capability, in a workspace configured for `oauthCentral`, trigger any tool. The user is prompted to connect once (Microsoft sign-in); subsequent calls reuse the stored token transparently and refresh it automatically. > > > [!NOTE] > > > > The connector's configuration app also offers a one-click **Add to catalog** button (workspace owner / admin only) that publishes the Microsoft Teams capability to the organization-wide Capabilities catalog for you, the easiest way to expose it to agent builders without hand-editing Governance. > > > [!WARNING] > > > > Declaring the capability makes the connector **available**; it does not by itself authorize a specific agent. This connector follows the **tenant-context model**: which agents may actually call it is gated per-workspace by the **authorized-agents allowlist** in the configuration app (see the *Workspace builder* tab). Agents show a **Connect** button only if the catalog entry carries the connector's connect / status / disconnect webhooks in its `auth` block. The configuration app's **Add to catalog** button writes it for you. If you create the entry by hand, paste that block into **Auth Configuration**: the platform adds it later on its own only for a workspace endpoint (ending in `.mcp`), never for the connector's global `/webhooks/mcp` endpoint. *** > [tab] Agent builder (Agent Factory) > > ## Agent builder > > **Goal:** let an agent you build in Agent Factory read Teams conversations, post messages, and pull meeting transcripts through MCP tools. > > > [!NOTE] > > > > Before an agent can call the connector, a *Workspace builder* must have installed and configured the Microsoft Teams app in a workspace (see the *Workspace builder* tab), and, for the central OAuth mode, a *Platform admin* must have provisioned the shared Microsoft Entra OAuth client (see the *Platform admin setup* accordion above). > > This connector runs in the **tenant app-instance context**: your agent is authorized two ways at once: it is identified by the `agent_id` that Agent Factory injects through the capability *Scope*, and that agent must appear in the connector's **authorized-agents allowlist** (managed in the configuration app). The Microsoft Graph access token itself is resolved server-side from the configured auth mode. > > There are two ways to wire it up. Pick based on how much isolation you need. > > ## Option A: Enable the shared capability from the catalog > > The fastest path: a *Platform admin* has already published a **Microsoft Teams** capability (see the *Platform admin setup* accordion above, §2), so you just pick it from the catalog. A workspace owner can publish it in one click with the config app's **Add to catalog** button. > > **1. Open your agent in Agent Factory** > > Open the agent you want to extend and go to its capabilities / tools. > > **2. Add the Microsoft Teams capability** > > Browse the capability catalog, select **Microsoft Teams**, and enable it. The MCP endpoint URL and the *Scope* (`context_id,agent_id,user_id`) are already wired by the admin: nothing to paste, and the shared instance accepts every agent, so there is no allowlist step on your side. > > **3. Connect a Microsoft account (OAuth modes)** > > On the first tool call, an unconnected user is prompted to sign in; Agent Factory surfaces a `connect_url`. Application (`clientCredentials`) and `accessToken` modes need no per-user sign-in. > > > [!NOTE] > > > > Convenient, but your agent runs against a **shared, platform-managed instance**: its Microsoft credentials are owned by someone else and the instance accepts every agent that is granted the capability. Prefer Option B for anything beyond quick experiments. > > ## Option B: Run it from your own workspace (recommended) > > For production agents, install the connector in **your own workspace** and point the agent at *that* workspace's MCP endpoint. > > > [!WARNING] > > > > **Prefer this mode for security.** Because the MCP runs in *your* app-instance context, the Microsoft credentials, the per-user OAuth tokens and the authorized-agents allowlist are all **scoped to your workspace**, not shared platform-wide. You decide exactly which agents may call it and which Microsoft account / auth mode backs them, and a misconfiguration elsewhere can never expose your Teams conversations. The shared catalog capability (Option A) is a broad surface many agents can reach; your own workspace is an isolated, least-privilege boundary. > > **1. Install and configure the connector in your workspace** > > Follow the *Workspace builder* tab: install **Microsoft Teams** in your workspace, open its **Configuration app**, choose the auth mode and connect a Microsoft account. > > **2. Allowlist your agent** > > In that workspace's config app, open **Authorized agents** and tick your agent (the **Install capability** button does this for you). > > **3. Add the MCP capability to your agent** > > In your agent, add a capability pointing at **your workspace's MCP Endpoint** URL, and set its **Scope** to: > > ```text theme={null} > context_id,agent_id,user_id > ``` > > The `agent_id` is what lets the connector identify and authorize your agent; without it, every call is rejected with an explicit "agent could not be identified" message. This *Scope* is separate from the Microsoft Graph OAuth scopes. > > **4. Connect a Microsoft account (OAuth modes)** > > On the first tool call, the user is prompted to sign in (or uses **Connect** in the config app). > > ## Brief the agent in its system prompt > > Whichever option you pick, wiring the capability is not enough: the agent must know the MCP exists and when to use it. Copy-pasteable starter: > > ```text theme={null} > You have access to the Microsoft Teams MCP server (tools: teams, channelMessages, chats, meetings). Each tool takes an `action` argument. Use it whenever the user asks about Teams teams or channels, channel discussions, chats, or meetings and their transcripts. Resolve ids before reading content: use `teams` (action list, then listChannels) to get teamId and channelId, then `channelMessages`. A channel conversation is two levels deep: `list` returns the thread starters and `listReplies` returns the body of a discussion, so read both before summarizing a thread. To reach a meeting transcript, call `meetings` action list (this reads the calendar, since Graph has no "list my meetings"), then `resolve` on the joinUrl to get a meetingId, then listTranscripts and getTranscript. Prefer calling a tool over guessing, and confirm with the user before posting anything (send, reply) or creating or updating a meeting. > ``` > > > [!NOTE] > > > > **Legacy AI Knowledge agents** (no native MCP picker): add the connector under **Advanced > Tools > MCP** and paste the **MCP Endpoint** URL. The agent still has to be allowlisted in the config app and its identity propagated so the connector can read its `agent_id`. > > > [!NOTE] > > > > **Restricting to read-only (least privilege).** The Teams tools cover both reads and writes (posting a channel message, replying, sending a chat message, creating or updating a meeting). The connector requests exactly the scopes configured in the **Scopes** field of the configuration app, which offers a **read-only preset**; writes are only possible if you widen it. To keep the connector read-only, use the read preset listed in *Prerequisites* — in particular leave out `ChannelMessage.Send`, `Chat.ReadWrite`, `ChatMessage.Send` and `OnlineMeetings.ReadWrite`. Any write attempt is then rejected by Microsoft Graph with `403 Forbidden`, while the connection itself stays healthy because every connection check is a read. > > > > With the central client (`oauthCentral`) you do not create your own Entra app: you keep `oauthCentral` and simply enter the read-only scopes, which override the central default — provided the platform's central app exposes those read permissions. The scope list is set at the workspace level (a workspace editor can widen it again); for a hard guarantee, back the connection with an Entra app limited to read permissions. > > ## Available Tools > > Each tool takes an `action` argument selecting the concrete operation, plus the per-action parameters. > > | Tool | Description | > | - | - | > | `teams` | Teams the user belongs to, their channels and their rosters. Actions: `list`, `get`, `listChannels`, `getChannel`, `listMembers`, `listChannelMembers`. | > | `channelMessages` | Messages posted in a channel and their replies. A channel conversation is two levels deep: `list` returns thread starters, `listReplies` the body of a discussion. Actions: `list`, `get`, `listReplies`, `getReply`, `send`, `reply`. | > | `chats` | One-to-one and group conversations, outside any channel. A chat is flat: there are no replies. Actions: `list`, `get`, `listMessages`, `getMessage`, `send`, `listMembers`. | > | `meetings` | Online meetings: discovery, scheduling, transcripts, recordings, attendance. Actions: `list`, `resolve`, `get`, `create`, `update`, `listTranscripts`, `getTranscript`, `listRecordings`, `listAttendanceReports`, `getAttendanceReport`. | > > > [!NOTE] > > > > **Two Graph behaviours worth knowing before you prompt an agent.** A meeting is discovered through the **calendar**: Graph has no "list my online meetings" collection, so `meetings` `list` reads calendar events and `resolve` turns a `joinUrl` into the `meetingId` every other action needs. And a **transcript is WebVTT text**, not JSON: `getTranscript` returns speaker-tagged plain text, truncated on a line boundary (`maxTranscriptCharacters`, 20000 by default) so a long meeting cannot exhaust the agent's context window. > > ## Output Formats > > Every tool accepts an `outputFormat` argument that controls the MCP response shape: > > * **`verbose`** (default): a human-readable text view, optimized for LLM consumption. > * **`structured`**: concise machine-readable JSON in `structuredContent`. > * **`both`**: the structured payload, with its JSON also rendered as text. > > ## Knowledge Resources > > The connector also exposes Teams conversations as **MCP Resources**, so a knowledge base can index them. The tree is flattened to the discussion: a **team** and a **channel** are containers, and a **thread** — a root message plus its replies — is the document. Each thread's revision folds in the timestamp of the newest reply and the reply count, because the root message's own `lastModifiedDateTime` does not move when someone answers; without that, an answered question would never be re-indexed. Access is checked per reader, at that reader's own identity. > > Channel **files** are not indexed here: they live in the team's SharePoint site and belong to the SharePoint connector. > > ## Tool Details > > ### teams > > ```json theme={null} > { > "name": "teams", > "arguments": { > "action": "listChannels", > "teamId": "19:abc...@thread.tacv2" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | One of `list`, `get`, `listChannels`, `getChannel`, `listMembers`, `listChannelMembers`. | > | `teamId` | For every action except `list` | Team id. | > | `channelId` | For getChannel/listChannelMembers | Channel id. | > | `userId` | No (list only) | Target user; omit for the signed-in user. | > | `top` / `select` / `filter` / `skiptoken` | No | OData query options and pagination (`top` 1..100, default 20). | > > > [!NOTE] > > > > `list` accepts no OData query option: Microsoft Graph answers `400 Query option 'Top' is not allowed` on `joinedTeams` rather than ignoring it. It returns every team the identity belongs to in one response, so there is nothing to page. > > ### channelMessages > > ```json theme={null} > { > "name": "channelMessages", > "arguments": { > "action": "listReplies", > "teamId": "19:abc...@thread.tacv2", > "channelId": "19:def...@thread.tacv2", > "messageId": "1700000000000" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | One of `list`, `get`, `listReplies`, `getReply`, `send`, `reply`. | > | `teamId` | Yes | Team id. | > | `channelId` | Yes | Channel id. | > | `messageId` | For get/listReplies/getReply/reply | Root message id. | > | `replyId` | For getReply | Reply id. | > | `top` / `select` / `expand` / `skiptoken` | No | OData query options; `top` is clamped to 1..50 by Graph on channel messages. `expand=replies` inlines a whole thread in one call. | > | `body` | For send/reply | A chatMessage resource, e.g. `{ body: { contentType: 'html', content: '...' } }`. | > > ### chats > > ```json theme={null} > { > "name": "chats", > "arguments": { > "action": "listMessages", > "chatId": "19:abc...@unq.gbl.spaces", > "top": 20 > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | One of `list`, `get`, `listMessages`, `getMessage`, `send`, `listMembers`. | > | `chatId` | For every action except `list` | Chat id. | > | `messageId` | For getMessage | Message id. | > | `userId` | No (list only) | Target user; omit for the signed-in user. | > | `top` / `select` / `expand` / `filter` / `orderby` / `skiptoken` | No | OData query options; `top` is clamped to 1..50 by Graph on chat messages. | > | `body` | For send | A chatMessage resource, e.g. `{ body: { contentType: 'text', content: '...' } }`. | > > > [!NOTE] > > > > Chats are private conversations: everything here is read at the connected user's own identity, and a chat they have left is no longer readable. > > ### meetings > > ```json theme={null} > { > "name": "meetings", > "arguments": { > "action": "resolve", > "joinUrl": "https://teams.microsoft.com/l/meetup-join/19%3ameeting_..." > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | One of `list`, `resolve`, `get`, `create`, `update`, `listTranscripts`, `getTranscript`, `listRecordings`, `listAttendanceReports`, `getAttendanceReport`. | > | `meetingId` | For every action except list/resolve/create | Online meeting id; obtain it with `resolve`. | > | `joinUrl` | For resolve | The meeting join URL, as returned by `list`. | > | `transcriptId` | For getTranscript | Transcript id, from `listTranscripts`. | > | `reportId` | For getAttendanceReport | Attendance report id. | > | `from` / `to` | No (list only) | ISO 8601 window bounds, e.g. `2026-01-01T00:00:00Z`. | > | `userId` | No | Target user; omit for the signed-in user. Application-mode calls must set it, since there is no `me` without a signed-in user. | > | `maxTranscriptCharacters` | No (getTranscript only) | Truncate the WebVTT beyond this many characters; default 20000, clamped 2000..120000. | > | `body` | For create/update | An onlineMeeting resource, e.g. `{ startDateTime, endDateTime, subject }`. | > > The usual chain is `list` → `resolve(joinUrl)` → `listTranscripts` → `getTranscript`. > [tab] Workspace builder (DSUL) > > ## Workspace builder > > **Goal:** install the connector in a workspace, configure authentication and the agent allowlist, and call Teams operations from your automations. > > ## Installation > > 1. Go to **Apps** in your workspace > 2. Search for **Microsoft Teams** and install it > 3. Open the **Configuration app** (the link auto-populated on install) to choose the auth mode, provide credentials, connect, and allow the agents that may call the connector > > ## Configuration > > | Field | Description | > | - | - | > | **Configuration app** | Auto-populated on install; open this link to configure authentication (mode + credentials), connect a Microsoft account (OAuth modes), manage the authorized-agents allowlist, and register the Teams bot. | > | **Microsoft Graph API version** | `v1.0` (default) or `beta`. | > | **Knowledge-sync** | Which workspaces may run a delegated Resource access check on behalf of a named reader. Defaults to the platform's knowledge-sync workspace. | > > The configuration app drives everything; the app instance itself has no per-field credential form. It is organised in three tabs — **Authentication**, **Agents** (MCP endpoint, catalog entry and the authorized-agents allowlist) and **Teams bot** — and from the first one you pick one of: > > | Auth mode | What you provide | Best for | > | - | - | - | > | `oauthCentral` | Nothing; just click **Connect** | Workspaces on a platform where the admin set up the central client | > | `oauth` | Your own Entra **Application (client) ID + Secret** (+ tenant; redirect URI `/workspaces//webhooks/.oauthCallback`) | You manage your own Microsoft Entra OAuth app | > | `clientCredentials` | Entra **client ID + secret + tenant** with admin-consented **application** Graph permissions | Server-to-server / back-office, content indexing, no interactive sign-in | > | `accessToken` | A pre-minted Microsoft Graph **access token** | Short-lived / caller-managed tokens | > > > [!WARNING] > > > > Microsoft Entra rejects a colon in the redirect URI path, so for the `oauth` mode use your workspace's **raw id** in the redirect URI, not the `slug:` form. The configuration app shows the exact URI to register. > > > [!NOTE] > > > > Credentials are provisioned into the workspace's Secrets by the `onInstall` flow and resolved server-side. Always set them through the configuration app rather than Studio's Secrets screen. The agent allowlist (**Authorized agents**) gates which Agent Factory agents may call the MCP endpoint; see the *Agent builder* tab. > > ## Available Instructions > > Every instruction resolves credentials from the workspace configuration. Operations are grouped by Teams resource; the MCP server exposes the same operations behind the four entity tools (see the *Agent builder* tab). Instructions that read or write on behalf of a specific person accept an optional `userId`; omit it for the signed-in user. > > ### Teams & channels > > | Instruction | Description | Returns | > | - | - | - | > | `listJoinedTeams` | List the teams the identity belongs to. Accepts no OData option. | `{ value: [{ id, displayName, description }] }` | > | `getTeam` | Get a team by `teamId`. | A team resource `{ id, displayName, visibility, … }`. | > | `listTeamMembers` | List the members of a `teamId`. | `{ value: [{ id, displayName, email, roles }] }` | > | `listChannels` | List the channels of a `teamId`. | `{ value: [{ id, displayName, membershipType, webUrl }] }` | > | `getChannel` | Get a channel by `teamId` + `channelId`. | A channel resource. | > | `listChannelMembers` | List the members of a channel. | `{ value: [ conversationMember ] }` | > > ### Channel messages > > | Instruction | Description | Returns | > | - | - | - | > | `listChannelMessages` | Root messages of a channel, newest first (`teamId`, `channelId`). `expand=replies` inlines each thread. | `{ value: [ chatMessage ], "@odata.nextLink" }` | > | `getChannelMessage` | Get one root message by `messageId`. | A chatMessage `{ id, body, from, createdDateTime }`. | > | `listChannelMessageReplies` | Replies to a root message — where the body of a discussion lives. | `{ value: [ chatMessage ] }` | > | `getChannelMessageReply` | Get a single reply by `replyId`. | A chatMessage. | > | `sendChannelMessage` | Post a new root message; `body` = `{ body: { contentType, content }, subject? }`. | The created chatMessage. | > | `replyToChannelMessage` | Reply to a root message; `body` = `{ body: { contentType, content } }`. | The created chatMessage. | > > ### Chats > > | Instruction | Description | Returns | > | - | - | - | > | `listChats` | Chats the identity takes part in, most recently updated first. | `{ value: [{ id, topic, chatType, lastUpdatedDateTime }] }` | > | `getChat` | Get a chat by `chatId`. | A chat resource. | > | `listChatMessages` | Messages of a chat, newest first. A chat is flat: no replies. | `{ value: [ chatMessage ] }` | > | `getChatMessage` | Get one message by `chatId` + `messageId`. | A chatMessage. | > | `sendChatMessage` | Post a message to a chat; `body` = `{ body: { contentType, content } }`. | The created chatMessage. | > | `listChatMembers` | List the participants of a chat. | `{ value: [ conversationMember ] }` | > > ### Meetings > > | Instruction | Description | Returns | > | - | - | - | > | `listMeetingEvents` | Calendar events carrying a Teams meeting, within `from`/`to`. This is how you find a meeting. | `{ value: [{ id, subject, start, end, onlineMeeting: { joinUrl } }] }` | > | `resolveOnlineMeeting` | Turn a `joinUrl` into the online meeting every other operation needs. | `{ value: [ onlineMeeting ] }` | > | `getOnlineMeeting` | Get a meeting by `meetingId`. | An onlineMeeting resource. | > | `createOnlineMeeting` | Schedule a meeting; `body` = `{ startDateTime, endDateTime, subject }`. | The created onlineMeeting, with `joinWebUrl`. | > | `updateOnlineMeeting` | Change a meeting; `body` = the fields to update. | The updated onlineMeeting. | > | `listMeetingTranscripts` | Transcript ids and dates for a meeting — not the text. | `{ value: [{ id, createdDateTime }] }` | > | `getMeetingTranscriptContent` | The transcript itself, by `transcriptId`. | **WebVTT plain text** (speakers + timestamps), truncated on a line boundary — not JSON. | > | `listMeetingRecordings` | Recording metadata; the video is never returned inline. | `{ value: [{ id, createdDateTime, recordingContentUrl }] }` | > | `listMeetingAttendanceReports` | Attendance reports of a meeting. | `{ value: [{ id, totalParticipantCount, meetingStartDateTime }] }` | > | `getMeetingAttendanceReport` | One report with its records: who joined, when, for how long. | A report with `attendanceRecords`. | > > ### Bot bridge > > | Instruction | Description | Returns | > | - | - | - | > | `sendTextMessage` | Reply with plain text (Markdown supported) in the Teams conversation an inbound activity came from. `originalActivity` = the activity received on `teams.bot.messageReceived`. | The Bot Connector response `{ id }`. | > > > [!NOTE] > > > > `Returns` shows the shape of the operation output (the underlying Microsoft Graph resource). `getMeetingTranscriptContent` is the exception: it returns WebVTT text, because Graph serves transcripts as text rather than JSON. > > ## DSUL Examples > > **List joined teams and their channels:** > > ```yaml theme={null} > - MicrosoftTeamsNext.listJoinedTeams: > output: teams > - MicrosoftTeamsNext.listChannels: > teamId: '{{teams.value[0].id}}' > output: channels > ``` > > **Read a channel discussion, thread starters then replies:** > > ```yaml theme={null} > - MicrosoftTeamsNext.listChannelMessages: > teamId: '{{teams.value[0].id}}' > channelId: '{{channels.value[0].id}}' > top: 20 > output: messages > - MicrosoftTeamsNext.listChannelMessageReplies: > teamId: '{{teams.value[0].id}}' > channelId: '{{channels.value[0].id}}' > messageId: '{{messages.value[0].id}}' > output: replies > ``` > > **Post a message in a channel:** > > ```yaml theme={null} > - MicrosoftTeamsNext.sendChannelMessage: > teamId: '{{teams.value[0].id}}' > channelId: '{{channels.value[0].id}}' > body: > body: > contentType: html > content: '

Deployment finished.

' > output: posted > ``` > > **Find a meeting and read its transcript:** > > ```yaml theme={null} > - MicrosoftTeamsNext.listMeetingEvents: > from: '2026-01-01T00:00:00Z' > to: '2026-01-31T23:59:59Z' > top: 20 > output: events > - MicrosoftTeamsNext.resolveOnlineMeeting: > joinUrl: '{{events.value[0].onlineMeeting.joinUrl}}' > output: meeting > - MicrosoftTeamsNext.listMeetingTranscripts: > meetingId: '{{meeting.value[0].id}}' > output: transcripts > - MicrosoftTeamsNext.getMeetingTranscriptContent: > meetingId: '{{meeting.value[0].id}}' > transcriptId: '{{transcripts.value[0].id}}' > output: transcript > ``` > > **Schedule a meeting:** > > ```yaml theme={null} > - MicrosoftTeamsNext.createOnlineMeeting: > body: > subject: 'Quarterly review' > startDateTime: '2026-02-10T09:00:00Z' > endDateTime: '2026-02-10T10:00:00Z' > output: created > ``` > [tab] Chat connector (Teams bot) > > ## Chat connector > > **Goal:** let people talk to one of your agents from inside Teams — a one-to-one chat with a bot, or a bot mentioned in a channel. > > This is the connector's third surface, and it works the other way round from the other two. There, *you* call Microsoft. Here, **Microsoft calls you**: an Azure Bot forwards every message to the connector, which verifies it and hands it to an automation you write. Nothing is routed to an agent automatically — you decide what answers, which is what lets you put an approval step, a filter or a router in front of it. > > ```mermaid theme={null} > sequenceDiagram > participant P as Person in Teams > participant B as Azure Bot > participant C as Connector > participant A as Your automation > P->>B: sends a message > B->>C: POST messagesEndpoint > C->>C: verify signature, issuer,
audience, validity, serviceUrl > C-->>B: 200, empty > C->>A: teams.bot.messageReceived > Note over A: you decide what answers > A->>C: MicrosoftTeamsNext.sendTextMessage > C->>B: POST the reply > B->>P: reply appears in the conversation > ``` > > > [!NOTE] > > > > The bot is optional and independent from the rest: a workspace that only uses the tools and Knowledge Resources never needs one. Conversely, a bot needs no Microsoft Graph OAuth connection — it authenticates as the bot, not as a user. > > ## 1. Register an Azure Bot > > **1. Create the Azure Bot resource** > > In the [Azure portal](https://portal.azure.com), create an **Azure Bot** resource. Choose a **Multi Tenant** or **Single Tenant** app type and let Azure create the Microsoft App ID, or reuse an existing app registration. Note the **Microsoft App ID**, and create a **client secret** for it. > > **2. Enable the Microsoft Teams channel** > > In the bot resource, open **Channels** and add **Microsoft Teams**. Without it, the bot exists but Teams will never deliver a message to it. > > **3. Point the messaging endpoint at the connector** > > In **Configuration**, set the **Messaging endpoint** to the URL shown in the connector's configuration app: > > ```text theme={null} > /workspaces//webhooks/.messagesEndpoint > ``` > > The configuration app renders the exact value with a copy button; `` is the slug of the installed app instance. > > **4. Enter the bot credentials in the configuration app** > > Open the connector's **Configuration app** and go to its **Teams bot** tab, then paste the **Bot app ID** and **Bot app password** (the client secret). Leave *Bot tenant* empty for a multi-tenant bot; set your Entra tenant id for a single-tenant one. Save. > > > [!WARNING] > > > > Enter these in the configuration app, never in Studio's **Secrets** screen. That screen serializes object values to strings, which would break not only the bot but the workspace's Microsoft Graph credentials with it. > > **5. Install the bot in Teams** > > Package the bot as a Teams app (Developer Portal or an app manifest referencing the Microsoft App ID) and install it in the team or for the users who should be able to talk to it. > > ## 2. Answer incoming messages > > Every verified activity is emitted as an event in your workspace. Write an automation that listens to it and replies. > > | Event | Payload | When | > | - | - | - | > | `teams.bot.messageReceived` | The **full Bot Framework activity** — `type`, `text`, `from`, `conversation`, `serviceUrl`, `id`, … | Every inbound activity that passed verification. This is the one to listen to. | > | `teams.bot.activityReceived` | A summary: `activityType`, `conversationId`, `fromId`, `fromName` | Same trigger, lighter payload — convenient for logging or metrics. | > | `teams.bot.rejected` | `reason`, `activityType` | An activity failed verification and was answered `401`. Useful for alerting; the caller is never told which check failed. | > > A minimal echo, to check the round trip end to end: > > ```yaml theme={null} > slug: replyInTeams > when: > events: > - teams.bot.messageReceived > do: > - conditions: > '{{payload.type}} != "message"': > - break: {} > - MicrosoftTeamsNext.sendTextMessage: > text: 'You said: {{payload.text}}' > originalActivity: '{{payload}}' > ``` > > Passing the whole activity back as `originalActivity` is what tells the connector where to answer: the conversation, the message being replied to and the `serviceUrl` are all read from it. > > ## 3. Hand the message to an agent > > To make the bot conversational, call your agent between the two steps and send its answer back: > > ```yaml theme={null} > slug: askAgentFromTeams > when: > events: > - teams.bot.messageReceived > do: > - conditions: > '{{payload.type}} != "message"': > - break: {} > - comment: Strip the @mention Teams prepends in a channel, so the agent sees the question only. > - set: > name: question > value: '{{payload.text}}' > - AI Knowledge.query: > projectId: '{{config.agentId}}' > question: '{{question}}' > output: answer > - MicrosoftTeamsNext.sendTextMessage: > text: '{{answer.output.text}}' > originalActivity: '{{payload}}' > ``` > > Replace the middle step with whatever should answer — an agent, a search, a routing table, or a human approval before replying. Teams renders Markdown in the reply, so lists and links come through. > > > [!NOTE] > > > > Bot Framework expects the webhook itself to answer immediately and empty; the reply travels back on a separate call. That is why the connector acknowledges Microsoft right away and your automation replies afterwards, and why a slow agent does not cause Teams to retry the message. > > ## What the connector guarantees > > The messaging endpoint is **necessarily anonymous** — Microsoft calls it from outside and carries no Prisme.ai identity — so the signed token it sends is the only gate, and it is checked **before anything is emitted**. An event here makes a bot speak to a real person in a real conversation, so an unverified payload would be a way for anyone to put words in the bot's mouth. On each inbound activity the connector verifies: > > * the **RS256 signature**, against Microsoft's published Bot Connector keys (cached, and re-fetched once if a key rotated); > * the **issuer** and the **audience** (your bot's app id); > * the token's **validity window**; > * the **`serviceUrl`** carried by the activity, which matters because the reply posts the bot token to that URL: without this check a replayed activity could aim it at a host of the attacker's choosing. > > A failed check returns `401` **without saying which one failed** — telling an unauthenticated poster that would be free reconnaissance — and emits `teams.bot.rejected` so you can still see it. If Microsoft's key endpoint cannot be reached, the connector answers `503` rather than trusting the activity, and Microsoft retries. > > > [!NOTE] > > > > Message text is registered as sensitive before it can reach an event, so conversation content is redacted from the activity feed rather than logged in clear. > > ## Limits > > * **Plain text and Markdown only.** Adaptive cards, typing indicators and attachments use the raw Bot Framework activity shape, which is not exposed as an instruction; `sendTextMessage` covers the conversational case. > * **No built-in agent routing.** The connector delivers the message and sends the reply; choosing what answers is the automation you write, as in the example above. > * **The reply targets the originating conversation.** Starting a conversation with a user who has never talked to the bot (proactive messaging) is not covered. *** ## Security The answers that hold for every connector (agent access, shared knowledge bases, credentials, models, egress) are on [Connector security](/apps-store/marketplace/connectors/security). This section lists what is specific to Microsoft Teams. | Topic | Microsoft Teams | | - | - | | Authentication family | Delegated OAuth (Microsoft Entra, authorization code with PKCE): each user connects their own Microsoft 365 account. An app-only mode (`clientCredentials`) also exists. The chat connector replies with its own Azure Bot identity. | | Production modes | `oauthCentral` or `oauth` | | Modes to avoid in production | `accessToken` (testing only, and a Graph access token expires after about an hour). `clientCredentials` acts as the application, not as the user: avoid it when per-user permissions are required. | | Read-only scopes | `offline_access`, `User.Read`, `Team.ReadBasic.All`, `Channel.ReadBasic.All`, `TeamMember.Read.All`, `ChannelMember.Read.All`, `ChannelMessage.Read.All`, `Chat.Read`, `ChatMessage.Read`, `Calendars.Read`, `OnlineMeetings.Read`, `OnlineMeetingTranscript.Read.All`, `OnlineMeetingArtifact.Read.All` (the **Read-only preset**, also the default of the configuration app). When neither the workspace nor the platform maintainer sets scopes, the central OAuth client also requests `ChannelMessage.Send`, `Chat.ReadWrite` and `OnlineMeetings.ReadWrite`. | | Agent allowlist | Yes, on the tenant endpoint (empty at installation). The global endpoint accepts every agent. | | Per-reader access control on knowledge bases | Yes: each channel message is checked against the reader's own Microsoft 365 connection. | | Outbound hosts | `graph.microsoft.com`, `login.microsoftonline.com`. With the chat connector, also `login.botframework.com` and the Bot Connector address carried by each incoming message, accepted only when its host ends with `.botframework.com`, `.trafficmanager.net` or `.botframework.azure.us` (default list). | | Audit events | None specific to this connector | With `oauthCentral`, set the read-only scopes explicitly in the configuration app rather than relying on the central default. The chat connector verifies the Bot Framework signature of every incoming message and refuses to send its bot token to a host outside the list above. *** ## Error Handling | HTTP code | Meaning | | - | - | | `400` | Bad request: invalid parameters or malformed body. Note that some Teams endpoints **reject** OData options rather than ignoring them (`joinedTeams` refuses `$top`). | | `401` | Unauthorized: the Microsoft Graph access token is missing, expired or revoked. The user must reconnect (OAuth modes). On the bot endpoint: the activity's signature, issuer, audience, validity window or `serviceUrl` did not check out. | | `403` | Forbidden: insufficient Graph scope/permission, missing admin consent (application mode), or the account is not a member of the team or chat. | | `404` | Not found: the team, channel, chat, message or meeting id does not exist or is not visible to the account. | | `429` | Throttled: Microsoft Graph rate limit; back off and retry (honor `Retry-After`). | | `500` / `503` | Service error: transient; retry shortly. On the bot endpoint, `503` means Microsoft's signing keys could not be fetched — the activity was deliberately not trusted. | ### Common Issues **"This agent is not authorized to use this connector"**: The calling agent is not in the allowlist. Open the configuration app → **Authorized agents** → tick this agent (or enable **Allow all agents**) and Save. **"The calling agent could not be identified"**: The MCP capability *Scope* does not declare `agent_id`, so Agent Factory never injects the agent identity. Set the Scope to `context_id,agent_id,user_id` on the capability, then allow the agent in the config app. **"Microsoft Teams is not connected for this user"**: No per-user OAuth token. Open the configuration app (OAuth mode) and click **Connect**, or use the agent's connect flow. **"token refresh failed … must reconnect"**: The stored refresh token was revoked or expired (Microsoft Entra invalidated it, or it aged past its limit). The connection is dropped automatically; the user must reconnect from the config app. **"OAuth is not configured"**: Neither a tenant OAuth client nor the central platform client is available. Set the client ID/secret/tenant in the config app, or ask the platform maintainer to provision the central Entra OAuth client. **"Bot Framework credentials are not configured"**: The bot app id or password is missing. Fill them in the configuration app's **Teams bot** tab; do not set them from Studio's Secrets screen. **The bot receives nothing**: Check three things in order — the **Microsoft Teams channel** is enabled on the Azure Bot resource, the **messaging endpoint** matches the URL shown in the config app exactly, and the bot app is actually installed in the team or chat. A `teams.bot.rejected` event means the message arrived but failed verification, which is a credential mismatch rather than a wiring problem. **"Query option 'Top' is not allowed"**: Some Teams collections reject OData options outright instead of ignoring them. `listJoinedTeams` returns every team in one response; do not pass `top` or a paging cursor to it. **A meeting cannot be found**: There is no "list my online meetings" endpoint in Graph. Discover meetings with `listMeetingEvents` (the calendar), then turn the event's `joinUrl` into a meeting with `resolveOnlineMeeting`. **Application mode cannot read channel messages**: Reading Teams messages with application permissions requires Microsoft's [protected API approval](https://learn.microsoft.com/en-us/graph/teams-protected-apis) on top of admin consent. Per-user OAuth is not subject to it. **Microsoft Entra redirect URI rejected**: Entra rejects a colon in the redirect URI path. Register the redirect URI with the workspace's **raw id**, not the `slug:` form: `/workspaces//webhooks/oauthCallback` for the platform client, `/workspaces//webhooks/.oauthCallback` for your own Entra app. Copy the exact value from the config app. ## External Resources > [card] [Microsoft Graph API](https://learn.microsoft.com/en-us/graph/api/resources/teams-api-overview) > > Official reference for the Teams, channels, chats, messages and online meetings REST APIs. > [card] [Tool Agents](/products/agent-factory/capabilities) > > Learn how Agent Factory agents consume MCP tools in Prisme.ai. # monday.com Source: https://docs.prisme.ai/apps-store/marketplace/connectors/monday Let Agent Creator agents manage monday.com boards, items, docs and users through MCP, with per-user OAuth resolved server-side or a workspace API token ![monday.com](https://mintcdn.com/prismeai/Oqq72tWGTtxufvRl/images/connectors/monday.png?fit=max\&auto=format\&n=Oqq72tWGTtxufvRl\&q=85\&s=cb5f9324e0e2296cb757e32becdc9754) The monday.com connector wraps the [monday.com](https://monday.com) v2 GraphQL API as MCP tools for **Agent Creator** agents, and as `Monday.op:` App instructions for Builder automations, covering boards, items, subitems, columns, groups, workspaces, updates, files, webhooks, docs, folders, tags and activity logs, plus a generic `graphql` passthrough. The MCP server runs in the **tenant app-instance context**: it resolves the installing workspace's own credentials and authorizes the calling agent against that workspace's allowlist. Authentication supports three modes: * **Per-user OAuth2, central client** (`oauthCentral`, recommended): one monday.com OAuth application is registered once by the platform maintainer; every end user signs in with their own monday.com account. Nothing to register per workspace: each one just installs the app and clicks *Connect*. * **Per-user OAuth2, tenant client** (`oauth`): paste your own monday.com OAuth client ID/secret in the connector config app. Each user signs in with their own account against your client (authorization-code + PKCE flow). * **Personal API Token** (`accessToken`): a caller-managed monday.com Personal API Token (v2), used as-is with no exchange. One identity acts for the whole workspace. > [card] Boards & Items > > Boards, items, subitems, columns and groups with full CRUD, plus cursor pagination and column-value filtering. > [card] Collaboration > > Updates, in-app notifications, webhooks, tags, docs, users and teams. > [card] Per-user auth > > Per-user OAuth (central or tenant client) resolved server-side, or a workspace Personal API Token. ## Who is this for? This connector is used by three different roles. Jump to the section that matches yours; each one is self-contained. > [card] Agent builder > > You build agents in **Agent Creator** and want them to use monday.com. → *Agent builder* tab. > [card] Platform admin > > You run the platform and set up the shared monday.com OAuth client once for everyone. → *Platform admin setup* accordion below. > [card] Workspace builder > > You write Builder automations (DSUL) that call monday.com operations directly. → *Workspace builder* tab. ## Prerequisites * A **monday.com** account. * For the **OAuth modes**: a **monday.com OAuth application** created at [monday.com/developers/apps](https://monday.com/developers/apps); copy its **Application ID** (client id) and **Client Secret**. The platform maintainer registers one app for the central mode; a workspace can also register its own for the tenant mode. * For the **access-token mode**: a **Personal API Token (v2)** generated in *monday.com Developer center > My access tokens*. * The default OAuth scopes requested are: ```text theme={null} boards:read boards:write docs:read docs:write updates:read updates:write users:read users:write workspaces:read workspaces:write webhooks:read webhooks:write assets:read notifications:write me:read account:read teams:read tags:read ``` * Base URL: `https://api.monday.com` (the connector targets the `/v2` GraphQL endpoint). > [accordion] Platform admin (Governance): one-time platform setup > > **Goal:** two one-time tasks: (1) configure the shared **central OAuth client** so every workspace lets its users sign in with their own monday.com account, and (2) optionally expose monday.com as a reusable **capability** in AI Governance so agent builders can pick it without pasting endpoint URLs. Throughout, `` is your environment's API URL (`https://api.studio.prisme.ai/v2` on production). > > ## 1. Configure the connector > > **1. Register the OAuth application at monday.com** > > Open [monday.com/developers/apps](https://monday.com/developers/apps) and create an OAuth application. Set the single authorized redirect URI (callback URL) to the **core workspace** callback: > > ```text theme={null} > /workspaces/slug:monday/webhooks/oauthCallback > ``` > > (e.g. `https://api.studio.prisme.ai/v2/workspaces/slug:monday/webhooks/oauthCallback` on production). Add the scopes listed in *Prerequisites*. Save and copy the **Application ID** (client id) and **Client Secret** (the secret is shown only once). > > **2. Enter the credentials through the configuration app** > > Open the central `monday` workspace and launch its **Configuration app** at `/apps/monday` (e.g. `https://studio.prisme.ai/apps/monday`). Loaded from the core workspace, the app shows the **maintainer view** (org owner / editor / admin only); paste the **Application ID** and **Client Secret** there and Save; the app stores them in the core workspace's secrets for you. Do not edit Studio's raw Secrets by hand. These credentials stay in the `monday` workspace and are never exposed to tenants or end users; token exchange is proxied through the core `centralTokenExchange` webhook so the client secret never leaves the core workspace. > > **3. Tell workspaces to use the central client** > > Each consuming workspace selects auth mode **`oauthCentral`** in the connector configuration app (no client id/secret to enter on their side). Their users then just click **Connect**. > > **4. (Optional) Publish to the Capabilities catalog** > > From that same maintainer view, the **Add to catalog** button publishes monday.com to the org-wide **Capabilities catalog** in one click (org owner / admin only; it stays disabled until the central client is saved). Once published, every agent builder in the org can enable monday.com from the catalog without pasting an endpoint; see *Option A* in the *Agent builder* tab. > > ## 2. Declare the capability in AI Governance > > As an alternative to (or in addition to) the catalog button, you can declare monday.com as a named **capability** in AI Governance. Agent builders then enable that capability on their agents instead of pasting a raw MCP endpoint. > > **1. Open AI Governance > Capabilities** > > Create (or edit) the **monday.com** capability. > > **2. Point it at the MCP endpoint** > > Set the capability's MCP server URL to the connector's **MCP Endpoint**, and set its **Scope** to: > > ```text theme={null} > context_id,agent_id,user_id > ``` > > The `agent_id` in the scope is what lets the connector identify and authorize the calling agent. > > **3. Make it available to agent builders** > > Once created, the capability appears in the capability picker for agent builders in your organization, who enable it on their agents. Access to the catalog follows your organization's existing roles; there is no per-capability role grant. > > **4. Smoke-test** > > From an agent that has the capability, in a workspace configured for `oauthCentral`, trigger any tool (e.g. `me`). The user is prompted to connect once (monday.com sign-in); subsequent calls reuse the stored token transparently and refresh it automatically. > > > [!WARNING] > > > > Declaring the capability makes the connector **available**; it does not by itself authorize a specific agent. This connector follows the **tenant-context model**: which agents may actually call it is gated per-workspace by the **authorized-agents allowlist** in the configuration app (see the *Workspace builder* tab). Agents show a **Connect** button only if the catalog entry carries the connector's connect / status / disconnect webhooks in its `auth` block. The configuration app's **Add to catalog** button writes it for you. If you create the entry by hand, paste that block into **Auth Configuration**: the platform adds it later on its own only for a workspace endpoint (ending in `.mcp`), never for the connector's global `/webhooks/mcp` endpoint. *** > [tab] Agent builder (Agent Creator) > > ## Agent builder > > **Goal:** let an agent you build in Agent Creator use monday.com through MCP tools. > > > [!NOTE] > > > > Before an agent can call the connector, a *Workspace builder* must have installed and configured the monday.com app in a workspace (see the *Workspace builder* tab), and, for the central OAuth mode, a *Platform admin* must have provisioned the shared OAuth client (see the *Platform admin setup* accordion above). > > This connector runs in the **tenant app-instance context**: your agent is authorized two ways at once: it is identified by the `agent_id` that Agent Creator injects through the capability *Scope*, and that agent must appear in the connector's **authorized-agents allowlist** (managed in the configuration app). The monday.com access token itself is resolved server-side from the configured auth mode. > > There are two ways to wire it up. Pick based on how much isolation you need. > > ## Option A: Enable the shared capability from the catalog > > The fastest path: a *Platform admin* has already published a **monday.com** capability to the Capabilities catalog (see the *Platform admin setup* accordion above, the **Add to catalog** button, or §2), so you just pick it from the catalog. > > **1. Open your agent in Agent Creator** > > Open the agent you want to extend and go to its capabilities / tools. > > **2. Add the monday.com capability** > > Browse the capability catalog, select **monday.com**, and enable it. The MCP endpoint URL and the *Scope* (`context_id,agent_id,user_id`) are already wired by the admin; nothing to paste, and the shared instance accepts every agent, so there is no allowlist step on your side. > > **3. Connect a monday.com account** > > On the first tool call, an unconnected user is prompted to sign in: Agent Creator surfaces a `connect_url` to monday.com's authorization page. After sign-in the per-user token is stored and reused on subsequent calls. > > > [!NOTE] > > > > Convenient, but your agent runs against a **shared, platform-managed instance**: its monday.com credentials are owned by someone else and the instance accepts every agent that is granted the capability. Prefer Option B for anything beyond quick experiments. > > ## Option B: Run it from your own workspace (recommended) > > For production agents, install the connector in **your own workspace** and point the agent at *that* workspace's MCP endpoint. > > > [!WARNING] > > > > **Prefer this mode for security.** Because the MCP runs in *your* app-instance context, the monday.com credentials, the per-user OAuth tokens and the authorized-agents allowlist are all **scoped to your workspace**, not shared platform-wide. You decide exactly which agents may call it and which monday.com account / auth mode backs them, and a misconfiguration elsewhere can never expose your data. The shared catalog capability (Option A) is a broad surface many agents can reach; your own workspace is an isolated, least-privilege boundary. > > **1. Install and configure the connector in your workspace** > > Follow the *Workspace builder* tab: install **monday.com** in your workspace, open its **Configuration app**, choose the auth mode and connect a monday.com account (or paste a Personal API Token). > > **2. Allowlist your agent** > > In that workspace's config app, open **Authorized agents** and tick your agent (the **Install capability** button does this for you), or enable **Allow all agents**. > > **3. Add the MCP capability to your agent** > > In your agent, add a capability pointing at **your workspace's MCP Endpoint** URL, and set its **Scope** to: > > ```text theme={null} > context_id,agent_id,user_id > ``` > > The `agent_id` is what lets the connector identify and authorize your agent; without it, every call is rejected with an explicit "agent could not be identified" message. This *Scope* is separate from the monday.com OAuth scopes. > > **4. Connect a monday.com account** > > On the first tool call, the user is prompted to sign in (or uses **Connect** in the config app). The per-user token is stored and reused; refresh is automatic. > > ## Brief the agent in its system prompt > > Whichever option you pick, wiring the capability is not enough: the agent also needs to know the tools exist and when to reach for them. Copy-pasteable starter: > > ```text theme={null} > You have access to the monday.com MCP server. Use it whenever the user asks about monday.com content: boards, groups, items, sub-items, columns (status, person, date, …), updates, docs or users. Examples: "List the items in the Sprint board grouped by status", "Add an update to the Marketing campaign item", "Move this item to Done", "Create a new task assigned to Alice". monday.com IDs are numeric strings, so list the parent (boards, then columns/groups/items) before acting on it rather than guessing IDs. Confirm with the user before any destructive action (delete an item, archive a board, change ownership). > ``` > > > [!NOTE] > > > > **Legacy AI Knowledge agents** (no native MCP picker): add the connector under **Advanced > Tools > MCP** and paste the **MCP Endpoint** URL. The agent still has to be allowlisted in the config app and its identity propagated so the connector can read its `agent_id`. > > > [!NOTE] > > > > **Restricting to read-only (least privilege).** monday.com tools cover both reads and writes (create/update boards, items, docs). The requested OAuth scopes **are** the grant. To allow only read access, set the **Scopes** field in the configuration app to the read-only set, dropping every `:write` scope, e.g.: > > > > ```text theme={null} > > boards:read docs:read updates:read users:read workspaces:read assets:read me:read account:read teams:read tags:read > > ``` > > > > With central OAuth (`oauthCentral`) you do **not** create your own monday app; keep `oauthCentral` and enter the read scopes; your tenant scope overrides the platform default (the central app must list these read scopes). Write calls (GraphQL mutations) are then rejected by monday with a permission error. The scope is set at the workspace level (a workspace editor can widen it again). > > ## Available Tools > > All tools accept an `outputFormat` argument (`verbose` default / `structured` / `both`). monday.com IDs are numeric strings; list the parent resource first to obtain them. > > ### Boards > > | Tool | Description | > | - | - | > | `boards` | List boards (optional filters by ids / workspace / state) | > | `get_board` | Get a single board with its groups, columns and paged items | > | `create_board` / `update_board` / `duplicate_board` / `archive_board` / `delete_board` | Full board lifecycle | > > ### Items & Subitems > > | Tool | Description | > | - | - | > | `items_page` | Cursor-paginated items of one or more boards (optional `query_params`) | > | `items_page_by_column_values` | Paginated items filtered by column values | > | `get_items` | Fetch up to 100 items by ID | > | `create_item` / `create_subitem` / `duplicate_item` | Create or clone items | > | `move_item_to_group` / `move_item_to_board` | Relocate items | > | `archive_item` / `delete_item` / `clear_item_updates` | Archive, delete, or clear updates | > > ### Columns > > | Tool | Description | > | - | - | > | `columns` | List columns (with types and JSON settings) | > | `create_column` | Create any of 37 column types | > | `change_column_title` / `change_column_metadata` / `delete_column` | Rename, edit metadata or delete columns | > | `change_column_value` | Update a single value with a typed JSON payload | > | `change_simple_column_value` | Update a value with a simple string | > | `change_multiple_column_values` | Bulk-update several columns in one call | > > ### Groups > > | Tool | Description | > | - | - | > | `groups` | List groups of one or more boards | > | `create_group` / `update_group` / `duplicate_group` / `archive_group` / `delete_group` | Group lifecycle | > > ### Users & Teams > > | Tool | Description | > | - | - | > | `users` | List users (filter by kind / email / name) | > | `me` | Get the user whose token is used | > | `invite_users` / `deactivate_users` | Manage user lifecycle | > | `teams` | List teams | > | `add_users_to_team` / `remove_users_from_team` | Manage team membership | > > ### Workspaces > > | Tool | Description | > | - | - | > | `workspaces` | List workspaces | > | `create_workspace` / `update_workspace` / `delete_workspace` | Workspace lifecycle | > | `add_users_to_workspace` / `delete_users_from_workspace` | Manage subscribers and owners | > > ### Updates (comments) > > | Tool | Description | > | - | - | > | `updates` / `item_updates` | List updates | > | `create_update` / `edit_update` / `delete_update` | Manage updates | > | `pin_to_top` / `unpin_from_top` | Pin or unpin updates | > | `like_update` / `unlike_update` | React to updates | > > ### Tags, Assets, Webhooks, Notifications > > | Tool | Description | > | - | - | > | `tags` / `board_tags` / `create_or_get_tag` | Browse and create tags | > | `assets` | Fetch file assets by ID | > | `webhooks` / `create_webhook` / `delete_webhook` | Manage board webhooks | > | `create_notification` | Send an in-app notification to a user | > > ### Docs & Folders > > | Tool | Description | > | - | - | > | `docs` / `doc_blocks` | List docs and blocks | > | `create_doc` | Create a doc in a workspace or attach it to an item column | > | `create_doc_block` / `update_doc_block` / `delete_doc_block` | Manage doc blocks (17 block types) | > | `folders` / `create_folder` / `update_folder` / `delete_folder` | Manage folders in a workspace | > > ### Meta & Admin > > | Tool | Description | > | - | - | > | `activity_logs` | Activity log of boards, filtered by time or user | > | `board_views` | Views configured on a board | > | `account` / `account_products` | Account info and installed products | > | `complexity` | Remaining per-minute complexity budget | > | `version` | API version currently served | > | `graphql` | Run a raw monday.com GraphQL `query` with `variables`: the escape hatch for endpoints not covered by a dedicated tool | > > ## Output Formats > > Every tool accepts an `outputFormat` parameter that controls the MCP response shape: > > * **`verbose`** (default): human-readable text optimized for LLM consumption. > * **`structured`**: machine-readable JSON in `structuredContent`. > * **`both`**: both text and structured content. > > ## Tool Details > > ### create\_item > > ```json theme={null} > { > "name": "create_item", > "arguments": { > "board_id": "1234567890", > "item_name": "Ship onboarding revamp", > "group_id": "topics", > "column_values": { > "status": { "label": "Working on it" }, > "date": { "date": "2026-05-15" } > }, > "create_labels_if_missing": true > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `board_id` | Yes | Existing board ID (numeric string). Call `boards` first. | > | `item_name` | Yes | Name of the new item. | > | `group_id` | No | Target group ID (call `groups` first). | > | `column_values` | No | Map of `column_id → value`; the payload shape depends on the column type. | > | `create_labels_if_missing` | No | Auto-create missing `status` / `dropdown` labels. | > > ### items\_page\_by\_column\_values > > Filter board items by column values server-side. > > ```json theme={null} > { > "name": "items_page_by_column_values", > "arguments": { > "board_id": "1234567890", > "columns": [ > { "column_id": "status", "column_values": ["Done"] }, > { "column_id": "person", "column_values": ["alice@example.com"] } > ], > "limit": 50 > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `board_id` | Yes | Board to query. | > | `columns` | Yes | Array of `{ column_id, column_values }` filters. | > | `cursor` | No | Pagination cursor from a previous page. | > | `limit` | No | Page size (default 25). | > > ### change\_column\_value vs change\_simple\_column\_value > > * `change_column_value` takes a **typed JSON payload** (e.g. `{"label": "Done"}` for `status`, `{"date": "2026-05-15"}` for `date`). > * `change_simple_column_value` takes a **plain string** and lets monday.com infer the format (e.g. `Done`, `2026-05-15`). > > Use the typed variant when you need precise control (e.g. a people column with `{"personsAndTeams":[{"id":123,"kind":"person"}]}`). > > ```json theme={null} > { > "name": "change_simple_column_value", > "arguments": { > "board_id": "1234567890", > "item_id": "9876543210", > "column_id": "status", > "value": "Done" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `board_id` | Yes | Board the item belongs to. | > | `column_id` | Yes | Column to update. | > | `value` | Yes | Simple string value (typed JSON for `change_column_value`). | > | `item_id` | No | Target item ID. | > | `create_labels_if_missing` | No | Auto-create missing labels. | > > ### create\_notification > > ```json theme={null} > { > "name": "create_notification", > "arguments": { > "user_id": "987", > "target_id": "1234567890", > "text": "Staging is ready for review", > "target_type": "Project" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `user_id` | Yes | Recipient user ID (call `users` first). | > | `target_id` | Yes | Item or board ID the notification points to. | > | `text` | Yes | Notification text. | > | `target_type` | Yes | `Project` for boards/items, `Post` for updates. | > > ### create\_doc > > ```json theme={null} > { > "name": "create_doc", > "arguments": { > "location": { > "workspace": { > "workspace_id": "42", > "name": "Release Notes", > "kind": "private", > "folder_id": "99" > } > } > } > } > ``` > > To attach a doc to a board item, use `location.board` instead: > > ```json theme={null} > { "location": { "board": { "item_id": "1234567890", "column_id": "doc_column" } } } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `location` | Yes | Must contain exactly one of `workspace` (requires `workspace_id`, `name`, `kind`) or `board` (requires `item_id`, `column_id`). | > [tab] Workspace builder (DSUL) > > ## Workspace builder > > **Goal:** install the connector in a workspace, configure authentication and the agent allowlist, and call monday.com operations from your automations. > > ## Installation > > 1. Go to **Apps** in your workspace > 2. Search for **monday.com** and install it > 3. Open the **Configuration app** (the link auto-populated on install) to choose the auth mode, provide credentials (or paste a Personal API Token), connect a monday.com account, and allow the agents that may call the connector > > ## Configuration > > | Field | Description | > | - | - | > | **monday.com API Base URL** | Base URL of the monday.com API (default `https://api.monday.com`). | > | **Personal API Token** | A monday.com Personal API Token (v2) for the `accessToken` mode, stored as a workspace secret. Optional when an OAuth mode is used. | > | **Configuration app** | Auto-populated on install; open this link to choose the auth mode, connect a monday.com account (OAuth modes), and manage the authorized-agents allowlist. | > | **MCP Endpoint** | Auto-populated on install; URL of the MCP endpoint for this instance. | > > The configuration app drives authentication and the agent allowlist. From it you pick one of: > > | Auth mode | What you provide | Best for | > | - | - | - | > | `oauthCentral` | Nothing; just click **Connect** | Workspaces on a platform where the maintainer set up the central monday.com client. | > | `oauth` | Your own monday.com **Application ID + Client Secret** (redirect URI shown in the config app: `/workspaces/slug:/webhooks/.oauthCallback`) | You manage your own monday.com OAuth app. | > | `accessToken` | A monday.com **Personal API Token (v2)** in the **Personal API Token** field | Builder automations and shared service accounts where one identity acts for the whole workspace. | > > > [!NOTE] > > > > The agent allowlist (**Authorized agents**) gates which Agent Creator agents may call the MCP endpoint; see the *Agent builder* tab. Builder automations calling `Monday.op:` instructions resolve the same workspace credentials; the per-user OAuth modes apply to MCP tool calls made by Agent Creator agents. > > ## Available Instructions > > Every instruction resolves credentials from the workspace configuration. All IDs are numeric strings. Most list operations accept `limit` and `page` (25 per page by default). > > ### Boards > > | Instruction | Description | Returns | > | - | - | - | > | `boards` | List boards, optionally filtered by `ids`, `workspace_ids`, `state`, `order_by`, `board_kind`. | `{ boards: [{ id, name, board_kind, state }] }` | > | `get_board` | Get one board by `id` with its groups, columns and paged items. | `{ id, name, groups, columns, items_page }` | > | `create_board` | Create a board (`board_name`, `board_kind` required; `workspace_id`, `folder_id`, owners/subscribers, `template_id`, `empty` optional). | `{ id, name }` | > | `update_board` | Update one `board_attribute` (`name`/`description`/`communication`) with `new_value`. | `{ id }` | > | `duplicate_board` | Duplicate a board by `duplicate_type` (with/without pulses, updates, structure). | `{ id, name }` | > | `archive_board` / `delete_board` | Archive or permanently delete a board by `board_id`. | `{ id, state }` | > > ### Items & Subitems > > | Instruction | Description | Returns | > | - | - | - | > | `items_page` | Cursor-paginated items of `board_ids`, optional `query_params` rules. | `{ cursor, items: [{ id, name, column_values }] }` | > | `items_page_by_column_values` | Items of `board_id` filtered by `columns` (`[{ column_id, column_values }]`). | `{ cursor, items: [...] }` | > | `get_items` | Fetch items by `ids` (max 100). | `{ items: [{ id, name, column_values }] }` | > | `create_item` | Create an item (`board_id`, `item_name` required; `group_id`, `column_values`, `create_labels_if_missing`). | `{ id, name }` | > | `create_subitem` | Create a subitem under `parent_item_id`. | `{ id, name }` | > | `duplicate_item` | Duplicate an item on `board_id`, optionally `with_updates`. | `{ id }` | > | `move_item_to_group` | Move `item_id` to `group_id` on the same board. | `{ id }` | > | `move_item_to_board` | Move `item_id` to `board_id`/`group_id`, mapping columns and subitem columns. | `{ id }` | > | `archive_item` / `delete_item` | Archive or delete `item_id`. | `{ id, state }` | > | `clear_item_updates` | Clear all updates posted on `item_id`. | `{ id }` | > > ### Columns > > | Instruction | Description | Returns | > | - | - | - | > | `columns` | List columns of `board_id` with types and JSON settings. | `{ columns: [{ id, title, type, settings_str }] }` | > | `create_column` | Create a column (`board_id`, `title`, `column_type` required; one of 37 types). | `{ id, title, type }` | > | `change_column_title` | Rename a column (`board_id`, `column_id`, `title`). | `{ id, title }` | > | `change_column_metadata` | Update a column's `title` or `description` (`column_property` + `value`). | `{ id }` | > | `delete_column` | Delete `column_id` from `board_id`. | `{ id }` | > | `change_column_value` | Update a value with a typed JSON `value` (`board_id`, `column_id` required; `item_id`). | `{ id }` | > | `change_simple_column_value` | Update a value with a simple string `value`. | `{ id }` | > | `change_multiple_column_values` | Update several columns via `column_values` map. | `{ id }` | > > ### Groups > > | Instruction | Description | Returns | > | - | - | - | > | `groups` | List groups of `board_ids`. | `{ groups: [{ id, title, color }] }` | > | `create_group` | Create a group (`board_id`, `group_name`; optional `position`, `relative_to`). | `{ id, title }` | > | `update_group` | Update a `group_attribute` (`title`/`color`/`position`/relative) with `new_value`. | `{ id }` | > | `duplicate_group` | Duplicate `group_id` (`add_to_top`, `group_title` optional). | `{ id, title }` | > | `archive_group` / `delete_group` | Archive or delete `group_id`. | `{ id }` | > > ### Users & Teams > > | Instruction | Description | Returns | > | - | - | - | > | `users` | List users (filter by `ids`, `emails`, `name`, `kind`). | `{ users: [{ id, name, email }] }` | > | `me` | Get the user whose token is used. | `{ id, name, email, account }` | > | `invite_users` | Invite users by `emails` (optional `user_role`, `product`). | `{ invited: [...] }` | > | `deactivate_users` | Deactivate `user_ids`. | `{ deactivated: [...] }` | > | `teams` | List teams (optional `ids`). | `{ teams: [{ id, name }] }` | > | `add_users_to_team` / `remove_users_from_team` | Manage team membership (`team_id`, `user_ids`). | `{ id }` | > > ### Workspaces > > | Instruction | Description | Returns | > | - | - | - | > | `workspaces` | List workspaces (optional `kind`, `state`). | `{ workspaces: [{ id, name, kind }] }` | > | `create_workspace` | Create a workspace (`name`, `kind` required). | `{ id, name }` | > | `update_workspace` | Update workspace `attributes` (`{name, kind, description}`). | `{ id }` | > | `delete_workspace` | Delete `workspace_id`. | `{ id }` | > | `add_users_to_workspace` | Add `user_ids` as `subscriber`/`owner` of `workspace_id`. | `{ id }` | > | `delete_users_from_workspace` | Remove `user_ids` from `workspace_id`. | `{ id }` | > > ### Updates (comments) > > | Instruction | Description | Returns | > | - | - | - | > | `updates` | List updates globally (paginated). | `{ updates: [{ id, body, creator_id }] }` | > | `item_updates` | List updates attached to `item_id`. | `{ updates: [...] }` | > | `create_update` | Create an update on `item_id` (`body` required; optional `parent_id`). | `{ id }` | > | `edit_update` / `delete_update` | Edit or delete an update by `id`. | `{ id }` | > | `pin_to_top` / `unpin_from_top` | Pin or unpin an update by `id`. | `{ id }` | > | `like_update` / `unlike_update` | Like or unlike an update by `update_id`. | `{ id }` | > > ### Tags & Assets > > | Instruction | Description | Returns | > | - | - | - | > | `tags` | List public tags of the account (optional `ids`). | `{ tags: [{ id, name, color }] }` | > | `board_tags` | List tags of a private/shareable `board_id`. | `{ tags: [...] }` | > | `create_or_get_tag` | Create a public tag (`tag_name`; optional `board_id`) or return the existing one. | `{ id, name }` | > | `assets` | Get file assets by `ids`. | `{ assets: [{ id, name, url }] }` | > > ### Webhooks & Notifications > > | Instruction | Description | Returns | > | - | - | - | > | `webhooks` | List webhooks registered on `board_id` (optional `app_webhooks_only`). | `{ webhooks: [{ id, event, config }] }` | > | `create_webhook` | Subscribe a webhook to `board_id` (`url`, `event`; `config` required for specific-column/group events). | `{ id, board_id }` | > | `delete_webhook` | Delete a webhook by `id`. | `{ id }` | > | `create_notification` | Send an in-app notification (`user_id`, `target_id`, `text`, `target_type`). | `{ id }` | > > ### Docs > > | Instruction | Description | Returns | > | - | - | - | > | `docs` | List docs (filter by `ids`, `object_ids`, `workspace_ids`). | `{ docs: [{ id, name, doc_kind }] }` | > | `doc_blocks` | Fetch ordered blocks of `doc_id`. | `{ blocks: [{ id, type, content }] }` | > | `create_doc` | Create a doc via `location` (`{workspace: {...}}` or `{board: {item_id, column_id}}`). | `{ id }` | > | `create_doc_block` | Add a block to `doc_id` (`type`, `content` required). | `{ id }` | > | `update_doc_block` / `delete_doc_block` | Update or delete a block by `block_id`. | `{ id }` | > > ### Folders > > | Instruction | Description | Returns | > | - | - | - | > | `folders` | List folders (filter by `ids`, `workspace_ids`). | `{ folders: [{ id, name, color }] }` | > | `create_folder` | Create a folder in `workspace_id` (`name`; optional `color`, `parent_folder_id`). | `{ id, name }` | > | `update_folder` | Rename or recolor `folder_id`. | `{ id }` | > | `delete_folder` | Delete `folder_id` (its contents move to the workspace root). | `{ id }` | > > ### Meta & Admin > > | Instruction | Description | Returns | > | - | - | - | > | `activity_logs` | Activity log of `board_ids`, filtered by `from`/`to`, `user_ids`, `column_ids`, `group_ids`, `item_ids`. | `{ activity_logs: [{ id, event, created_at }] }` | > | `board_views` | List views configured on `board_id`. | `{ views: [{ id, name, type }] }` | > | `account` | Account meta (name, slug, tier, members, logo). | `{ id, name, slug, tier }` | > | `account_products` | Products installed on the account (CRM, Dev, Service, WM, …). | `{ products: [...] }` | > | `complexity` | Remaining complexity budget of the API token (per-minute). | `{ complexity: { after, reset_in_x_seconds } }` | > | `version` | API version currently served. | `{ version }` | > | `graphql` | Run a raw monday.com GraphQL `query` (with optional `variables`): the escape hatch for endpoints with no dedicated instruction. | `{ data, account_id }` | > > > [!NOTE] > > > > `Returns` shows the shape of the operation output (the underlying monday.com GraphQL resource). > > ## DSUL Examples > > ### Create a Board With an Item > > ```yaml theme={null} > - Monday.create_board: > board_name: Q2 Roadmap > board_kind: private > workspace_id: '{{workspace_id}}' > output: board > - Monday.create_item: > board_id: '{{board.id}}' > item_name: Ship onboarding revamp > group_id: topics > column_values: > status: > label: Working on it > date: > date: 2026-05-15 > create_labels_if_missing: true > output: item > ``` > > ### Update a Status Column > > ```yaml theme={null} > - Monday.change_simple_column_value: > board_id: '{{board_id}}' > item_id: '{{item_id}}' > column_id: status > value: Done > output: result > ``` > > ### Post an Update and Notify a User > > ```yaml theme={null} > - Monday.create_update: > item_id: '{{item_id}}' > body:

Deployed to staging.

> output: update > - Monday.create_notification: > user_id: '{{owner_id}}' > target_id: '{{item_id}}' > text: Staging is ready for review > target_type: Project > ``` > > ### Paginate Items of a Board > > ```yaml theme={null} > - Monday.items_page: > board_ids: > - '{{board_id}}' > limit: 100 > output: firstPage > - Monday.items_page: > board_ids: > - '{{board_id}}' > cursor: '{{firstPage.cursor}}' > output: nextPage > ``` > > ### Run a Raw GraphQL Query > > ```yaml theme={null} > - Monday.graphql: > query: 'query ($ids: [ID!]) { boards (ids: $ids) { id name owners { id } } }' > variables: > ids: > - '{{board_id}}' > output: raw > ``` *** ## Security The answers that hold for every connector (agent access, shared knowledge bases, credentials, models, egress) are on [Connector security](/apps-store/marketplace/connectors/security). This section lists what is specific to monday.com. | Topic | monday.com | | - | - | | Authentication family | Delegated OAuth (authorization code with PKCE): each user connects their own monday.com account. | | Production modes | `oauthCentral` or `oauth` | | Modes to avoid in production | `accessToken` (testing only: a personal API token does not expire, and every caller acts as the owner of the token) | | Read-only scopes | `boards:read`, `docs:read`, `updates:read`, `users:read`, `workspaces:read`, `webhooks:read`, `assets:read`, `me:read`, `account:read`, `teams:read`, `tags:read` (the **Read-only preset** of the configuration app). The default scopes include every `:write` scope and `notifications:write`. | | Agent allowlist | Yes, on the tenant endpoint (empty at installation). The global endpoint accepts every agent. | | Per-reader access control on knowledge bases | Not applicable: this connector does not feed knowledge bases. | | Outbound hosts | `api.monday.com`, `auth.monday.com` | | Audit events | None specific to this connector | With the read-only scopes, monday.com refuses every mutation, including the account administration ones such as inviting users, deactivating users or deleting workspaces. The OAuth app registered in the monday.com Developer Center must list every scope the connector requests. *** ## Error Handling | HTTP Status | Error | Solution | | - | - | - | | 401 | Unauthorized | The monday.com token is missing, invalid or expired. Reconnect via the config app (OAuth modes), or regenerate the Personal API Token in *Developer center > My access tokens*. | | 403 | Forbidden | Check the board/workspace permissions of the connected user or token owner. | | 404 | Not Found | Verify board, item, group, column or doc IDs (call the parent list tool first). | | 422 | Unprocessable | Invalid column value or argument shape; see Common Issues. | | 429 | Rate Limited | monday.com enforces a per-minute complexity budget; call `complexity` to inspect it and back off. | | 500 | Server error | Transient monday.com error; retry shortly. | ### Common Issues **"This agent is not authorized to use this connector"**: The calling agent is not in the allowlist. Open the configuration app → **Authorized agents** → tick this agent (id is shown in the error) or enable **Allow all agents**, and Save. The **Install capability** button does this for you. **"The calling agent could not be identified"**: The MCP capability *Scope* does not declare `agent_id`, so Agent Creator never injects the agent identity. Set the Scope to `context_id,agent_id,user_id` on the capability (this is separate from the monday.com OAuth scopes), then allow the agent in the config app. **"monday.com is not connected for this user"**: No per-user OAuth token is stored for the caller. Open the configuration app (OAuth mode) and click **Connect**, or use the agent's connect flow. In the `accessToken` mode, paste a Personal API Token in the config app instead. **"monday.com token refresh failed … must reconnect"**: The stored refresh token was rejected by monday.com (revoked / expired). The connection is dropped automatically; the user must reconnect from the config app. **"monday.com OAuth is not configured"**: Neither a tenant OAuth client nor the central platform client is available. Set the OAuth client id/secret in the config app (tenant mode), or ask the platform maintainer to provision the central OAuth client from the core workspace's config app. **"Complexity budget exceeded"**: monday.com rate limits by query complexity, not request count. Large `items_page` calls can exhaust the budget quickly. Paginate with smaller `limit`, or fetch fewer columns. **"Invalid column value"**: The payload shape depends on the column type. Prefer `change_simple_column_value` for simple types (text, numbers, status) and `change_column_value` for complex ones (people, dropdown, timeline). `create_labels_if_missing` only applies to `status` and `dropdown` columns. ## External Resources > [card] [monday.com API](https://developer.monday.com/api-reference) > > Official monday.com API reference. > [card] [Column Value Formats](https://developer.monday.com/api-reference/reference/column-types-reference) > > Per-column-type payload reference. > [card] [monday.com Webhooks](https://developer.monday.com/api-reference/reference/webhooks) > > Webhook events and payloads. > [card] [Tool Agents](/products/agent-factory/capabilities) > > Learn how Agent Creator agents consume MCP tools in Prisme.ai. # Odoo Source: https://docs.prisme.ai/apps-store/marketplace/connectors/odoo Read-only access to Odoo models, records and server-side aggregates from Agent Creator agents and Builder workflows, with the API key of an Odoo service account ![Odoo](https://mintcdn.com/prismeai/0mzLeOTgo2mcefdN/images/connectors/odoo.png?fit=max\&auto=format\&n=0mzLeOTgo2mcefdN\&q=85\&s=278a832dd337b8266176a13721228e9b) The Odoo app gives **read-only** access to an [Odoo](https://www.odoo.com) instance (Odoo 18) through its [external API](https://www.odoo.com/documentation/18.0/developer/reference/external_api.html), with the API key of a dedicated service account. It is generic: it reads any standard or custom model you allow, from contacts and products to sales orders, stock lots or `x_` models. It can be consumed two ways: as a remote MCP server that **Agent Creator** agents call through six read tools (discover models, describe fields, resolve a name, read records, aggregate, count), or as a Builder app whose instructions you call directly from DSUL. It runs in the **tenant app-instance context**: each workspace enters its own Odoo URL, database, login and API key in the connector's configuration app, resolved server-side and never exposed to the agent. Agents are identified by the capability **Scope** `context_id,agent_id,user_id` and gated by a per-workspace authorized-agents allowlist. > [card] Any Odoo model > > Discover the readable models, list their fields, then read records with an Odoo domain: standard and custom models alike. > [card] Server-side aggregates > > Totals, averages and counts grouped by field or period are computed by Odoo (`read_group`), so the agent never sums thousands of rows itself. > [card] Read-only by design > > Only read methods are allowed, in code. A model allowlist and the Odoo rights of the service account apply on top. ## Video tutorial This two-minute tutorial shows the connector end to end: connecting the Odoo instance and choosing the readable models in the configuration app, authorizing agents, then asking an agent to count records, explore a model, compute a yearly revenue indicator, and refuse a deletion because the connector is read-only. Use the buttons in the top-right corner of the player to switch the narration language and the subtitles. The sections on the left are clickable. Screens show the English interface; narration and subtitles are available in English and French. ## Who is this for? This connector is used by three different roles. Jump to the section that matches yours; each one is self-contained. > [card] Agent builder > > You build agents in **Agent Creator** and want them to answer questions from Odoo data. → *Agent builder* tab. > [card] Platform admin > > You run the platform and want to know what to set up once for everyone. → *Platform admin setup* accordion below. > [card] Workspace builder > > You write Builder automations (DSUL) that read Odoo directly. → *Workspace builder* tab. ## Prerequisites * An **Odoo 18** instance (Odoo Online, Odoo.sh or on-premise) whose plan gives access to the external API. On Odoo Online, the external API requires the **Custom** pricing plan. * A **dedicated service account** in Odoo (an internal user), with **read rights only** on the data agents may use. The connector applies the Odoo rights of this account as-is. * An **API key** for that account: log in as the service account, open **Preferences → Account Security → New API Key**, choose a duration and copy the key (Odoo shows it once). Note its expiry date: the configuration app warns 30 days before it. * The **database name**. On Odoo.sh it differs from the sub-domain and is shown on the branch page; on-premise, it is the database selected at login. > [!NOTE] > > The connector never writes, even if the service account has write rights. A read-only account is still the recommended setup: it keeps the guarantee on the Odoo side too. > [accordion] Platform admin (Governance): one-time platform setup > > **Goal:** Odoo is a **per-workspace** connector: each workspace enters its own Odoo connection in the connector's configuration app (see the *Workspace builder* tab), so there is **no platform-wide credential to provision** and **no central OAuth client**. > > > [!NOTE] > > > > There is no shared Odoo credential for this connector. The URL, database, login, API key and readable models always live in the consuming workspace's secrets, written by the connector's configuration app. The platform operator has nothing to register centrally. > > ## Declare the capability in AI Governance (optional) > > If you want agent builders to pick Odoo from the capability catalog instead of pasting an MCP endpoint URL by hand, expose it as a reusable **capability** in AI Governance, pointing at the MCP endpoint of the workspace that runs the connector. > > **1. Open AI Governance > Capabilities** > > Create (or edit) the **Odoo** capability. > > **2. Point it at the MCP endpoint** > > Set the capability's MCP server URL to the **MCP endpoint** of the workspace running the connector (shown in the configuration app, **Agents** tab), and set its **Scope** to: > > ```text theme={null} > context_id,agent_id,user_id > ``` > > The `agent_id` in the scope is what lets the connector identify and authorize the calling agent. > > **3. Make it available to agent builders** > > Once created, the capability appears in the capability picker for agent builders in your organization. Access to the catalog follows your organization's existing roles; there is **no per-capability role grant** for this tenant-context connector. > > > [!NOTE] > > > > The connector's configuration app also offers a one-click **Add to catalog** button (**Agents** tab) that publishes the capability to the organization-wide Capabilities catalog for you. It requires catalog write rights in your organization. > > > [!WARNING] > > > > Declaring the capability makes the connector **available** to agent builders; it does not authorize a specific agent and does not provision any Odoo credential. Per-agent gating remains the config-app **authorized-agents allowlist**, and the Odoo connection still lives in the workspace running the connector. There is **no OAuth auth-config JSON** to attach here: authentication is a server-side Odoo API key, not a per-user OAuth flow. *** > [tab] Agent builder (Agent Creator) > > ## Agent builder > > **Goal:** let an agent you build in Agent Creator answer questions from Odoo data through the six read-only MCP tools. > > > [!NOTE] > > > > Before an agent can call the connector, a *Workspace builder* must have installed and configured the Odoo app in a workspace (see the *Workspace builder* tab), or a *Platform admin* must have published an Odoo capability in AI Governance (see the *Platform admin setup* accordion above). > > This connector runs in the **tenant app-instance context**: your agent is identified by the `agent_id` that Agent Creator injects through the capability *Scope*, and that agent must appear in the connector's **authorized-agents allowlist** (managed in the configuration app). The Odoo credentials themselves are resolved server-side and never exposed to the agent. > > **1. Install and configure the connector in your workspace** > > Follow the *Workspace builder* tab: install **Odoo** in your workspace, open its **Configuration app**, fill the Odoo connection and the readable models in the **Authentication** tab, then click **Test connection**. > > **2. Allowlist your agent** > > In the configuration app, open the **Agents** tab and tick your agent under **Authorized agents**, or enable **Allow all agents**. > > **3. Add the MCP capability to your agent** > > Next to the ticked agent, click **Install capability**: it adds the Odoo capability to the agent with the right endpoint and Scope. To wire it by hand instead, add a capability pointing at the **MCP endpoint** shown in the same tab, and set its **Scope** to: > > ```text theme={null} > context_id,agent_id,user_id > ``` > > The `agent_id` is what lets the connector identify and authorize your agent; without it, every call is rejected with an explicit "agent could not be identified" message. > > **4. Brief the agent** > > Tell the agent the tools exist and in which order to use them (see *Brief the agent in its system prompt* below). > > > [!NOTE] > > > > **Org-wide alternative: Add to catalog.** Instead of installing the capability agent by agent, click **Add to catalog** in the **Agents** tab to publish Odoo to the organization-wide Capabilities catalog (see the *Platform admin setup* accordion). Agent builders then enable it from the catalog with the endpoint and Scope already wired; each agent must still be allowlisted. > > ## Brief the agent in its system prompt > > Odoo model and field names are technical (`sale.order`, `partner_id`, `amount_untaxed`). A short brief avoids the agent guessing them: > > ```text theme={null} > You can read Odoo through the Odoo MCP server. It is read-only: you cannot create, modify or delete anything. > - Never guess a model or a field name. Use odoo_list_models to find the model, then odoo_describe_model to get its exact field names. > - When the user names a customer, a product or a lot, turn the name into ids with odoo_resolve before filtering on it. > - For totals, averages or evolutions, use odoo_aggregate (Odoo computes them). Do not read records to add them up yourself. > - Use odoo_count when the volume is unknown, then odoo_search_read with only the fields you need, paging with offset. > - If a model is refused, say it is not in the connector allowlist; do not try another model to work around it. > ``` > > > [!NOTE] > > > > **Read-only by design.** The connector only calls Odoo read methods (`search_read`, `read`, `read_group`, `search_count`, `fields_get`, `name_search`). This list is in the code, not in the configuration: no setting can open a write, whatever the rights of the service account. Least privilege comes from two further layers you control: the **readable models** allowlist in the configuration app, and the Odoo access rights of the service account. Keep both as narrow as the use case allows. > > > [!NOTE] > > > > **Legacy AI Knowledge agents** (no native MCP picker): add the connector under **Advanced > Tools > MCP** and paste the **MCP endpoint** URL. The agent still has to be allowlisted in the configuration app and its identity propagated so the connector can read its `agent_id`. > > ## Available Tools > > ### Discovery > > | Tool | Description | > | - | - | > | `odoo_list_models` | Find Odoo models the connector may read, by technical name or label (e.g. "sale", "lot", "x\_"). Only models in the connector allowlist are returned. | > | `odoo_describe_model` | List the fields of an Odoo model (`fields_get`) with their type, label and related model. | > | `odoo_resolve` | Find records of a model from a free text, the way Odoo search boxes do (`name_search`). Returns ids and display names. | > > ### Reading > > | Tool | Description | > | - | - | > | `odoo_search_read` | Read records of an Odoo model matching a domain. The list of fields is mandatory; the number of records is capped (default 50, max 200). | > | `odoo_aggregate` | Aggregate records on the server (`read_group`): sums, averages, counts grouped by fields or periods. | > | `odoo_count` | Count the records of an Odoo model matching a domain, without reading them. | > > ## Output Formats > > Every tool returns its result as JSON text in a standard MCP tool result. On failure, the result is flagged `isError` and its text explains what to fix (see *Error Handling*). > > * **`odoo_list_models`**: `{ models: [{ model, name }], total, truncated }`. > * **`odoo_describe_model`**: `{ fields: [{ name, type, label, relation?, required?, stored? }], total, truncated }`, sorted by name, 400 fields at most. > * **`odoo_resolve`**: `[{ id, name }]`. > * **`odoo_search_read`**: `{ records: [...], count, limit, offset, more }`. Relational fields come as `[id, display name]`, as in Odoo. > * **`odoo_aggregate`**: `{ groups: [{ , , __count }], count }`. > * **`odoo_count`**: `{ count }`. > > Answers are capped at about 20,000 characters. A longer answer is cut, with a hint to narrow the query (fewer fields, a stricter domain, a lower limit). > > ## Tool Details > > ### odoo\_search\_read > > Read records matching an [Odoo domain](https://www.odoo.com/documentation/18.0/developer/reference/backend/orm.html#search-domains). > > ```json theme={null} > { > "name": "odoo_search_read", > "arguments": { > "model": "sale.order", > "domain": [["state", "=", "sale"], ["date_order", ">=", "2026-01-01"]], > "fields": ["name", "partner_id", "date_order", "amount_total"], > "order": "date_order desc", > "limit": 20 > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `model` | Yes | Technical model name, e.g. `sale.order`. | > | `fields` | Yes | Field names to return (1 to 50). | > | `domain` | No | Odoo domain. Empty means every record. | > | `limit` | No | Maximum number of records (default 50, max 200). | > | `offset` | No | Number of records to skip, for paging. | > | `order` | No | Sort order, e.g. `date_order desc`. | > > ### odoo\_aggregate > > Let Odoo compute totals, averages and counts, optionally grouped by fields or by date periods (`date:day`, `date:week`, `date:month`, `date:quarter`, `date:year`). > > ```json theme={null} > { > "name": "odoo_aggregate", > "arguments": { > "model": "sale.order", > "domain": [["state", "=", "sale"]], > "measures": ["amount_untaxed:sum"], > "groupby": ["date_order:year"], > "orderby": "date_order:year asc" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `model` | Yes | Technical model name, e.g. `sale.report`. | > | `measures` | Yes | Aggregates as `field:function`, e.g. `["price_subtotal:sum", "price_unit:avg"]`. | > | `domain` | No | Odoo domain restricting the records aggregated. | > | `groupby` | No | Grouping fields, with an optional period for dates, e.g. `["date:year", "partner_id"]`. Empty returns one total. | > | `orderby` | No | Sort order of the groups, e.g. `date:year asc`. | > | `limit` | No | Maximum number of groups (default 100, max 200). | > > ### odoo\_resolve > > Turn a name typed by the user into record ids, before filtering on them. > > ```json theme={null} > { > "name": "odoo_resolve", > "arguments": { > "model": "res.partner", > "text": "Azure Interior", > "domain": [["customer_rank", ">", 0]], > "limit": 5 > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `model` | Yes | Technical model name, e.g. `res.partner` or `product.product`. | > | `text` | Yes | Text to look for in the record name. | > | `domain` | No | Extra Odoo domain, e.g. `[["customer_rank", ">", 0]]`. | > | `limit` | No | Maximum number of matches (default 10, max 20). | > > ### odoo\_describe\_model > > List the fields of a model so the agent requests existing field names only. > > ```json theme={null} > { > "name": "odoo_describe_model", > "arguments": { > "model": "sale.order", > "query": "partner" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `model` | Yes | Technical model name, e.g. `sale.order`. | > | `query` | No | Keep only fields whose name or label contains this text, e.g. `date` or `partner`. | > [tab] Workspace builder (DSUL) > > ## Workspace builder > > **Goal:** install the connector in a workspace, configure the Odoo connection, the readable models and the agent allowlist through its configuration app, and call its instructions from your automations. > > ## Installation > > 1. Go to **Apps** in your workspace > 2. Search for **Odoo** and install it > 3. Open the **Configuration app** (the link auto-populated on install), fill the Odoo connection and the readable models in the **Authentication** tab, click **Save** then **Test connection**, and allow the agents that may call the connector in the **Agents** tab > > ## Configuration > > | Field | Description | > | - | - | > | **Configuration app** | Auto-populated on install; open this link to set the Odoo connection and the readable models, and to manage the authorized-agents allowlist. | > > The configuration app drives everything; the app instance itself has no per-field credential form. Each value below is stored as a workspace secret and resolved server-side at call time. > > | Configuration app field | Description | > | - | - | > | **Odoo URL** | Base URL of the instance, e.g. `https://mycompany.odoo.com`. | > | **Database** | Name of the Odoo database. On Odoo.sh it differs from the sub-domain. | > | **Service account login** | Login of the Odoo service account. | > | **API key** | API key of the service account. Stored as a secret and masked in the activity feed. | > | **API key expiry date** | Optional. Used to warn 30 days before the key expires, and to flag an expired key. | > | **Readable models** | One model per line (or comma-separated). `stock.*` matches every model whose name starts with `stock.`; `*` allows every model the service account can read. Empty: nothing is readable. | > | **Authorized agents** (Agents tab) | The agents allowed to call the MCP endpoint, or **Allow all agents**. | > > This connector uses a single auth mode: > > | Auth mode | What you provide | Best for | > | - | - | - | > | **Service account API key** | Odoo URL, database, login and API key of a dedicated service account | All workspaces; each connects its own Odoo instance; no platform-level setup | > > > [!NOTE] > > > > **Test connection** checks that Odoo answers at the URL, then authenticates with the saved values and shows the Odoo version and the service account's user id. Only a workspace owner, editor or admin can run it. > > ## Available Instructions > > Every instruction resolves the Odoo connection from the workspace configuration and enforces the same guards as the MCP tools: read methods only, readable-models allowlist, bounded answers. On failure, an instruction returns `{ error }` instead of raising. > > ### Discovery > > | Instruction | Description | Returns | > | - | - | - | > | `listModels` | Readable models matching `query` (technical name or label); empty lists every readable model. `limit` default 50, max 200. | `{ models: [{ model, name }], total, truncated }` | > | `describeModel` | Fields of `model` (`fields_get`), optionally filtered by `query` on name or label. | `{ fields: [{ name, type, label, relation?, required?, stored? }], total, truncated }` | > | `resolve` | Records of `model` whose name matches `text` (`name_search`), with an optional extra `domain`. `limit` default 10, max 20. | `[{ id, name }]` | > > ### Reading > > | Instruction | Description | Returns | > | - | - | - | > | `searchRead` | Records of `model` matching `domain`, with the mandatory `fields` list (1 to 50). `limit` default 50, max 200; `offset` and `order` for paging and sorting. | `{ records: [...], count, limit, offset, more }` | > | `aggregate` | Server-side `read_group` on `model`: `measures` as `field:function`, optional `groupby` (with `:year`, `:month`… for dates), `orderby`, `limit` default 100, max 200. | `{ groups: [{ , , __count }], count }` | > | `count` | Number of records of `model` matching `domain` (`search_count`). | `{ count }` | > > > [!NOTE] > > > > `Returns` shows the shape of the operation output. The MCP tools wrap the same operations in an MCP tool-result envelope. > > ## DSUL Examples > > Count the confirmed sales orders of the year: > > ```yaml theme={null} > - Odoo.count: > model: sale.order > domain: > - ['state', '=', 'sale'] > - ['date_order', '>=', '2026-01-01'] > output: confirmed > ``` > > Read the latest orders with only the fields you need: > > ```yaml theme={null} > - Odoo.searchRead: > model: sale.order > domain: > - ['state', '=', 'sale'] > fields: > - name > - partner_id > - date_order > - amount_total > order: date_order desc > limit: 20 > output: orders > ``` > > Untaxed revenue of confirmed orders, per year, computed by Odoo: > > ```yaml theme={null} > - Odoo.aggregate: > model: sale.order > domain: > - ['state', '=', 'sale'] > measures: > - amount_untaxed:sum > groupby: > - date_order:year > orderby: date_order:year asc > output: revenue > ``` > > Resolve a customer by name, then read its open invoices, and branch on errors: > > ```yaml theme={null} > - Odoo.resolve: > model: res.partner > text: '{{customerName}}' > limit: 1 > output: matches > - conditions: > '{{matches.error}} or !{{matches[0].id}}': > - emit: > event: odoo.customer.notFound > payload: > customerName: '{{customerName}}' > default: > - Odoo.searchRead: > model: account.move > domain: > - ['partner_id', '=', '{{matches[0].id}}'] > - ['move_type', '=', 'out_invoice'] > - ['payment_state', '!=', 'paid'] > fields: > - name > - invoice_date_due > - amount_residual > output: invoices > ``` *** ## Error Handling The connector does not raise: failures come back as an explicit message, as an `isError` tool result over MCP or as `{ error }` from a DSUL instruction. Odoo tracebacks are never forwarded. | Message starts with | Typical cause | | - | - | | `The Odoo connection is not configured` | URL, database, login or API key missing in the configuration app | | `Odoo refused the connection` | Wrong login, database or API key, or the key expired or was revoked | | `Odoo could not be reached at this URL` | Wrong URL (Test connection only) | | `Odoo is unreachable right now` | Odoo returned HTTP 5xx or did not answer; transient, try again later | | `Model "…" is not in the connector allowlist` | The model is not in **Readable models** | | `Method "…" is not allowed: this connector is read-only` | A write was attempted; no setting can allow it | | `The Odoo service account is not allowed to read this data` | Odoo `AccessError`: the service account lacks the read right | | `Odoo rejected the query` | Unknown field or invalid domain | | `Record not found in Odoo` | The record does not exist or was deleted | | `fields is required` / `measures is required` / `domain must be an array` | Invalid tool arguments | ### Common Issues * **"This agent is not authorized to use the Odoo connector"**: The calling agent is not in the allowlist. Open the configuration app → **Agents** → tick this agent under **Authorized agents** (or enable **Allow all agents**). * **"The calling agent could not be identified"**: The MCP capability *Scope* does not declare `agent_id`, so Agent Creator never injects the agent identity. Set the Scope to `context_id,agent_id,user_id` on the capability (the **Install capability** button does it), then allow the agent in the configuration app. * **"Odoo refused the connection"**: Run **Test connection** in the configuration app. Check the database name first (on Odoo.sh it is not the sub-domain), then the login, then the key. An Odoo API key cannot be read back: if it expired or was lost, generate a new one from the service account's **Preferences → Account Security** and paste it. * **"The Odoo service account is not allowed to read this data"**: the model is in the allowlist, but Odoo's own rights refuse it. Grant the service account the matching read access in Odoo (user groups, record rules), or remove the model from **Readable models**. * **`odoo_list_models` returns allowlist patterns instead of models**: Odoo restricts the model registry (`ir.model`) to administrators, and a read-only service account usually cannot list it. The connector then answers from the allowlist itself, so a pattern such as `stock.*` appears as is; the agent can still call `odoo_describe_model` on a concrete model such as `stock.lot`. * **Service-specific gotcha**: relational fields (`partner_id`, `product_id`…) return the display name of the related record even when the related model is not in the allowlist. This is standard Odoo behaviour: the connector never reads the related record itself, but if a display name is sensitive, restrict the field through the service account's Odoo rights. ## External Resources > [card] [Odoo External API](https://www.odoo.com/documentation/18.0/developer/reference/external_api.html) > > Odoo 18 external API reference: authentication, API keys and `execute_kw`. > [card] [Odoo search domains](https://www.odoo.com/documentation/18.0/developer/reference/backend/orm.html#search-domains) > > Syntax of the domains used by every read tool. > [card] [Tool Agents](/products/agent-factory/capabilities) > > How Agent Creator agents consume MCP tools and capabilities. # OneNote Source: https://docs.prisme.ai/apps-store/marketplace/connectors/onenote Microsoft OneNote notebooks, sections and page text for Agent Factory agents and Builder workflows, through Microsoft Graph with delegated per-user authentication ![OneNote](https://mintcdn.com/prismeai/jDuuC5Ig3n8FokTz/images/connectors/onenote.svg?fit=max\&auto=format\&n=jDuuC5Ig3n8FokTz\&q=85\&s=e4dd86a3fa92f60106bb6bb670a37933) The OneNote app provides read/write access to [Microsoft OneNote](https://www.onenote.com) through the [Microsoft Graph](https://learn.microsoft.com/graph/integrate-with-onenote) v1.0 REST API. It can be consumed two ways: as a remote MCP server that **Agent Factory** agents call as tools, or as a Builder app whose instructions you call directly from DSUL. The MCP surface groups every operation into **five entity tools** (`notebooks`, `sectionGroups`, `sections`, `pages`, `locations`), each driven by an `action` argument, and runs in the **tenant app-instance context** (it resolves the installing workspace's own credentials). The same tree is also exposed as **MCP Resources**, so a knowledge base can be pointed at a whole notebook or at a single section. Authentication is **always delegated** — Microsoft withdrew app-only authentication from the Graph OneNote API on 31 March 2025 — so Microsoft 365 permissions apply exactly as they stand: a caller reads and writes only what their own account could. Three modes are available: * **Per-user OAuth2 with a central client** (`oauthCentral`, default): one Microsoft Entra application is registered once by the platform maintainer; every end user signs in with their own Microsoft 365 account. Nothing to register per tenant — each workspace installs the app and clicks *Connect*. * **Per-user OAuth2 with a tenant client** (`oauth`): paste your own Entra client ID/secret in the connector configuration app. Each user signs in with their own account against your application (PKCE authorization-code flow). * **Direct access token** (`accessToken`): a caller-managed Graph access token, used as-is with no exchange. > [card] Read the whole tree > > Browse notebooks, section groups and sections across personal, group and SharePoint site locations, and read a page's full text as Markdown > [card] Write back > > Create notebooks, section groups, sections and pages, patch a page's content, delete a page and copy items between containers > [card] Feed a knowledge base > > The same tree is published as MCP Resources, so a whole notebook or a single section can be indexed and queried semantically OneNote content is a four-level tree, and every tool argument follows it: ```mermaid theme={null} flowchart LR L["Location
me / group / site / user"] --> N["Notebook"] N --> G["Section group
(optional, nestable)"] N --> S["Section"] G --> S S --> P["Page
(the text)"] ``` ## Who is this for? This connector is used by four different roles. Jump to the section that matches yours; each one is self-contained. > [card] Agent builder > > You build agents in **Agent Factory** and want them to read and write OneNote. → *Agent builder* tab. > [card] Knowledge base owner > > You want OneNote pages indexed and searchable semantically, kept up to date. → *Knowledge base (sync)* tab. > [card] Platform admin > > You run the platform and set up the shared Microsoft Entra application once for everyone. → *Platform admin setup* accordion below. > [card] Workspace builder > > You write Builder automations (DSUL) that call OneNote operations directly. → *Workspace builder* tab. ## Prerequisites (Microsoft side) * A **Microsoft 365** account with OneNote (personal OneDrive notebooks, Microsoft 365 group / Teams notebooks and SharePoint site notebooks are all reachable). * A **Microsoft Entra** application registration (single- or multi-tenant), with the **Microsoft Graph delegated** permissions the connector requests. There is no application-permission path: app-only authentication was removed from the Graph OneNote API on 31 March 2025, so a client-credentials configuration is refused with an explicit message rather than silently failing on Graph. * Admin consent may be required in your tenant for `Notes.*` and `Sites.Read.All`, depending on your consent policy. The OAuth scopes requested by default are: ```text theme={null} offline_access https://graph.microsoft.com/User.Read https://graph.microsoft.com/Notes.ReadWrite.All https://graph.microsoft.com/Sites.Read.All ``` `offline_access` is what makes Entra issue a refresh token; without it, scheduled knowledge-base syncs for that user cannot run. `Sites.Read.All` is only needed to *locate* SharePoint site notebooks (`locations` tool); drop it if you only work with personal and group notebooks. > [accordion] Platform admin (Governance): one-time platform setup > > **Goal:** two one-time tasks: (1) configure the shared **central Entra application** so every workspace lets its users sign in with their own Microsoft 365 account, and (2) expose OneNote as a reusable **capability** in AI Governance so agent builders can pick it without pasting endpoint URLs. > > ## 1. Configure the connector > > **1. Register the application in Microsoft Entra** > > In the [Entra admin center](https://entra.microsoft.com) open **Identity > Applications > App registrations > New registration**. Add a **Web** redirect URI pointing at the core workspace callback: > > ```text theme={null} > /workspaces//webhooks/oauthCallback > ``` > > (e.g. `https://api.studio.prisme.ai/v2/workspaces/Kk431UO/webhooks/oauthCallback` on production, where `Kk431UO` is the id of the `one-note` core workspace). > > > [!WARNING] > > > > Use the workspace **raw id**, not the `slug:one-note` form. Microsoft Entra rejects the `:` in a redirect URI whatever the encoding, and truncates the URI before it — the sign-in then fails with a redirect-URI mismatch that gives no hint about the cause. > > Under **API permissions**, add the Microsoft Graph **delegated** permissions listed in *Prerequisites* and grant admin consent. Under **Certificates & secrets**, create a client secret. Keep the **Application (client) ID**, the **client secret** and, for a single-tenant application, the **directory (tenant) ID**. > > **2. Enter the credentials through the configuration app** > > Open the central `one-note` workspace and launch its **Configuration app** at `/apps/one-note` (e.g. `https://studio.prisme.ai/apps/one-note`), also linked as `Configuration app` on the installed instance. Its **Maintainer** view asks for the **Client ID**, the **client secret**, the **tenant** and the default **scopes**; the app stores them in the core workspace's secrets for you. Do not edit Studio's raw Secrets by hand. These credentials stay in the `one-note` workspace and are never exposed to tenants or end users: the token exchange is proxied through the core `centralTokenExchange` webhook, so the client secret never leaves the core workspace. > > **3. Tell workspaces to use the central client** > > Each consuming workspace selects auth mode **`oauthCentral`** in the connector configuration app (no client id/secret to enter on their side). Their users then just click **Connect**. A tenant may narrow the scopes it asks for, but never widen them beyond the scopes the central application itself declares. > > ## 2. Declare the capability in AI Governance > > Generic connectors (broad tool surfaces meant to be shared across many agents, like OneNote) are best exposed as a named **capability** in AI Governance. Agent builders then enable that capability on their agents instead of pasting a raw MCP endpoint. > > **1. Open AI Governance > Capabilities** > > Create (or edit) the **OneNote** capability. > > **2. Point it at the MCP endpoint** > > Set the capability's MCP server URL to the connector's **MCP Endpoint**, and set its **Scope** to: > > ```text theme={null} > context_id,agent_id,user_id > ``` > > The `agent_id` in the scope is what lets the connector identify and authorize the calling agent. > > **3. Make it available to agent builders** > > Once created, the capability appears in the capability picker for agent builders in your organization, who enable it on their agents. Access to the catalog follows your organization's existing roles; there is no per-capability role grant. > > **4. Smoke-test** > > From an agent that has the capability, in a workspace configured for `oauthCentral`, call `locations` with `action: "me"`. The user is prompted to connect once (Microsoft sign-in); subsequent calls reuse the stored token transparently and refresh it automatically. The response names the Microsoft 365 account the connector is acting as — the fastest way to confirm which identity is in play. > > > [!WARNING] > > > > Declaring the capability makes the connector **available**; it does not by itself authorize a specific agent. This connector follows the **tenant-context model**: which agents may actually call it is gated per-workspace by the **authorized-agents allowlist** in the configuration app (see the *Workspace builder* tab). Agents show a **Connect** button only if the catalog entry carries the connector's connect / status / disconnect webhooks in its `auth` block. The configuration app's **Add to catalog** button writes it for you. If you create the entry by hand, paste that block into **Auth Configuration**: the platform adds it later on its own only for a workspace endpoint (ending in `.mcp`), never for the connector's global `/webhooks/mcp` endpoint. *** > [tab] Agent builder (Agent Factory) > > ## Agent builder > > **Goal:** let an agent you build in Agent Factory read and write OneNote through MCP tools. > > > [!NOTE] > > > > Before an agent can call the connector, a *Workspace builder* must have installed and configured the OneNote app in a workspace (see the *Workspace builder* tab), and, for the central OAuth mode, a *Platform admin* must have provisioned the shared Entra application (see the *Platform admin setup* accordion above). > > This connector runs in the **tenant app-instance context**: your agent is authorized two ways at once — it is identified by the `agent_id` that Agent Factory injects through the capability *Scope*, and that agent must appear in the connector's **authorized-agents allowlist** (managed in the configuration app). The Microsoft Graph token itself is resolved server-side from the configured auth mode, and it is always the **signed-in user's own** token: the agent sees exactly the notebooks that person can already open, no more. > > **1. Install and configure the connector in your workspace** > > Follow the *Workspace builder* tab: install **OneNote** in your workspace, open its **Configuration app**, choose the auth mode and connect a Microsoft 365 account. The config app displays and copies the workspace's **MCP Endpoint**. > > **2. Allowlist your agent** > > In that workspace's config app, open **Authorized agents** and tick your agent (the **Install capability** button does this for you). An agent that is not listed is refused with an explicit message. > > **3. Add the MCP capability to your agent** > > In your agent, add a capability pointing at your workspace's **MCP Endpoint** URL, and set its **Scope** to: > > ```text theme={null} > context_id,agent_id,user_id > ``` > > The `agent_id` is what lets the connector identify and authorize your agent; without it, every call is rejected with an explicit "agent could not be identified" message. This *Scope* is separate from the Microsoft Graph OAuth scopes. > > **4. Connect a Microsoft 365 account** > > On the first tool call, an unconnected user is prompted to sign in; Agent Factory surfaces a `connect_url`. The `accessToken` mode needs no interactive sign-in. > > **5. Brief the agent in its system prompt** > > Wiring the capability is not enough; the agent must know the MCP exists and when to use it. Copy-pasteable starter: > > ```text theme={null} > You have access to the OneNote MCP server (tools: notebooks, sectionGroups, sections, pages, locations). Each tool takes an `action` argument. Use it whenever the user asks about their OneNote notebooks, sections or pages: listing, locating, reading page text, creating or updating. OneNote has NO full-text search — to answer on what is inside pages, narrow the list by title or date with `pages/list`, then read with `pages/getContent`. Notebooks belonging to a Microsoft 365 group or a SharePoint site need `scope` and `scopeId`; use the `locations` tool to find those ids first. Confirm with the user before any write (create, updateContent, delete, copy). > ``` > > > [!WARNING] > > > > **Microsoft Graph has no full-text search on OneNote.** `titleContains` and OData `$filter` match **titles and metadata only** — never page content. An agent that must answer questions about what is *written inside* pages should query a knowledge base fed by this connector's MCP Resources (see the *Knowledge base (sync)* tab); the live tools are for locating, reading and writing known pages. > > > [!NOTE] > > > > **Legacy AI Knowledge agents** (no native MCP picker): add the connector under **Advanced > Tools > MCP** and paste the **MCP Endpoint** URL. The agent still has to be allowlisted in the config app and its identity propagated so the connector can read its `agent_id`. > > > [!NOTE] > > > > **Restricting to read-only (least privilege).** The OneNote tools cover both reads and writes (`create`, `createPage`, `updateContent`, `delete`, `copy*`). The requested OAuth scopes **are** the grant, so the connector only obtains what the **Scopes** field in the configuration app asks for. To allow only read access, set a read-only scope list: > > > > ```text theme={null} > > offline_access https://graph.microsoft.com/User.Read https://graph.microsoft.com/Notes.Read.All https://graph.microsoft.com/Sites.Read.All > > ``` > > > > With central OAuth (`oauthCentral`) you do **not** create your own Entra application; keep `oauthCentral` and just enter the read-only scopes — the tenant scope narrows the platform default (it can never widen it beyond what the central application declares). Write calls are then rejected by Microsoft with `403`, while the connection itself stays healthy because every connection check is a read. Note this is set at the workspace level: a workspace editor can widen it again; restricting the permissions of the Entra application, or of the connected account, is the only hard guarantee. > > > > Beware of the intermediate `Notes.Create` scope: it allows creating a page but **not** updating or deleting one, and Microsoft answers `403` with error `40004` in that case. > > ## Available Tools > > Each tool takes an `action` argument selecting the concrete operation, plus the per-action parameters. The four content tools share `scope` (`me` — the default — `group`, `site` or `user`) and `scopeId`, which say **where** the notebooks live. > > | Tool | Description | > | - | - | > | `notebooks` | OneNote notebooks. Actions: `list`, `get`, `listSections`, `listSectionGroups`, `listRecent`, `create`, `createSection`, `createSectionGroup`, `copy`, `copyStatus`. | > | `sectionGroups` | The optional folder level between a notebook and its sections. Actions: `list`, `get`, `listSections`, `listSubGroups`, `createSection`, `createSubGroup`. | > | `sections` | The containers that hold pages. Actions: `list`, `get`, `listPages`, `createPage`, `copyToNotebook`, `copyToSectionGroup`, `copyStatus`. | > | `pages` | Pages, including their full text. Actions: `list`, `get`, `getContent`, `getPreview`, `create`, `updateContent`, `delete`, `copyToSection`, `copyStatus`. | > | `locations` | Where notebooks live — read-only. Actions: `listGroups`, `searchSites`, `getSite`, `me`. | > > > [!NOTE] > > > > **The write surface stops where Graph's does.** Microsoft Graph offers **no delete and no rename** for a notebook, a section group or a section: those methods simply do not exist. `pages/delete` is the only delete on the whole OneNote API. Copies are asynchronous: they answer immediately and are polled with `copyStatus` using the `operationId` returned by the copy. > > ## Output Formats > > Every tool accepts an `outputFormat` argument that controls the MCP response shape: > > * **`verbose`** (default): human-readable text optimized for LLM consumption > * **`structured`**: concise machine-readable JSON in `structuredContent` > * **`both`**: the text block and the structured payload together > > ## Tool Details > > ### pages > > ```json theme={null} > { > "name": "pages", > "arguments": { > "action": "getContent", > "pageId": "1-a1b2c3d4e5f6...", > "maxChars": 200000 > } > } > ``` > > `getContent` returns the page as **Markdown**, headed by its title, notebook, section, section author, dates and a link to open it in OneNote. OneNote stores pages as HTML; the connector converts it (headings, lists, pipe tables) so the text chunks cleanly for retrieval. > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | One of `list`, `get`, `getContent`, `getPreview`, `create`, `updateContent`, `delete`, `copyToSection`, `copyStatus`. | > | `pageId` | For get/getContent/getPreview/updateContent/delete/copyToSection | Target page id. | > | `sectionId` | For create | Section the page is created in. | > | `html` | For create | The page as OneNote-flavoured HTML. Include `…` or the page is created untitled. | > | `commands` | For updateContent | Non-empty **array** of patch commands `{ target, action, content, position? }` (`target`: `body`, `title` or an element id; `action`: `append`, `insert`, `prepend`, `replace`, `delete`). | > | `titleContains` | No | Case-insensitive substring on the page **title**. Does not search page content. | > | `maxChars` | No | `getContent` only: cap on the returned text (default 200000). | > | `scope` / `scopeId` | No / when scope ≠ `me` | Graph root owning the pages: `me`, `group`, `site` or `user`, plus the matching id. | > > ### notebooks > > ```json theme={null} > { > "name": "notebooks", > "arguments": { > "action": "list", > "scope": "group", > "scopeId": "2d5f...", > "titleContains": "roadmap", > "top": 20 > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | One of `list`, `get`, `listSections`, `listSectionGroups`, `listRecent`, `create`, `createSection`, `createSectionGroup`, `copy`, `copyStatus`. | > | `notebookId` | For get/listSections/listSectionGroups/createSection/createSectionGroup/copy | Target notebook id. | > | `displayName` | For create/createSection/createSectionGroup | Name of the notebook, section or section group to create. | > | `body` | For copy | `{ groupId?, renameAs? }`. There is **no destination id**: a notebook copy lands in the caller's own OneDrive unless `groupId` says otherwise. | > | `operationId` | For copyStatus | Last segment of the `operationLocation` returned by the copy. | > | `titleContains` | No | Case-insensitive substring on the notebook **name**. | > | `top` / `skip` / `select` / `filter` / `orderby` / `expand` | No | OData paging and shaping (`$top` max 100, default 20). | > > ### sections > > ```json theme={null} > { > "name": "sections", > "arguments": { > "action": "createPage", > "sectionId": "1-9f8e...", > "html": "Weekly report

Ready.

" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | One of `list`, `get`, `listPages`, `createPage`, `copyToNotebook`, `copyToSectionGroup`, `copyStatus`. | > | `sectionId` | For get/listPages/createPage/copyTo\* | Target section id. | > | `html` | For createPage | The page as OneNote-flavoured HTML, sent as `text/html`. | > | `body` | For copyTo\* | `{ id: , groupId?, renameAs? }`. | > | `pagelevel` | No | `listPages` only: also return each page's indentation level and order. | > | `titleContains` | No | On the section **name** for `list`, on the page **title** for `listPages`. | > > > [!NOTE] > > > > Unlike a page, a **section does carry `createdBy` / `lastModifiedBy`**. Graph exposes no author on a page (only `createdByAppId`), so whenever a name is shown next to a page it is the section's last modifier, and it is labelled as such — never presented as the page's author. > > ### locations > > ```json theme={null} > { > "name": "locations", > "arguments": { > "action": "searchSites", > "search": "marketing", > "top": 10 > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | One of `listGroups`, `searchSites`, `getSite`, `me`. | > | `search` | For searchSites | Site keyword; `"*"` lists all reachable sites. | > | `siteId` | For getSite | Site id, or a path of the form `hostname:/sites/`. | > | `skiptoken` | No | Pagination token (`searchSites`, `listGroups`), taken from the previous response. | > > Use this tool **first** whenever the notebooks are not the signed-in user's own: `listGroups` returns the ids that feed `scope: group`, `searchSites` those that feed `scope: site`. A site created moments ago may not be searchable yet — `/sites?search=` is served by the SharePoint search index, which takes minutes to hours; address it by path with `getSite` in the meantime. > [tab] Workspace builder (DSUL) > > ## Workspace builder > > **Goal:** install the connector in a workspace, configure authentication and the agent allowlist, and call OneNote operations from your automations. > > ## Installation > > 1. Go to **Apps** in your workspace > 2. Search for **OneNote** and install it > 3. Open the **Configuration app** (the link auto-populated on install) to choose the auth mode, connect a Microsoft 365 account, and allow the agents that may call the connector > > ## Configuration > > | Field | Description | > | - | - | > | **Configuration app** | Auto-populated on install; open this link to configure authentication (mode + credentials), connect a Microsoft 365 account, manage the authorized-agents allowlist, and copy the MCP endpoint. | > | **Microsoft Graph API version** | `v1.0` (default) or `beta`. The base URL becomes `https://graph.microsoft.com/`. | > | **Knowledge-sync** | Delegated MCP Resource access settings. `trustedCallers` lists the workspace slugs allowed to browse on a named user's behalf; it ships pre-filled with the Knowledge Sync workspace so a scheduled sync is recognized without any configuration. | > > The configuration app drives everything; the app instance itself has no per-field credential form. From it you pick one of: > > | Auth mode | What you provide | Best for | > | - | - | - | > | `oauthCentral` | Nothing; just click **Connect** | Workspaces on a platform where the admin set up the central Entra application | > | `oauth` | Your own Entra **Client ID + Secret** (+ tenant), with redirect URI `/workspaces//webhooks/.oauthCallback` | You manage your own Entra application | > | `accessToken` | A pre-minted Microsoft Graph **access token** | Short-lived / caller-managed tokens | > > > [!NOTE] > > > > Credentials are provisioned into the workspace's Secrets by the `onInstall` flow and resolved server-side. The agent allowlist (**Authorized agents**) gates which Agent Factory agents may call the MCP endpoint; see the *Agent builder* tab. There is no application-identity mode: `clientCredentials` is explicitly refused, because Microsoft removed app-only authentication from the Graph OneNote API on 31 March 2025. > > ## Available Instructions > > Every instruction resolves credentials from the workspace configuration. The four content categories share the `scope` (`me`, `group`, `site`, `user`) and `scopeId` arguments, and the OData shaping arguments `top`, `skip`, `select`, `filter`, `orderby`, `expand`. The MCP server exposes the same operations behind the five entity tools (see the *Agent builder* tab). > > ### Notebooks > > | Instruction | Description | Returns | > | - | - | - | > | `listNotebooks` | List the notebooks at a location; narrow with `titleContains` (substring on the name) or a raw OData `filter`. | `{ value: [ Notebook ], "@odata.nextLink" }` | > | `getNotebook` | Fetch one notebook by `notebookId`. | A Notebook resource `{ id, displayName, createdBy, lastModifiedBy, links, sectionsUrl, … }`. | > | `listNotebookSections` | List the sections directly inside a notebook, by `notebookId`. | `{ value: [ Section ] }` | > | `listNotebookSectionGroups` | List the section groups directly inside a notebook, by `notebookId`. | `{ value: [ SectionGroup ] }` | > | `listRecentNotebooks` | The signed-in user's most recently opened notebooks, across every location. | `{ value: [ RecentNotebook { displayName, lastAccessedTime, links } ] }` | > | `createNotebook` | Create a notebook from `displayName`. | The created Notebook `{ id, displayName, links }`. | > | `createNotebookSection` | Create a section inside a notebook: `notebookId` + `displayName`. | The created Section `{ id, displayName, pagesUrl }`. | > | `createNotebookSectionGroup` | Create a section group inside a notebook: `notebookId` + `displayName`. | The created SectionGroup `{ id, displayName }`. | > | `copyNotebook` | Copy a notebook (asynchronous); `body` = `{ groupId?, renameAs? }`. Without `groupId` the copy lands in the caller's own OneDrive. | `{ operationLocation }` (HTTP 202) — poll with `getCopyStatus`. | > > ### Section Groups > > | Instruction | Description | Returns | > | - | - | - | > | `listSectionGroups` | List every section group at a location, nested ones included. | `{ value: [ SectionGroup ] }` | > | `getSectionGroup` | Fetch one section group by `sectionGroupId`. | A SectionGroup resource `{ id, displayName, parentNotebook, sectionsUrl, … }`. | > | `listSectionGroupSections` | List the sections directly inside a section group, by `sectionGroupId`. | `{ value: [ Section ] }` | > | `listSectionGroupSubGroups` | List the section groups nested inside a section group, by `sectionGroupId`. | `{ value: [ SectionGroup ] }` | > | `createSectionGroupSection` | Create a section inside a section group: `sectionGroupId` + `displayName`. | The created Section `{ id, displayName, pagesUrl }`. | > | `createSectionGroupSubGroup` | Create a nested section group: `sectionGroupId` + `displayName`. | The created SectionGroup `{ id, displayName }`. | > > ### Sections > > | Instruction | Description | Returns | > | - | - | - | > | `listSections` | List every section at a location, those inside section groups included. | `{ value: [ Section ] }` | > | `getSection` | Fetch one section by `sectionId`. This is where an author comes from — a section carries `createdBy` / `lastModifiedBy`. | A Section resource `{ id, displayName, createdBy, lastModifiedBy, parentNotebook, … }`. | > | `listSectionPages` | List the pages of a section by `sectionId`, most recently modified first; `pagelevel` adds indentation level and order. | `{ value: [ Page ], "@odata.nextLink" }` | > | `copySectionToNotebook` | Copy a section into a notebook (asynchronous); `body` = `{ id: , groupId?, renameAs? }`. | `{ operationLocation }` (HTTP 202) — poll with `getCopyStatus`. | > | `copySectionToSectionGroup` | Copy a section into a section group; `body` = `{ id: , groupId?, renameAs? }`. | `{ operationLocation }` (HTTP 202) — poll with `getCopyStatus`. | > > ### Pages > > | Instruction | Description | Returns | > | - | - | - | > | `listPages` | List the pages at a location, most recently modified first; `titleContains` filters on the **title** only. | `{ value: [ Page { id, title, createdDateTime, lastModifiedDateTime, links } ], "@odata.nextLink" }` | > | `getPage` | Fetch one page's metadata by `pageId`; `pagelevel` adds its indentation level and order. | A Page resource `{ id, title, contentUrl, parentSection, parentNotebook, links }`. | > | `getPagePreview` | A short (\~300 character) snippet of a page by `pageId`, plus a preview image link when there is one. | `{ previewText, links: { previewImageUrl } }` | > | `createPage` | Create a page in a section: `sectionId` + `html`, posted as `text/html`. The `` element becomes the page title. | The created Page `{ id, title, contentUrl, links }`. | > | `updatePageContent` | Patch a page by `pageId` with `commands`, an **array** of `{ target, action, content, position? }`. | Empty (HTTP 204). | > | `deletePage` | Delete a page by `pageId`. The only delete Microsoft Graph offers on OneNote. | Empty (HTTP 204). | > | `copyPageToSection` | Copy a page into another section (asynchronous); `body` = `{ id: <sectionId>, groupId? }`. | `{ operationLocation }` (HTTP 202) — poll with `getCopyStatus`. | > > > [!NOTE] > > > > A page's **full text** is deliberately not an App instruction: it is served by the MCP tool `pages` with `action: "getContent"` and by the MCP Resources surface, both of which convert OneNote's HTML into Markdown. From DSUL, read a page's `contentUrl`, or query the knowledge base fed by the connector. > > ### Locations > > | Instruction | Description | Returns | > | - | - | - | > | `listMyGroups` | The Microsoft 365 groups and Teams the signed-in user belongs to; their ids feed `scope: group`. Needs only `User.Read`. | `{ value: [{ id, displayName, mail, groupTypes }], "@odata.nextLink" }` | > | `searchSites` | The SharePoint sites the user can reach; `search` is a keyword, `"*"` lists all. Their ids feed `scope: site`. | `{ value: [{ id, name, displayName, webUrl }], "@odata.nextLink" }` | > | `getSite` | Fetch one site by composite id or by `hostname:/sites/<name>` — the way to reach a site the search index has not picked up yet. | A Site resource `{ id, displayName, webUrl }`. | > | `getMe` | The signed-in user's profile: which Microsoft 365 account the connector is acting as. | `{ id, displayName, userPrincipalName, mail }` | > > ### Copy status > > | Instruction | Description | Returns | > | - | - | - | > | `getCopyStatus` | Poll an asynchronous copy by `operationId` — the last segment of the `operationLocation` returned by any `copy*` instruction. | `{ id, status: "NotStarted"\|"Running"\|"Completed"\|"Failed", resourceLocation, error? }` | > > ## Feeding a knowledge base > > The same workspace instance also serves the connector's **MCP Resources** surface, which is what a knowledge base syncs from — including the `knowledgeSync.trustedCallers` setting above. That flow is covered in the *Knowledge base (sync)* tab; nothing extra has to be installed for it. > > ## DSUL Examples > > **Find a notebook by name in a Microsoft 365 group:** > > ```yaml theme={null} > - OneNote.listMyGroups: > top: 50 > output: groups > - OneNote.listNotebooks: > scope: group > scopeId: '{{groups.value[0].id}}' > titleContains: roadmap > output: notebooks > ``` > > **Walk a notebook down to its pages:** > > ```yaml theme={null} > - OneNote.listNotebookSections: > notebookId: '{{notebookId}}' > output: sections > - OneNote.listSectionPages: > sectionId: '{{sections.value[0].id}}' > top: 20 > orderby: lastModifiedDateTime desc > output: pages > ``` > > **Create a section, then a page inside it:** > > ```yaml theme={null} > - OneNote.createNotebookSection: > notebookId: '{{notebookId}}' > displayName: 'Weekly reports' > output: section > - OneNote.createPage: > sectionId: '{{section.id}}' > html: '<html><head><title>{{reportTitle}}

{{reportBody}}

' > output: page > ``` > > > [!WARNING] > > > > Let a freshly created section settle before posting pages into it. OneNote provisions the section asynchronously, and a page created immediately afterwards can lose its `` and end up untitled. > > **Append a paragraph to an existing page:** > > ```yaml theme={null} > - OneNote.updatePageContent: > pageId: '{{pageId}}' > commands: > - target: body > action: append > content: '<p>Reviewed on {{reviewDate}}.</p>' > ``` > > **Copy a page into another section and wait for the result:** > > ```yaml theme={null} > - OneNote.copyPageToSection: > pageId: '{{pageId}}' > body: > id: '{{targetSectionId}}' > output: copy > - OneNote.getCopyStatus: > operationId: '{{copy.operationId}}' > output: status > ``` > [tab] Knowledge base (sync) > > ## Knowledge base > > **Goal:** index OneNote pages into a knowledge base so an agent can search their **content**, and keep that base up to date automatically. > > > [!NOTE] > > > > Before a base can be attached, a *Workspace builder* must have installed and configured the OneNote app in a workspace and connected a Microsoft 365 account (see the *Workspace builder* tab). Nothing else is needed: the same app instance serves both the agent tools and the sync surface. The **Authorized agents** allowlist does **not** apply here — it gates the connector as an agent *tool*, and has no effect on synchronization. > > ## Why a knowledge base rather than the tools > > Microsoft Graph offers **no full-text search** on OneNote. `titleContains` and OData `$filter` reach titles, names and dates — never what is written inside a page. Answering "what did we decide about X?" over a corpus of notebooks is therefore not a job for the live tools: it is a retrieval job, and the connector exists on the sync side for exactly that. The tools remain the right call to locate, read and write a *known* page. > > ## How it fits together > > The connector publishes the OneNote tree as **MCP Resources**; Knowledge Sync browses it, diffs it, and hands pages to the base: > > ```mermaid theme={null} > flowchart LR > Graph["Microsoft Graph<br/>OneNote"] > Conn["OneNote connector<br/>MCP resources"] > Sync["Knowledge Sync<br/>browse · diff · index"] > KB["Knowledge base<br/>vector store"] > Agent["Agent"] > > Sync -->|"resources/list · resources/read"| Conn > Conn -->|"delegated Graph calls"| Graph > Sync -->|"Markdown documents"| KB > Agent -->|"search"| KB > Agent -.->|"per-reader access check"| Sync > ``` > > The resource tree mirrors the OneNote hierarchy, and any container level can be picked as a sync root — a whole location, a notebook, a section group or a single section: > > ```text theme={null} > onenote://owner/{me|groups|sites} > onenote://group/{groupId} > onenote://site/{siteId} > onenote://{owner}/notebook/{notebookId} > onenote://{owner}/sectionGroup/{sectionGroupId} > onenote://{owner}/section/{sectionId} > onenote://{owner}/page/{pageId} > ``` > > The owner is part of the identity: a OneNote id is only resolvable relative to its Graph root, so the same page under `me` and under a group is not the same URI. > > ## Attach the connector to a base > > **1. Copy the MCP endpoint** > > Open the connector's **Configuration app** in the workspace where it is installed; it displays and copies that workspace's MCP endpoint: > > ```text theme={null} > <api-url>/workspaces/<workspace-id>/webhooks/<app-instance>.mcp > ``` > > **2. Create the connection in Knowledges** > > Go to **Knowledges → Connectors → New Connection → Your own MCP server**, paste the endpoint and click **Check**. On success the dialog names the provider (`one-note`) and the levels you will be able to browse. > > **3. Browse to the root you want to sync** > > Walk down from the top level — personal notebooks, groups, sites — to the notebook, section group or section you want, and confirm with **Use this location**. Everything below the selected root is synced, nested containers included. > > **4. Pick the destination and sync** > > Choose an existing knowledge base or create one from the same step, then click **Sync Now**. Large sources are spread over several runs; the schedule (*Hourly* to *Daily*, under **Auto-sync**) finishes the job. > > The full wizard, the run history and the connection settings are documented once for every provider in [Knowledges → Connectors](/products/ai-knowledge/connectors). This tab covers only what is specific to OneNote. > > > [!NOTE] > > > > A connection carrying its own endpoint is **private to whoever attached it**: nothing is published to the organization's catalog, and no colleague sees it. If a platform admin has instead published OneNote as a capability (see the *Platform admin setup* accordion), it also appears under **Available Providers**, and each person then signs in with their own Microsoft 365 account when creating a connection. > > ## Who may sync, and who may read > > | Moment | Acts as | Authorized by | > | - | - | - | > | Attaching the connection, browsing the tree | You | Your **role on the workspace** holding the connector's configuration — the right to read that workspace is the right to read this OneNote through it | > | A scheduled sync run | No user at all | The calling workspace must be listed in `knowledgeSync.trustedCallers`; the Knowledge Sync workspace ships there by default | > | Answering a reader's question | The reader | A live per-reader access check (`pages/checkAccess`) against Microsoft Graph | > > Because every Graph call is **delegated**, the sync only ever reads what the connected Microsoft 365 account can already open — there is no application identity that could reach more. > > > [!NOTE] > > > > **Per-user access control is supported and worth keeping on.** The connector declares an access tool, so each reader's own rights are re-checked in OneNote at query time: an explicit `200` from Graph allows the page, denials stay denied, and a provider failure **fails closed** rather than leaking. A reader with no usable token is asked to connect their account instead of silently getting nothing. Turning the setting off serves every synced page to anyone who can query the agent, whatever their OneNote rights. > > > [!NOTE] > > > > **Sync only reads.** A read-only scope set (`Notes.Read.All`, plus `Sites.Read.All` to reach site notebooks) is enough for the whole synchronization path — see *Restricting to read-only* in the *Agent builder* tab. If the consent screen mentions write permissions, they come from the connector's use as an agent tool, not from the sync. > > ## What gets indexed > > A OneNote page has no downloadable file and no pre-authenticated URL, so the connector converts its HTML to **Markdown** and returns the text inline as `text/markdown`. That is deliberate on two counts: the platform's indexable-format list does not include `text/html`, and a retriever chunks far better on headings, lists and pipe tables than on a wall of prose. > > Each document opens with a header carrying its **title, notebook, section, section author, dates and OneNote link**, then the page content. The sync engine forwards only a citation URL to the store, so anything that must survive into the base has to be in the text itself — which is why that header is part of the document rather than metadata. > > | Aspect | Behavior | > | - | - | > | Document unit | One OneNote **page** = one document. Notebooks, section groups and sections are containers, never indexed themselves. | > | Format | `text/markdown`, converted from OneNote's HTML subset (headings, nested lists, pipe tables, links preserved). | > | Size ceiling | 200 000 characters per page; beyond it the text is cut on a line boundary and the document says so explicitly. | > | Images & attachments | Cannot travel inline: replaced by a visible `[image]` / `[attachment: name]` marker so a reader is told something was there. | > | Revision marker | `lastModifiedDateTime`. Unchanged pages are never re-read and never re-indexed. | > | Deletions | Graph exposes no OneNote delta feed, so each run is a **full traversal**: a page absent from a complete listing is removed from the base. A listing that failed halfway deletes nothing. | > | Untitled pages | Very common — every page created through the API without a `<title>` is untitled. Listing names them `Untitled page <short id>` so they stay distinguishable, and reading recovers the real title from the first heading of the content. | > > > [!NOTE] > > > > **The Knowledge profile this connector declares** — the descriptor Knowledges probes at `onenote://profile/knowledge`: > > > > | Field | Value | > > | - | - | > > | `provider` | `one-note` | > > | `hierarchy` | `location` › `notebook` › `sectionGroup` › `section` › `page` | > > | `canonical_uri` | `onenote://{owner}/page/{pageId}` | > > | `revision.primary` | `lastModifiedDateTime` | > > | `read` | Inline text only, 200 000 characters max; no binary | > > | `list` | 50 resources per page by default, 100 max; `delta_on_drive: false` | > > | `access` | Tool `pages`, action `checkAccess` | > > | `authentication` | `oauth`, `oauthCentral`, `accessToken` — delegated only | > > ## Troubleshooting the sync > > **The URL check says "You are not allowed to read it"**: you have no role on the workspace holding the connector's configuration. Ask its administrator for one — this is not about your OneNote rights. > > **The URL check says "It answered, but could not serve its content"**: the connector itself is not fully configured. Open its configuration app and connect a Microsoft 365 account. > > **A browsing column is empty on a notebook that has sections**: a notebook's children live in two Graph collections (section groups, then sections), and most notebooks have no section group at all. The connector skips an empty collection within the same call, so this should not happen — if it does, reload the wizard step rather than assuming the notebook is empty. > > **A page is missing from the base**: check it is a page and not an attachment, that it is under the selected root, and that the connected account can open it in OneNote. A page whose content fetch was refused by Graph (throttling, or a page the token may list but not open) is reported as a synchronization error rather than indexed as its own error message. > > **Every page re-indexes on each run**: expected only on the first runs. `lastModifiedDateTime` changes when a page is edited in OneNote — including by an automated edit, so a bot touching pages daily makes them re-index daily. > > **A scheduled sync stops after a right was revoked**: the role check runs on the interactive paths only. A scheduled run is authorized as the platform's synchronization workspace, so revoking someone's access does not stop it — delete the connection to stop it for certain. *** ## Security The answers that hold for every connector (agent access, shared knowledge bases, credentials, models, egress) are on [Connector security](/apps-store/marketplace/connectors/security). This section lists what is specific to OneNote. | Topic | OneNote | | - | - | | Authentication family | Delegated OAuth (Microsoft Entra, authorization code with PKCE): each user connects their own Microsoft 365 account. App-only authentication does not exist for OneNote. | | Production modes | `oauthCentral` or `oauth` | | Modes to avoid in production | `accessToken` (testing only, and a Graph access token expires after about an hour) | | Read-only scopes | `offline_access`, `User.Read`, `Notes.Read.All`, `Sites.Read.All` (the **read-only** preset of the configuration app). The default scopes include `Notes.ReadWrite.All`. | | Agent allowlist | Yes, on the tenant endpoint (empty at installation). The global endpoint accepts every agent. | | Per-reader access control on knowledge bases | Yes: each page is checked against the reader's own Microsoft 365 connection. | | Outbound hosts | `graph.microsoft.com`, `login.microsoftonline.com` | | Audit events | `onenote.tool.called`, `onenote.graph.called`, `onenote.write.denied` (see below) | With the read-only scopes, Microsoft itself refuses every create, update, copy and delete call. Also restrict the Graph permissions consented on the Entra application registration: Entra can issue a token carrying permissions consented earlier. The two audit events name each call without its content: | Event | Emitted | Payload | | - | - | - | | `onenote.tool.called` | Once per MCP tool call | `tool`, `action`, `operation`, `agentId` | | `onenote.graph.called` | Once per Microsoft Graph request, including knowledge base reads and per-reader access checks | `operation`, `method`, `path` (without query string), `status` | The event source carries the user, and a tool call shares its `correlationId` with the Graph calls it leads to. The `agentId` is the one declared by the calling agent. A write attempt without a user identity is refused and reported as `onenote.write.denied`. *** ## Error Handling | HTTP code | Meaning | | - | - | | `400` | Bad request: invalid parameters, malformed OData filter, or a `commands` payload that is not a non-empty array. | | `401` | Unauthorized: the Microsoft Graph access token is missing, expired or revoked. The user must reconnect (OAuth modes). | | `403` | Forbidden: the token lacks the scope this call needs — reading takes `Notes.Read.All`, writing takes `Notes.ReadWrite.All` (`Notes.Create` only allows creating, error `40004`), listing SharePoint sites takes `Sites.Read.All`. Set the scopes in the configuration app, then disconnect and reconnect so Microsoft issues a new token. | | `404` | Not found: the notebook, section group, section or page id does not exist, or is not visible to the connected account — or the id was used against the wrong `scope`. | | `409` | Conflict: a container with that name already exists at this level. | | `429` | Throttled by Microsoft Graph: back off and retry, honouring `Retry-After`. | | `500` / `503` | Graph service error: transient; retry shortly, no reconnection needed. | ### Common Issues **"This agent is not authorized to use this connector"**: The calling agent is not in the allowlist. Open the configuration app → **Authorized agents** → tick this agent (or enable **Allow all agents**) and Save. **"The calling agent could not be identified"**: The MCP capability *Scope* does not declare `agent_id`, so Agent Factory never injects the agent identity. Set the Scope to `context_id,agent_id,user_id` on the capability, then allow the agent in the config app. **"OneNote is not connected for this user"**: No per-user OAuth token. Open the configuration app (OAuth mode) and click **Connect**, or use the agent's connect flow. **"Microsoft token refresh failed … must reconnect"**: The stored refresh token was revoked or expired. Entra **rotates** refresh tokens, and only issues one at all when `offline_access` is among the requested scopes — a connection made without it works interactively but cannot be refreshed for scheduled syncs. The user must reconnect from the config app. **"Microsoft Graph not authenticated" / "OAuth is not configured"**: Neither a tenant Entra application nor the central platform client is available. Set the client id/secret in the config app, or ask the platform maintainer to provision the central application. **"OneNote cannot be read with an application identity"**: The workspace is configured for `clientCredentials`. There is no such path: Microsoft withdrew app-only authentication from the Graph OneNote API on 31 March 2025. Use a delegated OAuth mode — each person connects their own Microsoft 365 account and sees exactly the notebooks they already have access to. **A search for a phrase inside pages returns nothing**: expected. Graph indexes no OneNote page content, so `titleContains` and `$filter` only ever match titles, names and dates. Narrow with `pages/list` then read with `pages/getContent`, or query a knowledge base fed by the connector. **Pages come back untitled**: a OneNote page very often has an empty `title` — every page created through the API without a `<title>` element does. The connector names such pages by a short suffix of their id when listing, and recovers the real title from the first heading of the content when reading. Always give `createPage` a `<head><title>…`. ## External Resources > [card] [Microsoft Graph OneNote API](https://learn.microsoft.com/graph/integrate-with-onenote) > > Official reference for the OneNote resources, permissions and HTML page format on Microsoft Graph v1.0. > [card] [Tool Agents](/products/agent-factory/capabilities) > > Learn how Agent Factory agents consume MCP tools in Prisme.ai. # Outlook Source: https://docs.prisme.ai/apps-store/marketplace/connectors/outlook Outlook mail, calendar and contacts from Agent Creator agents and Builder workflows, via Microsoft Graph with per-user Microsoft Entra OAuth ![Outlook](https://mintcdn.com/prismeai/Oqq72tWGTtxufvRl/images/connectors/outlook.png?fit=max\&auto=format\&n=Oqq72tWGTtxufvRl\&q=85\&s=9fe387aa1be3bd1ea4fcdf0d3bfda49f) The Outlook app provides read/write access to a Microsoft 365 mailbox (mail, calendar and contacts) through the [Microsoft Graph](https://learn.microsoft.com/en-us/graph/overview) REST API (v1.0). It can be consumed two ways: as a remote MCP server that **Agent Creator** agents call as tools, or as a Builder app whose instructions you call directly from DSUL. The MCP surface groups every operation into **six entity tools** (`mail`, `mailFolders`, `calendars`, `events`, `contacts`, `contactFolders`), each driven by an `action` argument, and runs in the **tenant app-instance context** (it resolves the installing workspace's own credentials). Authentication is per-user and supports several modes: * **Per-user OAuth2, central client** (`oauthCentral`, recommended): one Microsoft Entra OAuth Application is registered once by the platform maintainer; every end user signs in with their own Microsoft account. Nothing to register per tenant: each workspace just installs the app and clicks *Connect*. * **Per-user OAuth2, tenant client** (`oauth`): paste your own Entra application (client) ID/secret in the connector config app. Each user signs in with their own account against your client (PKCE authorization-code flow). * **Application, client credentials** (`clientCredentials`): an Entra app with **application** Graph permissions and admin consent, acting on a target mailbox without an interactive sign-in. Best for back-office / service automations. * **Direct access token** (`accessToken`): a caller-managed Microsoft Graph access token, used as-is with no exchange. > [card] Mail > > Read, search, draft, send, reply, forward and move messages and attachments; browse and manage mail folders > [card] Calendar & contacts > > List, create and update calendar events, respond to meeting invites and query a time window; manage personal contacts and contact folders > [card] Flexible per-user auth > > Per-user Microsoft Entra OAuth (central or tenant client), application client-credentials, or a direct access token ## Who is this for? This connector is used by four different roles. Jump to the section that matches yours; each one is self-contained. > [card] Agent builder > > You build agents in **Agent Creator** and want them to read and act on Outlook mail, calendar and contacts. → *Agent builder* tab. > [card] Knowledge base owner > > You want a mail folder indexed and searchable semantically, kept up to date. → *Knowledge base (sync)* tab. > [card] Platform admin > > You run the platform and set up the shared Microsoft Entra OAuth client once for everyone. → *Platform admin setup* accordion below. > [card] Workspace builder > > You write Builder automations (DSUL) that call Outlook operations directly. → *Workspace builder* tab. ## Prerequisites (Microsoft side) * A **Microsoft 365** account, and an **Azure / Microsoft Entra ID** tenant where you can register an application (or a maintainer who already did). * An **app registration** in [Microsoft Entra ID](https://entra.microsoft.com) (Azure portal → **App registrations**), with a **client secret** created under **Certificates & secrets**, or a certificate (see *Certificate instead of a client secret*). * **Microsoft Graph delegated permissions** granted on the app (for the per-user OAuth modes), covering the resources you intend to use: * Mail: `Mail.ReadWrite`, `Mail.Send` — drafts, including reply and forward drafts, only need `Mail.ReadWrite`: leave `Mail.Send` out of the grant and agents can prepare mail but never send it. * Calendar: `Calendars.ReadWrite` * Contacts: `Contacts.ReadWrite` * Sign-in / identity: `User.Read`, `openid`, `profile`, `offline_access` * For the **application (client-credentials)** mode instead, grant the equivalent **application** permissions and have a Global Administrator grant admin consent. The OAuth scopes requested by default are: ```text theme={null} offline_access openid profile https://graph.microsoft.com/Mail.ReadWrite https://graph.microsoft.com/Mail.Send https://graph.microsoft.com/Calendars.ReadWrite https://graph.microsoft.com/Contacts.ReadWrite https://graph.microsoft.com/User.Read ``` > [accordion] Platform admin (Governance): one-time platform setup > > **Goal:** two one-time tasks: (1) configure the shared **central Microsoft Entra OAuth client** so every workspace lets its users sign in with their own Microsoft account, and (2) expose Outlook as a reusable **capability** in AI Governance so agent builders can pick it without pasting endpoint URLs. > > ## 1. Configure the connector > > **1. Register the OAuth Application in Microsoft Entra ID** > > In [Microsoft Entra ID](https://entra.microsoft.com) → **App registrations > New registration**, register a **Web** application. Add a **Redirect URI** pointing at the core workspace callback: > > ```text theme={null} > /workspaces//webhooks/oauthCallback > ``` > > (e.g. `https://api.studio.prisme.ai/v2/workspaces/08QVA1T/webhooks/oauthCallback` on production). > > > [!WARNING] > > > > Microsoft Entra rejects redirect URIs that contain a colon in the path, so use the **raw workspace id** of the core Outlook workspace (``, e.g. `08QVA1T`), **not** the `slug:outlook-next` form used by other connectors. Copy the exact URI from the connector's configuration app, which renders it for you. > > Add the Microsoft Graph **delegated** permissions listed in *Prerequisites*, create a **client secret** under **Certificates & secrets**, and note the **Application (client) ID**, the **secret value**, and the **Directory (tenant) ID** (or use `common` / `organizations` for multi-tenant). > > **2. Enter the credentials through the configuration app** > > Open the central `outlook-next` workspace and launch its **Configuration app**: `/apps/outlook-next` (e.g. `https://studio.prisme.ai/apps/outlook-next`), also linked as `Configuration app` on the installed instance. Switch to the maintainer view and follow the in-app instructions to paste the **Client ID**, **Client Secret**, **Tenant** and (optionally) scopes and a [Microsoft Graph base URL](#routing-microsoft-graph-through-an-api-gateway); the app stores them in the core workspace's secrets for you. Do not edit Studio's raw Secrets by hand. These credentials stay in the `outlook-next` workspace and are never exposed to tenants or end users; token exchange is proxied through the core `centralTokenExchange` webhook so the client secret never leaves the core workspace. > > **3. Tell workspaces to use the central client** > > Each consuming workspace selects auth mode **`oauthCentral`** in the connector configuration app (no client id/secret to enter on their side). Their users then just click **Connect**. > > ### Certificate instead of a client secret > > Microsoft recommends certificate credentials over client secrets: a secret expires after at most 24 months and is easy to copy. In certificate mode the connector signs each token request with a private key (a `client_assertion` JWT, PS256). The key never goes through Prisme.ai's database or UI: the platform operator injects it into the runtime from your key store, as an environment variable. > > **1. Upload the certificate to Entra** > > In the app registration → **Certificates & secrets > Certificates**, upload the public certificate (`.cer`, `.pem` or `.crt`). > > **2. Inject the private key into the runtime** > > The value is a PEM bundle, base64-encoded on one line: the **unencrypted** RSA private key (2048 to 4096 bits) and the certificate uploaded to Entra, in any order. Chain certificates may stay in the bundle: the connector picks the certificate that matches the key and reads its thumbprint, so key and certificate always change together. Azure Key Vault's PEM export already has this layout. > > ```bash theme={null} > cat key.pem cert.pem | openssl base64 -A > ``` > > Expose it to the `prismeai-runtime` pods under this exact name (a [`WORKSPACE_SECRET_` variable](/products/ai-builder/workspaces#environment-variables)): > > | Profile | Environment variable | > | - | - | > | Central client (this section) | `WORKSPACE_SECRET_outlook-next_outlookNextCentralCertKey` | > | A workspace's own client (`oauth` or `clientCredentials` mode) | `WORKSPACE_SECRET__outlookNextCertKey` | > > The configuration app shows the exact name to use, and the maintainer view shows whether the runtime holds the central key. The workspace slug is kept as is, dashes included. Renaming the workspace changes the name: set the new variable before renaming, or the connector stops authenticating. Restart the runtime pods after setting or changing the variable. > > For example, with the [External Secrets Operator](https://external-secrets.io) reading from your KMS: > > ```yaml theme={null} > apiVersion: external-secrets.io/v1beta1 > kind: ExternalSecret > metadata: > name: outlook-next-cert > spec: > secretStoreRef: > name: my-kms-store > kind: ClusterSecretStore > target: > name: outlook-next-cert > data: > - secretKey: WORKSPACE_SECRET_outlook-next_outlookNextCentralCertKey > remoteRef: > key: outlook-next/central-cert-key-b64 > ``` > > Then add `outlook-next-cert` to the runtime deployment's `envFrom`. > > > [!WARNING] > > > > Never create a workspace secret with the same name (`outlookNextCentralCertKey` / `outlookNextCertKey`): a stored secret hides the environment variable. Never use an `APP_SECRET_…` variable either, as it would hand the key to every instance of the connector on the platform. > > **3. Switch the connector to certificate mode** > > In the configuration app, set **Client authentication** to **Certificate**. The central client is configured from the maintainer view; a workspace's own client from its own configuration app. If the key cannot be read, connecting or **Test connection** names the missing variable. A broken client credential never disconnects users: requests fail until it is fixed, then work again without reconnecting. > > Saving certificate mode also wires the key to the connector instance, including on a workspace that installed the connector before certificate support. > > To provision the central client by script, the core workspace's `setOAuthClient` webhook takes `clientAuthMethod: certificate` (default `secret`), with no `clientSecret`, and `maintainerStatus` returns `clientAuthMethod` and `certKeyLoaded`. > > **Rotation:** upload the new certificate to Entra next to the old one, replace the bundle in your KMS and restart the runtime pods. Delete the old certificate in Entra only once every pod has restarted: a pod still running signs with the old key. > > ## 2. Declare the capability in AI Governance > > Generic connectors (broad tool surfaces meant to be shared across many agents, like Outlook) are best exposed as a named **capability** in AI Governance. Agent builders then enable that capability on their agents instead of pasting a raw MCP endpoint. > > **1. Open AI Governance > Capabilities** > > Create (or edit) the **Outlook** capability. > > **2. Point it at the MCP endpoint** > > Set the capability's MCP server URL to the connector's **MCP Endpoint**, and set its **Scope** to: > > ```text theme={null} > context_id,agent_id,user_id > ``` > > The `agent_id` in the scope is what lets the connector identify and authorize the calling agent. > > **3. Make it available to agent builders** > > Once created, the capability appears in the capability picker for agent builders in your organization, who enable it on their agents. Access to the catalog follows your organization's existing roles; there is no per-capability role grant. > > **4. Smoke-test** > > From an agent that has the capability, in a workspace configured for `oauthCentral`, trigger any tool. The user is prompted to connect once (Microsoft sign-in); subsequent calls reuse the stored token transparently and refresh it automatically. > > > [!NOTE] > > > > The connector's configuration app also offers a one-click **Add to catalog** button (workspace owner / admin only) that publishes the Outlook capability to the organization-wide Capabilities catalog for you, the easiest way to expose it to agent builders without hand-editing Governance. > > > [!WARNING] > > > > Declaring the capability makes the connector **available**; it does not by itself authorize a specific agent. This connector follows the **tenant-context model**: which agents may actually call it is gated per-workspace by the **authorized-agents allowlist** in the configuration app (see the *Workspace builder* tab). Agents show a **Connect** button only if the catalog entry carries the connector's connect / status / disconnect webhooks in its `auth` block. The configuration app's **Add to catalog** button writes it for you. If you create the entry by hand, paste that block into **Auth Configuration**: the platform adds it later on its own only for a workspace endpoint (ending in `.mcp`), never for the connector's global `/webhooks/mcp` endpoint. *** > [tab] Agent builder (Agent Creator) > > ## Agent builder > > **Goal:** let an agent you build in Agent Creator read and act on Outlook mail, calendar and contacts through MCP tools. > > > [!NOTE] > > > > Before an agent can call the connector, a *Workspace builder* must have installed and configured the Outlook app in a workspace (see the *Workspace builder* tab), and, for the central OAuth mode, a *Platform admin* must have provisioned the shared Microsoft Entra OAuth client (see the *Platform admin setup* accordion above). > > This connector runs in the **tenant app-instance context**: your agent is authorized two ways at once: it is identified by the `agent_id` that Agent Creator injects through the capability *Scope*, and that agent must appear in the connector's **authorized-agents allowlist** (managed in the configuration app). The Microsoft Graph access token itself is resolved server-side from the configured auth mode. > > There are two ways to wire it up. Pick based on how much isolation you need. > > ## Option A: Enable the shared capability from the catalog > > The fastest path: a *Platform admin* has already published an **Outlook** capability (see the *Platform admin setup* accordion above, §2), so you just pick it from the catalog. A workspace owner can publish it in one click with the config app's **Add to catalog** button. > > **1. Open your agent in Agent Creator** > > Open the agent you want to extend and go to its capabilities / tools. > > **2. Add the Outlook capability** > > Browse the capability catalog, select **Outlook**, and enable it. The MCP endpoint URL and the *Scope* (`context_id,agent_id,user_id`) are already wired by the admin; nothing to paste, and the shared instance accepts every agent, so there is no allowlist step on your side. > > **3. Connect a Microsoft account (OAuth modes)** > > On the first tool call, an unconnected user is prompted to sign in; Agent Creator surfaces a `connect_url`. Application (`clientCredentials`) and `accessToken` modes need no per-user sign-in. > > > [!NOTE] > > > > Convenient, but your agent runs against a **shared, platform-managed instance**: its Microsoft credentials are owned by someone else and the instance accepts every agent that is granted the capability. Prefer Option B for anything beyond quick experiments. > > ## Option B: Run it from your own workspace (recommended) > > For production agents, install the connector in **your own workspace** and point the agent at *that* workspace's MCP endpoint. > > > [!WARNING] > > > > **Prefer this mode for security.** Because the MCP runs in *your* app-instance context, the Microsoft credentials, the per-user OAuth tokens and the authorized-agents allowlist are all **scoped to your workspace**, not shared platform-wide. You decide exactly which agents may call it and which Microsoft account / auth mode backs them, and a misconfiguration elsewhere can never expose your mailbox. The shared catalog capability (Option A) is a broad surface many agents can reach; your own workspace is an isolated, least-privilege boundary. > > **1. Install and configure the connector in your workspace** > > Follow the *Workspace builder* tab: install **Outlook** in your workspace, open its **Configuration app**, choose the auth mode and connect a Microsoft account. > > **2. Allowlist your agent** > > In that workspace's config app, open **Authorized agents** and tick your agent (the **Install capability** button does this for you). > > **3. Add the MCP capability to your agent** > > In your agent, add a capability pointing at **your workspace's MCP Endpoint** URL, and set its **Scope** to: > > ```text theme={null} > context_id,agent_id,user_id > ``` > > The `agent_id` is what lets the connector identify and authorize your agent; without it, every call is rejected with an explicit "agent could not be identified" message. This *Scope* is separate from the Microsoft Graph OAuth scopes. > > **4. Connect a Microsoft account (OAuth modes)** > > On the first tool call, the user is prompted to sign in (or uses **Connect** in the config app). > > ## Brief the agent in its system prompt > > Whichever option you pick, wiring the capability is not enough: the agent must know the MCP exists and when to use it. Copy-pasteable starter: > > ```text theme={null} > You have access to the Outlook MCP server (tools: mail, mailFolders, calendars, events, contacts, contactFolders). Each tool takes an `action` argument. Use it whenever the user asks about their Outlook email, calendar events or contacts: listing, searching, reading, sending, replying, scheduling or updating. Prefer calling a tool over guessing, and confirm with the user before any destructive or outbound action (send, reply, forward, delete, decline a meeting). > ``` > > > [!NOTE] > > > > **Legacy AI Knowledge agents** (no native MCP picker): add the connector under **Advanced > Tools > MCP** and paste the **MCP Endpoint** URL. The agent still has to be allowlisted in the config app and its identity propagated so the connector can read its `agent_id`. > > > [!NOTE] > > > > **Restricting to read-only (least privilege).** Outlook tools cover both reads and writes (send mail, create/update events and contacts). The requested OAuth scopes **are** the grant, so the connector only ever obtains what the **Scopes** field in the configuration app asks for. To allow only read access, set a read-only scope list there, e.g.: > > > > ```text theme={null} > > offline_access openid profile https://graph.microsoft.com/Mail.Read https://graph.microsoft.com/Calendars.Read https://graph.microsoft.com/Contacts.Read https://graph.microsoft.com/User.Read > > ``` > > > > With central OAuth (`oauthCentral`) you do **not** create your own Entra client; keep `oauthCentral` and just enter the read-only scopes; your tenant scope overrides the platform default (the central app must expose these read permissions). Write calls (e.g. send mail) are then rejected by Microsoft Graph with `403 Forbidden`. Note this is set at the workspace level: a workspace editor can widen it again; for a hard guarantee, use an Entra app limited to read permissions. > > ## Available Tools > > Each tool takes an `action` argument selecting the concrete operation, plus the per-action parameters. Omit `userId` to target the signed-in user (`me`). > > | Tool | Description | > | - | - | > | `mail` | Outlook mail messages. Actions: `list`, `get`, `create`, `update`, `delete`, `send`, `sendDraft`, `reply`, `replyAll`, `forward`, `createReply`, `createReplyAll`, `createForward`, `move`, `listAttachments`, `getAttachment`. | > | `mailFolders` | Mail folders (well-known ids: `inbox`, `drafts`, `sentitems`, `deleteditems`). Actions: `list`, `get`, `create`, `delete`, `listMessages`, `listChildFolders`. | > | `calendars` | Outlook calendars (default plus secondary). Actions: `list`, `get`, `create`, `delete`. | > | `events` | Calendar events. Actions: `list`, `view`, `get`, `create`, `update`, `delete`, `accept`, `decline`, `tentativelyAccept`, `listForCalendar`. | > | `contacts` | Personal contacts. Actions: `list`, `get`, `create`, `update`, `delete`. | > | `contactFolders` | Contact folders. Actions: `list`, `get`, `create`, `listContacts`. | > > ## Output Formats > > Every tool accepts an `outputFormat` argument that controls the MCP response shape: > > * **`both`** (default): the structured payload, with its JSON also rendered as text. > * **`verbose`**: a human-readable text view, optimized for LLM consumption. > * **`structured`**: concise machine-readable JSON in `structuredContent`. > > ## Tool Details > > ### mail > > ```json theme={null} > { > "name": "mail", > "arguments": { > "action": "list", > "filter": "isRead eq false", > "orderby": "receivedDateTime desc", > "top": 10 > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | One of `list`, `get`, `create`, `update`, `delete`, `send`, `sendDraft`, `reply`, `replyAll`, `forward`, `createReply`, `createReplyAll`, `createForward`, `move`, `listAttachments`, `getAttachment`. `reply`, `replyAll` and `forward` send immediately; `createReply`, `createReplyAll` and `createForward` take the same `body` but only create the draft in the message's thread. | > | `userId` | No | Target mailbox; omit for the signed-in user (`me`). | > | `messageId` | For get/update/delete/send actions on a message | Message id. | > | `attachmentId` | For getAttachment | Attachment id. | > | `filter` / `orderby` / `search` / `select` / `top` / `skip` | No | OData query options (`$filter`, `$orderby`, `$search`, `$select`, `$top`, `$skip`). | > | `nextLink` | No | `list` only: the `@odata.nextLink` of the previous result, unchanged, to get the next page. It already points at the right mailbox and folder, and replaces `userId`, `folderId` and the other query options, which are ignored with it. | > | `body` | For create/update/send/reply/forward/move (optional for the draft variants) | Resource fields, e.g. `send` → `{ message: { subject, body, toRecipients }, saveToSentItems }`; `reply` / `createReply` → `{ comment }`; `move` → `{ destinationId }`. | > > > [!NOTE] > > > > **Searching messages.** `search` is a KQL full-text search (`invoice`, `from:alice@contoso.com`, `subject:invoice received>=2026-10-01`), sent to Microsoft Graph as one quoted string, so do not add quotes yourself: quotes inside the value are removed, so an exact-phrase search is not possible. Microsoft Graph does not combine it with `filter`, `orderby` or `skip` (a `skip` of `0` is ignored): the connector returns a clear error in those cases. Search results come newest first (an `orderby` of `receivedDateTime desc` or `sentDateTime desc` is ignored), and the next page is fetched with `nextLink` alone. When `filter` and `orderby` are used together on a date property, the connector puts that property first in the filter, as Microsoft Graph requires. > > ### events > > ```json theme={null} > { > "name": "events", > "arguments": { > "action": "view", > "startDateTime": "2026-07-01T00:00:00Z", > "endDateTime": "2026-07-08T00:00:00Z" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | One of `list`, `view`, `get`, `create`, `update`, `delete`, `accept`, `decline`, `tentativelyAccept`, `listForCalendar`. | > | `eventId` | For get/update/delete/accept/decline/tentativelyAccept | Event id. | > | `calendarId` | For listForCalendar | Calendar id (default calendar otherwise). | > | `startDateTime` / `endDateTime` | For `view` | ISO 8601 window bounds (both required for the time-window view). | > | `body` | For create/update | Event resource `{ subject, start, end, attendees, … }`; for accept/decline → `{ comment, sendResponse }`. | > > ### contacts > > ```json theme={null} > { > "name": "contacts", > "arguments": { > "action": "create", > "body": { > "givenName": "Ada", > "surname": "Lovelace", > "emailAddresses": [{ "address": "ada@x.io", "name": "Ada Lovelace" }] > } > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | One of `list`, `get`, `create`, `update`, `delete`. | > | `contactId` | For get/update/delete | Contact id. | > | `filter` / `orderby` / `search` / `top` | No | OData query options. | > | `body` | For create/update | Contact resource `{ givenName, surname, emailAddresses, … }`. | > > ### mailFolders > > ```json theme={null} > { > "name": "mailFolders", > "arguments": { > "action": "listMessages", > "folderId": "inbox", > "top": 25 > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | One of `list`, `get`, `create`, `delete`, `listMessages`, `listChildFolders`. | > | `folderId` | For get/delete/listMessages/listChildFolders | Folder id or well-known name (`inbox`, `drafts`, `sentitems`, `deleteditems`). | > | `body` | For create | `{ displayName }`. | > [tab] Workspace builder (DSUL) > > ## Workspace builder > > **Goal:** install the connector in a workspace, configure authentication and the agent allowlist, and call Outlook operations from your automations. > > ## Installation > > 1. Go to **Apps** in your workspace > 2. Search for **Outlook** and install it > 3. Open the **Configuration app** (the link auto-populated on install) to choose the auth mode, provide credentials, connect, and allow the agents that may call the connector > > ## Configuration > > | Field | Description | > | - | - | > | **Configuration app** | Auto-populated on install; open this link to configure authentication (mode + credentials), connect a Microsoft account (OAuth modes), and manage the authorized-agents allowlist. | > | **Microsoft Graph API version** | `v1.0` (default) or `beta`. | > > The configuration app drives everything; the app instance itself has no per-field credential form. From it you pick one of: > > | Auth mode | What you provide | Best for | > | - | - | - | > | `oauthCentral` | Nothing; just click **Connect** | Workspaces on a platform where the admin set up the central client | > | `oauth` | Your own Entra **Application (client) ID + Secret** (+ tenant; redirect URI `/workspaces//webhooks/.oauthCallback`) | You manage your own Microsoft Entra OAuth app | > | `clientCredentials` | Entra **client ID + secret + tenant** with admin-consented **application** Graph permissions | Server-to-server / back-office, no interactive sign-in | > | `accessToken` | A pre-minted Microsoft Graph **access token** | Short-lived / caller-managed tokens | > > > [!WARNING] > > > > Microsoft Entra rejects a colon in the redirect URI path, so for the `oauth` mode use your workspace's **raw id** (``) in the redirect URI, not the `slug:` form. The configuration app shows the exact URI to register. > > ### Routing Microsoft Graph through an API gateway > > If your organization fronts Microsoft Graph with its own API gateway, enter its URL in **Microsoft Graph base URL** (`oauth` with your own client, `clientCredentials` and `accessToken` modes), for example `https://graph-gateway.example.net`. The connector then sends every Graph call, pagination included, to `//…` instead of `https://graph.microsoft.com//…`. Leave it blank to call Microsoft directly. > > * The URL must use HTTPS and carry no credentials, query string or fragment. A path is allowed (`https://gateway.example.net/msgraph`); the API version is appended to it. > * Access tokens are sent to this URL: enter only a gateway your organization operates. > * Only Graph calls move. Sign-in and token requests still go to `login.microsoftonline.com`, and scopes keep their `https://graph.microsoft.com/…` form: they name the resource, not the host. > * In `oauthCentral` mode, the URL is set once by the platform admin in the maintainer view of the central client, and a workspace cannot override it: tokens issued by the platform's client are only ever sent where the platform admin decided. That URL applies to every workspace using the central client, across all organizations of the platform, so set it only on a dedicated deployment. It is not secret: the connector's public client endpoint returns it to any caller. > * A workspace URL is trusted like the rest of the workspace configuration: a workspace editor can point it at any HTTPS host the platform reaches, internal ones included. Restrict outbound traffic with the platform's egress policy if that matters to you. > > If the gateway is a forward proxy (HTTP `CONNECT`) rather than an API exposed under its own URL, leave this field blank and set the platform's outbound proxy instead (see [HTTP Proxy](/self-hosting/kubernetes/configuration#http-proxy)). > > > [!NOTE] > > > > Credentials are provisioned into the workspace's Secrets by the `onInstall` flow and resolved server-side. The agent allowlist (**Authorized agents**) gates which Agent Creator agents may call the MCP endpoint; see the *Agent builder* tab. > > ## Available Instructions > > Every instruction resolves credentials from the workspace configuration. Operations are grouped by Outlook resource; the MCP server exposes the same operations behind the six entity tools (see the *Agent builder* tab). All instructions accept an optional `userId` (omit to target the signed-in user `me`). > > ### Mail > > | Instruction | Description | Returns | > | - | - | - | > | `listMessages` | List messages in the mailbox; filter with `$filter`, sort with `$orderby`, full-text with `$search`, page with `$top`/`$skip` or `nextLink`. | `{ value: [ message ], "@odata.nextLink" }` | > | `getMessage` | Fetch one message by `messageId`. | A message resource `{ id, subject, from, toRecipients, body, receivedDateTime, … }`. | > | `createDraft` | Create a draft message; `body` = message resource (`subject`, `body`, `toRecipients`, …). | The created draft message `{ id, … }`. | > | `updateMessage` | Update a draft/message by `messageId`; `body` = changed fields. | The updated message resource. | > | `deleteMessage` | Delete a message by `messageId`. | Empty (HTTP 204). | > | `sendMail` | Send a message in one call; `body` = `{ message: { subject, body, toRecipients }, saveToSentItems }`. | Empty (HTTP 202 Accepted). | > | `sendDraftMessage` | Send a previously created draft by `messageId`. | Empty (HTTP 202 Accepted). | > | `replyMessage` | Reply to the sender of `messageId`; `body` = `{ comment }` or `{ message }`. | Empty (HTTP 202 Accepted). | > | `replyAllMessage` | Reply to all recipients of `messageId`. | Empty (HTTP 202 Accepted). | > | `forwardMessage` | Forward `messageId`; `body` = `{ comment, toRecipients }`. | Empty (HTTP 202 Accepted). | > | `createReply` | Create a draft reply to the sender of `messageId`, in its thread; nothing is sent. `body` = `{ comment }` or `{ message }` (optional). | The draft message `{ id, … }` (HTTP 201). | > | `createReplyAll` | Same as `createReply`, addressed to all recipients. | The draft message `{ id, … }` (HTTP 201). | > | `createForward` | Create a draft forward of `messageId`; nothing is sent. `body` = `{ comment, toRecipients }` (optional). | The draft message `{ id, … }` (HTTP 201). | > | `moveMessage` | Move `messageId` to a folder; `body` = `{ destinationId }`. | The moved message in its new folder. | > | `listAttachments` | List a message's attachments. | `{ value: [{ id, name, contentType, size, contentBytes }] }` | > | `getAttachment` | Get one attachment by `attachmentId` (base64 `contentBytes` inline). | An attachment resource `{ id, name, contentType, contentBytes }`. | > > ### Mail folders > > | Instruction | Description | Returns | > | - | - | - | > | `listMailFolders` | List mail folders with message counts. | `{ value: [{ id, displayName, totalItemCount, unreadItemCount }] }` | > | `getMailFolder` | Get a folder by `folderId` (id or well-known name). | A mailFolder resource `{ id, displayName, … }`. | > | `createMailFolder` | Create a mail folder; `body` = `{ displayName }`. | The created mailFolder. | > | `deleteMailFolder` | Delete a mail folder by `folderId`. | Empty (HTTP 204). | > | `listFolderMessages` | List messages inside `folderId`. | `{ value: [ message ], "@odata.nextLink" }` | > | `listChildFolders` | List child folders of `folderId`. | `{ value: [ mailFolder ] }` | > > ### Calendars & events > > | Instruction | Description | Returns | > | - | - | - | > | `listCalendars` | List the account's calendars. | `{ value: [{ id, name, owner, … }] }` | > | `getCalendar` | Get a calendar by `calendarId`. | A calendar resource `{ id, name, … }`. | > | `createCalendar` | Create a calendar; `body` = `{ name }`. | The created calendar. | > | `deleteCalendar` | Delete a calendar by `calendarId`. | Empty (HTTP 204). | > | `listEvents` | List events from the default calendar. | `{ value: [ event ], "@odata.nextLink" }` | > | `listCalendarView` | List events in a time window (`startDateTime` + `endDateTime`, ISO 8601). | `{ value: [ event ] }` | > | `listCalendarEvents` | List events of a specific `calendarId`. | `{ value: [ event ] }` | > | `getEvent` | Get an event by `eventId`. | An event resource `{ id, subject, start, end, attendees, … }`. | > | `createEvent` | Create an event; `body` = `{ subject, start, end, attendees, … }`. | The created event. | > | `updateEvent` | Update an event by `eventId`; `body` = changed fields. | The updated event. | > | `deleteEvent` | Delete/cancel an event by `eventId`. | Empty (HTTP 204). | > | `acceptEvent` | Accept a meeting invite; `body` = `{ comment, sendResponse }`. | Empty (HTTP 202 Accepted). | > | `declineEvent` | Decline a meeting invite. | Empty (HTTP 202 Accepted). | > | `tentativelyAcceptEvent` | Tentatively accept a meeting. | Empty (HTTP 202 Accepted). | > > ### Contacts > > | Instruction | Description | Returns | > | - | - | - | > | `listContacts` | List personal contacts. | `{ value: [ contact ], "@odata.nextLink" }` | > | `getContact` | Get a contact by `contactId`. | A contact resource `{ id, displayName, emailAddresses, … }`. | > | `createContact` | Create a contact; `body` = `{ givenName, surname, emailAddresses, … }`. | The created contact. | > | `updateContact` | Update a contact by `contactId`; `body` = changed fields. | The updated contact. | > | `deleteContact` | Delete a contact by `contactId`. | Empty (HTTP 204). | > | `listContactFolders` | List contact folders. | `{ value: [{ id, displayName }] }` | > | `getContactFolder` | Get a contact folder by `folderId`. | A contactFolder resource. | > | `createContactFolder` | Create a contact folder; `body` = `{ displayName }`. | The created contactFolder. | > | `listFolderContacts` | List contacts in a contact `folderId`. | `{ value: [ contact ] }` | > > > [!NOTE] > > > > `Returns` shows the shape of the operation output (the underlying Microsoft Graph resource). Microsoft Graph send/reply/forward operations return **HTTP 202 Accepted** with no body. `userId` defaults to the signed-in user (`me`) when omitted. > > ## DSUL Examples > > **List the 10 most recent unread messages:** > > ```yaml theme={null} > - Outlook.listMessages: > filter: "isRead eq false" > orderby: receivedDateTime desc > top: 10 > output: messages > ``` > > **Send an email:** > > ```yaml theme={null} > - Outlook.sendMail: > body: > message: > subject: 'Meeting follow-up' > body: > contentType: HTML > content: '

Thank you for the meeting today.

' > toRecipients: > - emailAddress: > address: '{{recipient}}' > saveToSentItems: true > ``` > > **List this week's calendar events in a time window:** > > ```yaml theme={null} > - Outlook.listCalendarView: > startDateTime: '2026-07-01T00:00:00Z' > endDateTime: '2026-07-08T00:00:00Z' > output: events > ``` > > **Create a calendar event with an attendee:** > > ```yaml theme={null} > - Outlook.createEvent: > body: > subject: 'Project kickoff' > start: > dateTime: '2026-07-01T10:00:00' > timeZone: 'Europe/Paris' > end: > dateTime: '2026-07-01T11:00:00' > timeZone: 'Europe/Paris' > attendees: > - emailAddress: > address: '{{attendeeEmail}}' > type: required > output: event > ``` > [tab] Knowledge base (sync) > > ## Knowledge base > > **Goal:** index the messages of a mail folder into a knowledge base so an agent can search their **content**, and keep that base up to date. > > > [!NOTE] > > > > Before a base can be attached, a *Workspace builder* must have installed and configured the Outlook app in a workspace and connected a mailbox (see the *Workspace builder* tab). Nothing else is needed: the same app instance serves both the agent tools and the sync surface. The **Authorized agents** allowlist does **not** apply here — it gates the connector as an agent *tool*, and has no effect on synchronization. > > > [!WARNING] > > > > **A mailbox is personal data.** Everything under the folder you select becomes searchable by everyone the knowledge base is shared with, subject to the access check below. Sync a **shared or functional mailbox** — support@, invoices@, a project archive — or one clearly delimited folder, rather than someone's inbox. Calendar events and contacts are not synced at all. > > ## How it fits together > > ```mermaid theme={null} > flowchart LR > Mail["Outlook mailbox
Microsoft Graph"] > Conn["Outlook connector
MCP resources"] > Sync["Knowledge Sync
browse · diff · index"] > KB["Knowledge base
vector store"] > Agent["Agent"] > > Sync -->|"resources/list · resources/read"| Conn > Conn -->|"Graph API"| Mail > Sync -->|"documents"| KB > Agent -->|"search"| KB > Agent -.->|"per-reader access check"| Sync > ``` > > The resource tree is two levels deep — **mail folders**, then the **messages** inside them — and a folder is what you pick as a sync root: > > ```text theme={null} > outlook://folder/{folderId} > outlook://message/{messageId} > ``` > > ## Attach the connector to a base > > **1. Copy the MCP endpoint** > > Open the connector's **Configuration app** in the workspace where it is installed; it displays and copies that workspace's MCP endpoint: > > ```text theme={null} > /workspaces//webhooks/.mcp > ``` > > **2. Create the connection in Knowledges** > > Go to **Knowledges → Connectors → New Connection → Your own MCP server**, paste the endpoint and click **Check**. > > **3. Browse to the folder you want** > > Walk the mail folders, pick the one to index, and confirm with **Use this location**. Everything below the selected folder is synced, subfolders included — so pick the narrowest folder that answers the need. > > **4. Pick the destination and sync** > > Choose an existing knowledge base or create one from the same step, then click **Sync Now**. Large folders are spread over several runs; the schedule (*Hourly* to *Daily*, under **Auto-sync**) finishes the job. > > The full wizard, the run history and the connection settings are documented once for every provider in [Knowledges → Connectors](/products/ai-knowledge/connectors). This tab covers only what is specific to Outlook. > > > [!NOTE] > > > > A connection carrying its own endpoint is **private to whoever attached it**: nothing is published to the organization's catalog. Backing it with `clientCredentials` lets a base be fed by an **application identity** on a shared mailbox rather than by a person — the credential then belongs to the workspace, and no reader ever signs in for the sync. > > ## Who may sync, and who may read > > | Moment | Acts as | Authorized by | > | - | - | - | > | Attaching the connection, browsing the tree | You | Your **role on the workspace** holding the connector's configuration — the right to read that workspace is the right to read this mailbox through it | > | A scheduled sync run | No user at all | The calling workspace must be listed in `knowledgeSync.trustedCallers`; the Knowledge Sync workspace ships there by default | > | Answering a reader's question | The reader | A live per-reader access check (`mail` / `checkAccess`, batches of up to 100 URIs) against Microsoft Graph | > > > [!NOTE] > > > > **Per-user access control is supported — keep it on for a mailbox.** Each reader's own rights are re-checked in Outlook at query time, so a message they could not open in Outlook is not served to them either. Turning it off hands every synced message to anyone who can query the agent. On a shared mailbox fed by an application identity, be explicit about who is meant to read the base: the check can only reflect what Outlook itself grants each reader. > > ## What gets indexed > > | Aspect | Behavior | > | - | - | > | Document unit | One **message** = one document, published as `text/plain` (subject, correspondents and body text). Folders are containers, never indexed themselves. | > | Attachments | **Not ingested.** A message is a leaf, so the sync never descends into it; `hasAttachments` travels as metadata and the citation link opens the message. | > | Size ceiling | 200 000 characters of text per message; beyond it the document says it was truncated. | > | Empty messages | A message with no extractable text — an empty body and no preview — is reported as unfetchable rather than indexed as a blank document. | > | Revision marker | `changeKey`, falling back to `lastModifiedDateTime`. Unchanged messages are never re-read and never re-indexed. | > | Deletions | Each run is a **full traversal**: a message absent from a complete listing is removed from the base — which also covers a message moved out of the synced folder. A listing that failed halfway deletes nothing. | > > > [!NOTE] > > > > **The Knowledge profile this connector declares** — the descriptor Knowledges probes at `outlook://profile/knowledge`: > > > > | Field | Value | > > | - | - | > > | `provider` | `outlook-next` | > > | `hierarchy` | `folder` › `message` | > > | `canonical_uri` | `outlook://message/{messageId}` | > > | `revision` | `changeKey`, fallback `lastModifiedDateTime` | > > | `read` | Inline text only, 200 000 characters max; no binary | > > | `list` | 50 resources per page by default, 100 max; `delta_on_drive: false` | > > | `access` | Tool `mail`, action `checkAccess`, up to 100 URIs per call | > > | `authentication` | `oauthCentral`, `oauth`, `clientCredentials`, `accessToken` | > > ## Troubleshooting the sync > > **The URL check says "You are not allowed to read it"**: you have no role on the workspace holding the connector's configuration. Ask its administrator for one — this is not about your mailbox rights. > > **The URL check says "It answered, but could not serve its content"**: the connector itself is not fully configured. Open its configuration app and connect a mailbox. > > **A message is in the folder but not in the base**: it may have no extractable text (an empty body with no preview), in which case it is listed in the connection's synchronization errors rather than indexed. > > **An attachment's content is not searchable**: by design — attachments are not ingested. Index the documents themselves from where they live (SharePoint, Drive, WebDAV) if their content must be searchable. > > **Messages disappear from the base after being filed**: moving a message out of the synced folder removes it on the next complete traversal. Sync the folder the mail actually lands in, or a parent of it. > > **A scheduled sync keeps running after a right was revoked**: the role check runs on the interactive paths only. A scheduled run is authorized as the platform's synchronization workspace — delete the connection to stop it for certain. *** ## Security The answers that hold for every connector (agent access, shared knowledge bases, credentials, models, egress) are on [Connector security](/apps-store/marketplace/connectors/security). This section lists what is specific to Outlook. | Topic | Outlook | | - | - | | Authentication family | Delegated OAuth (Microsoft Entra, authorization code with PKCE): each user connects their own Microsoft 365 account. An app-only mode (`clientCredentials`) also exists. | | Production modes | `oauthCentral` or `oauth` | | Modes to avoid in production | `accessToken` (testing only, and a Graph access token expires after about an hour). `clientCredentials` acts as the application, not as the user: avoid it when per-user permissions are required. | | Read-only scopes | `offline_access`, `openid`, `profile`, `User.Read`, `Mail.Read`, `Calendars.Read`, `Contacts.Read` (the **Read-only preset** of the configuration app). The default scopes include `Mail.ReadWrite`, `Mail.Send`, `Calendars.ReadWrite` and `Contacts.ReadWrite`. | | Agent allowlist | Yes, on the tenant endpoint (empty at installation). The global endpoint accepts every agent. | | Per-reader access control on knowledge bases | Yes: each message is checked against the reader's own Microsoft 365 connection. | | Outbound hosts | `graph.microsoft.com` (or the configured [Microsoft Graph base URL](#routing-microsoft-graph-through-an-api-gateway)), `login.microsoftonline.com` | | Audit events | None specific to this connector | With the default scopes, an agent can send mail and answer invitations in the user's name (`Mail.Send`, `Calendars.ReadWrite`). Use the read-only preset unless the agents must send or organize mail. In `clientCredentials` mode, Microsoft Graph application permissions such as `Mail.Read` cover every mailbox of the tenant: if you use this mode, restrict the application to the mailboxes it needs in Exchange Online. *** ## Error Handling | HTTP code | Meaning | | - | - | | `400` | Bad request: invalid parameters or malformed body (e.g. bad OData filter, invalid event resource). | | `401` | Unauthorized: the Microsoft Graph access token is missing, expired or revoked. The user must reconnect (OAuth modes). | | `403` | Forbidden: insufficient Graph scope/permission, missing admin consent (application mode), or the account lacks access to the resource. | | `404` | Not found: the message, folder, event, contact or calendar id does not exist or is not visible to the account. | | `429` | Throttled: Microsoft Graph rate limit; back off and retry (honor `Retry-After`). | | `500` / `503` | Microsoft Graph service error: transient; retry shortly, no reconnection needed. | ### Common Issues **"This agent is not authorized to use this connector"**: The calling agent is not in the allowlist. Open the configuration app → **Authorized agents** → tick this agent (or enable **Allow all agents**) and Save. **"The calling agent could not be identified"**: The MCP capability *Scope* does not declare `agent_id`, so Agent Creator never injects the agent identity. Set the Scope to `context_id,agent_id,user_id` on the capability, then allow the agent in the config app. **"Microsoft Graph is not connected for this user"**: No per-user OAuth token. Open the configuration app (OAuth mode) and click **Connect**, or use the agent's connect flow. **"Microsoft Graph token refresh failed … must reconnect"**: The stored refresh token was revoked or expired (Microsoft Entra invalidated it, or it aged past its limit). The connection is dropped automatically; the user must reconnect from the config app. **"Microsoft Graph not authenticated" / "OAuth is not configured"**: Neither a tenant OAuth client nor the central platform client is available. Set the client ID/secret/tenant in the config app, or ask the platform maintainer to provision the central Entra OAuth client. **`client_credentials` exchange failed**: In application mode, check the Application (client) ID / secret, the tenant id, and that a Global Administrator granted **admin consent** for the application Graph permissions. **Microsoft Entra redirect URI rejected**: Entra rejects a colon in the redirect URI path. Register the redirect URI with the workspace's **raw id**, not the `slug:` form: `/workspaces//webhooks/oauthCallback` for the platform client, `/workspaces//webhooks/.oauthCallback` for your own Entra app. Copy the exact value from the config app. ## External Resources > [card] [Microsoft Graph API](https://learn.microsoft.com/en-us/graph/api/overview) > > Official reference for the Outlook mail, calendar and contacts REST APIs. > [card] [Tool Agents](/products/agent-factory/capabilities) > > Learn how Agent Creator agents consume MCP tools in Prisme.ai. # Outlook (legacy) Source: https://docs.prisme.ai/apps-store/marketplace/connectors/outlook-legacy Read, send, and manage emails via Microsoft Graph API > [!NOTE] > > This is the **legacy** Outlook connector (Microsoft Graph mail, application- or delegated-OAuth modes wired through `mcp-api-key` headers). It is superseded by the new **[Outlook](/apps-store/marketplace/connectors/outlook)** connector (App+MCP, tenant-context, central Microsoft Entra OAuth, with mail / calendar / contacts entity tools). Use the new Outlook connector for any new work; this page is kept for existing installations only. ![Outlook](https://mintcdn.com/prismeai/Oqq72tWGTtxufvRl/images/connectors/outlook.png?fit=max\&auto=format\&n=Oqq72tWGTtxufvRl\&q=85\&s=9fe387aa1be3bd1ea4fcdf0d3bfda49f) The Outlook connector provides full access to Microsoft Outlook mailboxes via the Microsoft Graph API, enabling AI agents and automations to read, search, send, and manage emails. > [card] Read Operations > > List folders, messages, and attachments with filtering and pagination > [card] Send Operations > > Send, reply, reply-all, forward emails with HTML support > [card] Manage Messages > > Move, copy, delete, and update message properties ## Choose your authentication mode The connector supports two **mutually exclusive** authentication modes. Pick the one that matches your use case before configuring the connector. > [card] Application mode (app-only) > > A single Azure AD app acts on behalf of the workspace. Can reach any mailbox in the tenant (restrictable). No per-user login. Best for back-office automations and service accounts. > [card] Delegated mode (OAuth per-user) > > Each end user signs into Microsoft once via an OAuth popup. Access is scoped to that user's own mailbox. Best for agents that act on behalf of the logged-in user. | Aspect | Application mode | Delegated (OAuth) mode | | - | - | - | | Azure permission type | Application | Delegated | | Admin consent | Required | Optional (user consent if tenant allows) | | Mailbox reach | All tenant mailboxes (restrictable) | Connected user's mailbox only | | Who authenticates | No end-user login | Each user signs in once | | `userId` tool argument | Required (target mailbox) | Ignored (always the connected user) | | Token acquisition | Client credentials per request | Authorization code + PKCE; refresh token stored | | Best for | Back-office / service automations | User-facing agents, per-user data | *** ## Prerequisites > [tab] Application mode > > ## Application mode > > * An **Azure AD Application** registered in your tenant > > * **Application permissions** granted (not Delegated): > * `Mail.Read`: Read mail in all mailboxes > * `Mail.ReadWrite`: Create drafts, update, delete, move, copy > * `Mail.Send`: Send, reply, reply-all, forward > * `MailboxSettings.Read`: Read mailbox settings > > * **Admin consent** granted for these permissions > > * A **client secret** created on the app registration > > > [!NOTE] > > > > **Minimal permissions:** If you only need read access, `Mail.Read` and `MailboxSettings.Read` are sufficient. Add `Mail.Send` and/or `Mail.ReadWrite` only if you use write tools. > [tab] Delegated (OAuth) mode > > ## Delegated (OAuth) mode > > * An **Azure AD Application** registered in your tenant with a **Web** platform configured > > * A **Redirect URI** added to the app registration: > > ``` > {platformApiUrl}/workspaces/{workspaceId}/webhooks/oauthCallback > ``` > > Example (sandbox, workspace `oOFlMpO`): > > ``` > https://api.sandbox.prisme.ai/v2/workspaces/oOFlMpO/webhooks/oauthCallback > ``` > > * **Delegated permissions** granted (Microsoft Graph): > * `Mail.Read` > * `Mail.ReadWrite` > * `Mail.Send` > * `MailboxSettings.Read` > * `User.Read`: sign-in and profile > * `offline_access`: issue refresh tokens > * `openid`, `profile`, `email`: ID token / user identity > > * A **client secret** (the connector uses the authorization code flow with PKCE as a **confidential client**, so "Allow public client flows" must stay **No**) > > * Either the tenant allows end-user consent, or an admin grants consent once to the delegated scopes above > > > [!NOTE] > > > > You can reuse the same Azure app registration for both modes, but the **permission types differ**: Application permissions for app-only mode, Delegated permissions for OAuth mode. *** ## OAuth flow (Delegated mode) When Delegated mode is enabled, end users connect their Microsoft account through a built-in flow implemented by the `outlook-mcp` workspace. **1. User opens the connect page** The user visits `{pagesUrl}/connect-outlook`. The page shows a **Connect Outlook** button when OAuth is configured and the user has no active connection. **2. Initiate** The page (or the `initiateOAuth` webhook) generates a PKCE **code verifier / code challenge (S256)** and a CSRF **state**, stores them in the user scope, and builds the Microsoft authorize URL. **3. Microsoft login & consent** The user is redirected to `https://login.microsoftonline.com/{tenant}/oauth2/v2.0/authorize` and consents to the delegated scopes. **4. Callback & token exchange** Microsoft redirects back to `/webhooks/oauthCallback?code=...&state=...`. The workspace validates the `state`, exchanges the code (with the PKCE `code_verifier`) for tokens at `https://login.microsoftonline.com/{tenant}/oauth2/v2.0/token`, and stores: * `outlook_delegated_token`: platform secret, user scope, TTL = `expires_in` * `outlook_refresh_token`: platform secret, user scope, TTL = **90 days** (`7776000` s) * `user.outlook.oauth`: metadata only (`expiresAt`, `scope`, `authMethod: delegated`) **5. Automatic refresh** When the access token is about to expire, `refreshOAuthToken` silently exchanges the refresh token for a new access token (and rotates the refresh token if Microsoft returns a new one). **6. Disconnect** Users can call the `disconnectOAuth` webhook (or trigger the `disconnectOAuth` event) to clear all stored tokens and metadata. > [!NOTE] > > **Security properties:** > > * PKCE (S256) protects the authorization code > * CSRF `state` is validated on callback > * Tokens are stored as **platform secrets** (opaque references), never as plain user metadata > * `redirectTo` is validated against the platform host to prevent open-redirect attacks *** > [tab] Usage as App > > ## Usage as App > > ## Installation > > 1. Go to **Apps** in your workspace > 2. Search for **Outlook App** and install it > 3. Configure the app instance for your chosen mode (Application or Delegated) > > ## Configuration > > > [tab] Application mode > > > > | Field | Value | > > | - | - | > > | **Azure Client ID** | Application (client) ID from Azure AD | > > | **Azure Client Secret** | Client secret value | > > | **Azure Tenant ID** | Directory (tenant) ID | > > | **Default User ID** | Email address or user object ID of the target mailbox | > > > [tab] Delegated (OAuth) mode > > > > | Field | Value | > > | - | - | > > | **OAuth Client ID** (`oauth.clientId`) | Azure AD application (client) ID | > > | **OAuth Client Secret** (`oauth.clientSecret`) | Azure AD client secret | > > | **OAuth Tenant** (`oauth.tenant`) | Directory (tenant) ID, or `common` / `organizations` | > > | **OAuth Scopes** (`oauth.scopes`) | Default: `openid profile email offline_access Mail.Read Mail.Send Mail.ReadWrite MailboxSettings.Read User.Read` | > > > > `Default User ID` is **not used** in Delegated mode; each user operates on their own mailbox. > > ## Available Automations > > The automation names and Graph permissions below are identical in both modes; only the **permission type** (Application vs Delegated) granted in Azure AD differs. > > ### Read Operations > > | Automation | Description | Graph permission | > | - | - | - | > | `listMailFolders` | List all mail folders with message counts | Mail.Read | > | `getMailFolder` | Get folder details by ID or well-known name | Mail.Read | > | `listMessages` | List messages with filtering, pagination, sorting | Mail.Read | > | `getMessage` | Get full message content and metadata | Mail.Read | > | `searchMessages` | Search messages using KQL syntax | Mail.Read | > | `listAttachments` | List all attachments for a message | Mail.Read | > | `getAttachment` | Get attachment content as base64 | Mail.Read | > | `getMailboxSettings` | Get timezone, locale, automatic replies | MailboxSettings.Read | > > ### Send Operations > > | Automation | Description | Graph permission | > | - | - | - | > | `sendMail` | Send an email (to/cc/bcc, HTML/text, importance) | Mail.Send | > | `sendDraft` | Send an existing draft message | Mail.Send | > | `replyMessage` | Reply to a message | Mail.Send | > | `replyAllMessage` | Reply-all to a message | Mail.Send | > | `forwardMessage` | Forward a message to recipients | Mail.Send | > > ### Write Operations > > | Automation | Description | Graph permission | > | - | - | - | > | `createDraft` | Create a draft email in Drafts folder | Mail.ReadWrite | > | `updateMessage` | Update properties (read status, importance) | Mail.ReadWrite | > | `deleteMessage` | Soft-delete (move to Deleted Items) | Mail.ReadWrite | > | `moveMessage` | Move message to another folder | Mail.ReadWrite | > | `copyMessage` | Copy message to another folder | Mail.ReadWrite | > > ## DSUL Examples > > ### List Messages > > ```yaml theme={null} > - Outlook App.listMessages: > userId: user@company.com # Application mode only; ignored in Delegated mode > folderId: inbox > top: 10 > filter: "isRead eq false" > output: messages > ``` > > ### Send an Email > > ```yaml theme={null} > - Outlook App.sendMail: > userId: user@company.com > to: recipient@example.com > subject: Meeting Follow-up > body: "

Thank you for the meeting today.

" > contentType: HTML > output: result > ``` > > ### Search Messages > > ```yaml theme={null} > - Outlook App.searchMessages: > userId: user@company.com > query: "from:john@example.com subject:project" > top: 20 > output: results > ``` > > ### Reply to a Message > > ```yaml theme={null} > - Outlook App.replyMessage: > userId: user@company.com > messageId: "{{messageId}}" > comment: "Thanks for the update!" > output: result > ``` > [tab] Usage as MCP > > ## Usage as MCP > > ## MCP Setup > > 1. Open your **Knowledges project** > > 2. Go to **Advanced > Tools** > > 3. Click **Add** and select the **MCP** tab > > 4. Enter the MCP endpoint URL > > 5. In the **Headers** field, add the credentials for your chosen mode > > > [tab] Application mode headers > > > > ```json theme={null} > > { > > "mcp-api-key": "your-mcp-api-key", > > "azure-client-id": "your-client-id", > > "azure-client-secret": "your-client-secret", > > "azure-tenant": "your-tenant-id" > > } > > ``` > > > > The MCP server uses the client credentials flow against Microsoft Graph and targets the mailbox specified by `userId` (or the workspace default). > > > [tab] Delegated (OAuth) mode headers > > > > ```json theme={null} > > { > > "mcp-api-key": "your-mcp-api-key", > > "auth-mode": "oauth" > > } > > ``` > > > > No `azure-*` headers. The end user must have completed the OAuth flow once via `{pagesUrl}/connect-outlook`. If they haven't, the tool returns a structured error containing a `connectUrl` pointing to the connect page. > > > > > [!WARNING] > > > > > > `auth-mode: oauth` **forces** Delegated mode and disables all fallbacks. If no valid delegated token is stored for the user, the request fails immediately with a `connectUrl`; it will not fall back to client credentials. > > > [!NOTE] > > > > The `mcp-api-key` value must match the **MCP API Key** secret configured in the workspace secrets (`mcpApiKey`). > > ## Authentication > > The MCP server resolves credentials in the following priority order (see `outlook-app/resolveAuth.yml`): > > 1. `auth-mode: oauth` header → **requires** a stored delegated token for the user; no fallback > 2. `Authorization: Bearer ` header (pre-resolved Graph access token) > 3. `azure-client-id` / `azure-client-secret` / `azure-tenant` custom headers (Application mode) > 4. Stored OAuth delegated tokens (`user.outlook.oauth` + platform secrets), with automatic refresh > 5. Per-user credentials from `configureOutlook` (`user.outlook.credentials`) > 6. Workspace secrets client credentials (`azureClientId`, `azureClientSecret`, `azureTenant`) > > ### Workspace Secrets > > | Secret | Used by | Description | > | - | - | - | > | `azureClientId` | Application mode | Azure AD client ID | > | `azureClientSecret` | Application mode | Azure AD client secret | > | `azureTenant` | Application mode | Azure AD tenant ID | > | `defaultUserId` | Application mode | Default mailbox email or user object ID | > | `mcpApiKey` | Both | API key for authenticating MCP requests | > > Delegated mode reads its configuration from `config.oauth.*` (`clientId`, `clientSecret`, `tenant`, `scopes`), which by default resolves to the same Azure secrets above; the same app registration can serve both modes. > > ### Mailbox Targeting > > * **Application mode**: the `userId` tool argument (or `defaultUserId` workspace secret) selects which mailbox to act on. Resolution order: tool argument `userId` > workspace secret `defaultUserId`. If neither is set, the request fails. > * **User Principal Name**: `user@yourdomain.com` > * **User Object ID**: `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` > * **Delegated (OAuth) mode**: `userId` is **ignored**. All calls run against `/me`, the mailbox of the user whose OAuth token is used. > > ## Available Tools > > ### Read Operations > > | Tool | Description | Graph permission | > | - | - | - | > | `listMailFolders` | List all mail folders with message counts | Mail.Read | > | `getMailFolder` | Get folder details by ID or well-known name | Mail.Read | > | `listMessages` | List messages with filtering, pagination, sorting | Mail.Read | > | `getMessage` | Get full message content and metadata | Mail.Read | > | `searchMessages` | Search messages using KQL syntax | Mail.Read | > | `listAttachments` | List all attachments for a message | Mail.Read | > | `getAttachment` | Get attachment content as base64 | Mail.Read | > | `getMailboxSettings` | Get timezone, locale, automatic replies | MailboxSettings.Read | > > ### Send Operations > > | Tool | Description | Graph permission | > | - | - | - | > | `sendMail` | Send an email (to/cc/bcc, HTML/text, importance) | Mail.Send | > | `sendDraft` | Send an existing draft message | Mail.Send | > | `replyMessage` | Reply to a message (comment or full body) | Mail.Send | > | `replyAllMessage` | Reply-all to a message | Mail.Send | > | `forwardMessage` | Forward a message to recipients | Mail.Send | > > ### Write Operations > > | Tool | Description | Graph permission | > | - | - | - | > | `createDraft` | Create a draft email in Drafts folder | Mail.ReadWrite | > | `updateMessage` | Update properties (read status, importance, categories) | Mail.ReadWrite | > | `deleteMessage` | Soft-delete (move to Deleted Items) | Mail.ReadWrite | > | `moveMessage` | Move message to another folder | Mail.ReadWrite | > | `copyMessage` | Copy message to another folder | Mail.ReadWrite | > > ## JSON-RPC Examples > > ### List Messages > > ```json theme={null} > { > "name": "listMessages", > "arguments": { > "userId": "user@company.com", > "folderId": "inbox", > "top": 10, > "filter": "isRead eq false" > } > } > ``` > > ### Send an Email > > ```json theme={null} > { > "name": "sendMail", > "arguments": { > "userId": "user@company.com", > "to": "recipient@example.com", > "subject": "Meeting Follow-up", > "body": "

Thank you for the meeting today.

", > "contentType": "HTML" > } > } > ``` > > ### Search Messages > > ```json theme={null} > { > "name": "searchMessages", > "arguments": { > "userId": "user@company.com", > "query": "from:john@example.com subject:project", > "top": 20 > } > } > ``` > > ## Output Formats > > All tools support an `outputFormat` parameter: > > * **`verbose`** (default): Human-readable text for LLM consumption > * **`structured`**: Machine-readable JSON in `structuredContent` > * **`both`**: Both text and structured content *** ## Security: Restrict to One Mailbox (Application mode only) > [!NOTE] > > This section applies only to **Application mode**. Delegated (OAuth) mode is already restricted to the consenting user's own mailbox and does not need an Application Access Policy. Application permissions grant access to **all mailboxes** in the tenant by default. To restrict this connector to a single mailbox, use an **Application Access Policy** in Exchange Online: ```powershell theme={null} # 1. Connect to Exchange Online Connect-ExchangeOnline # 2. Create a mail-enabled security group with only the target mailbox New-DistributionGroup -Name "OutlookMCP-Allowed" -Type Security -Members user@yourdomain.com # 3. Restrict the Azure AD app to only access that group's mailboxes New-ApplicationAccessPolicy -AppId "" ` -PolicyScopeGroupId "OutlookMCP-Allowed" ` -AccessRight RestrictAccess ` -Description "Restrict Outlook connector to single mailbox" # 4. Verify (may take up to 30 minutes to propagate) Test-ApplicationAccessPolicy -AppId "" -Identity user@yourdomain.com # Expected: Granted ``` > [!WARNING] > > The PowerShell commands above are provided as general guidance. Always refer to the [official Microsoft documentation](https://learn.microsoft.com/en-us/graph/auth-limit-mailbox-access) for the most up-to-date syntax. *** ## Error Handling | HTTP Status | Error | Solution | | - | - | - | | 401 | Unauthorized (Application mode) | Verify `clientId`, `clientSecret`, `tenant` | | 401 | User not connected / expired refresh token (Delegated mode) | The response includes a `connectUrl`; the end user must (re)connect at `/connect-outlook` | | 403 | Forbidden | Grant admin consent or check Application Access Policy | | 404 | Not Found | Verify user email/ID exists in tenant | | 429 | Rate Limited | Wait and retry | ### Common Issues **`AADSTS700016`**: App not found in the directory. Check tenant ID matches the app registration. **`AADSTS65001`**: User has not consented to the required delegated scopes. Either enable user consent in the tenant or have an admin grant consent once. **`MailboxNotEnabledForRESTAPI`**: The user needs an Exchange Online license assigned. **`invalid_grant` on refresh**: The refresh token has expired (>90 days) or been revoked. The user must reconnect via `/connect-outlook`. **`invalid_client`**: The Azure AD client secret is wrong or has expired. Rotate the secret in Azure AD and update the workspace configuration. **`ErrorAccessDenied` with Application Access Policy**: The target mailbox is not in the allowed security group. Takes up to 30 minutes to propagate after policy changes. ## External Resources > [card] [Microsoft Graph Mail API](https://learn.microsoft.com/en-us/graph/api/resources/mail-api-overview) > > Official API documentation > [card] [OAuth 2.0 authorization code flow](https://learn.microsoft.com/en-us/entra/identity-platform/v2-oauth2-auth-code-flow) > > Microsoft identity platform: delegated auth code + PKCE > [card] [Delegated permissions reference](https://learn.microsoft.com/en-us/graph/permissions-reference) > > Microsoft Graph: delegated vs application permissions > [card] [Application Access Policies](https://learn.microsoft.com/en-us/graph/auth-limit-mailbox-access) > > Restrict mailbox access per application (app-only mode) > [card] [Graph Explorer](https://developer.microsoft.com/en-us/graph/graph-explorer) > > Test API calls interactively > [card] [MCP Specification](https://modelcontextprotocol.io) > > Model Context Protocol specification # Overview Source: https://docs.prisme.ai/apps-store/marketplace/connectors/overview Connect Prisme.ai to external services via App import or MCP tools for AI agents Connectors provide ready-to-use integrations with popular external services. Each connector can be used in two ways depending on your use case. ## Video tutorial: SharePoint from chat to administration In this four-minute tutorial, you see the four levels at which you can use a connector, with SharePoint Next as the example: connecting your own account from a chat, adding the capability to an agent in Agent Creator, controlling authentication and authorized agents from a Builder workspace, and declaring the platform OAuth client as an administrator. Use the buttons in the top-right corner of the player to switch the narration language and the subtitles. The sections on the left are clickable. Screens show the English interface; narration and subtitles are available in English and French. ## Integration Modes > [card] App Mode > > Import the connector as an app into your workspace and call automations directly from DSUL. > > **Best for:** Workflow automations, data pipelines, scheduled jobs > [card] MCP Mode > > Connect the MCP endpoint to Agent Creator agents. They discover and use tools automatically. > > **Best for:** AI agents, conversational interfaces, dynamic tool selection ## Available Connectors > [card] [Azure OCR](/apps-store/marketplace/connectors/azure-ocr) > > Extract text and structured data from images and documents with Azure Computer Vision and Document Intelligence, from Agent Creator agents (MCP) or Builder workflows. > [card] [Bing Search](/apps-store/marketplace/connectors/bing-search) > > Search the web from AI agents through Bing Grounding in Azure AI Foundry. > [card] [Brave Search](/apps-store/marketplace/connectors/brave-search) > > Web search and LLM-ready grounding context via Brave Search API. Exposes `brave_search` (raw results) and `brave_llm_context` (structured snippets) as MCP tools. > [card] [Confluence](/apps-store/marketplace/connectors/confluence) > > Read and write Confluence Cloud pages, spaces, comments, labels and attachments via eight MCP entity tools, with CQL search and per-user Atlassian OAuth (tenant-context App+MCP). > [card] [DataGalaxy](/apps-store/marketplace/connectors/data-galaxy) > > Read/write access to the DataGalaxy data catalog: sources, structures, glossary, links, comments and tasks. > [card] [Excel](/apps-store/marketplace/connectors/excel) > > Read and write Excel workbooks stored in OneDrive or SharePoint. 50+ operations for worksheets, ranges, tables, and charts. > [card] [Figma](/apps-store/marketplace/connectors/figma) > > Read Figma files, comments, components, styles and library data. 13 entity tools covering files, images, webhooks, variables and analytics. > [card] [GitLab](/apps-store/marketplace/connectors/gitlab) > > Manage GitLab projects, issues, merge requests and CI/CD pipelines. 16 entity tools covering projects, MRs, pipelines, branches, commits, releases and more. > [card] [Google Chat](/apps-store/marketplace/connectors/google-chat) > > Bridge a Google Chat bot to a Prisme.ai AI Knowledge agent through an HTTPS webhook. Per-thread context, async acknowledgement and service-account-signed replies. > [card] [Google Search](/apps-store/marketplace/connectors/google-search) > > Run Google web searches from AI agents: synthesized grounded answers (Gemini) or rich filtered results and image search (Custom Search), via a Google API key or service account. > [card] [Google Workspaces](/apps-store/marketplace/connectors/google-workspaces) > > Drive, Docs, Sheets, Gmail and Calendar through five MCP entity tools, with per-user OAuth (central or tenant client), service-account JWT or a direct access token. > [card] [Gryzzly](/apps-store/marketplace/connectors/gryzzly) > > Manage time tracking in Gryzzly: customers, projects, tasks, declarations, leave periods and payroll exports. > [card] [HubSpot](/apps-store/marketplace/connectors/hubspot) > > Read and write HubSpot CRM and Marketing data through MCP with per-user OAuth (central or tenant client) or a Private App token; \~120 operations across contacts, companies, deals, tickets, engagements, lists, forms, emails and workflows. > [card] [Jira](/apps-store/marketplace/connectors/jira) > > Search, create and manage Jira Cloud issues, projects, users, metadata and agile boards via seven MCP entity tools, with per-user Atlassian OAuth (tenant-context App+MCP). > [card] [Jira (legacy)](/apps-store/marketplace/connectors/jira-legacy) > > Legacy Jira connector (static Basic-Auth / PAT credential, flat tool names, Cloud and Data Center). Superseded by the new Jira connector. > [card] [Knowledges](/apps-store/marketplace/connectors/knowledges) > > Manage Prisme.ai knowledge bases, their documents and web crawl sources, and run semantic search. Three entity tools, no credential to paste. > [card] [Microsoft Teams](/apps-store/marketplace/connectors/microsoft-teams) > > Teams, channels, chats and online meetings with their transcripts via Microsoft Graph, behind four MCP entity tools, plus an inbound Teams bot. > [card] [monday.com](/apps-store/marketplace/connectors/monday) > > Manage monday.com boards, items, columns, docs and users via the v2 GraphQL API. > [card] [Odoo](/apps-store/marketplace/connectors/odoo) > > Read-only access to any Odoo model: records, fields and server-side aggregates, behind six MCP tools, with a service account API key. > [card] [OneNote](/apps-store/marketplace/connectors/onenote) > > OneNote notebooks, sections and page text via Microsoft Graph, behind five MCP entity tools, with delegated per-user Microsoft Entra OAuth. > [card] [Outlook](/apps-store/marketplace/connectors/outlook) > > Outlook mail, calendar and contacts via Microsoft Graph, behind six MCP entity tools, with per-user Microsoft Entra OAuth (tenant-context App+MCP). > [card] [Outlook (legacy)](/apps-store/marketplace/connectors/outlook-legacy) > > Legacy Outlook mail connector (Microsoft Graph, application or delegated-OAuth via mcp-api-key). Superseded by the new Outlook connector. > [card] [Power BI](/apps-store/marketplace/connectors/powerbi) > > Query Power BI datasets with DAX and manage workspaces, reports, dashboards, refreshes and admin APIs through eleven MCP entity tools, with per-user Microsoft Entra ID OAuth. > [card] [Salesforce](/apps-store/marketplace/connectors/salesforce) > > Read/write Salesforce CRM data via REST API v62.0: records, SOQL/SOSL, Bulk API 2.0, Composite, Tooling, Process & Approvals, Reports and Metadata deploys. > [card] [SAP LeanIX](/apps-store/marketplace/connectors/sap-leanix) > > Query and manage SAP LeanIX Enterprise Architecture: fact sheets (Pathfinder GraphQL), Integration API (LDIF sync) and surveys, via a LeanIX API token. > [card] [ServiceNow](/apps-store/marketplace/connectors/service-now) > > Manage ServiceNow ITSM tickets, change requests, problems and service catalog with Basic or OAuth2 auth. > [card] [SharePoint](/apps-store/marketplace/connectors/sharepoint) > > SharePoint sites, document libraries, files, lists and permissions via Microsoft Graph, behind seven MCP entity tools, with per-user Microsoft Entra OAuth (tenant-context App+MCP). > [card] [SharePoint (legacy)](/apps-store/marketplace/connectors/sharepoint-legacy) > > Legacy SharePoint connector (Microsoft Graph, application or delegated-OAuth). Superseded by the new SharePoint connector. > [card] [Snowflake](/apps-store/marketplace/connectors/snowflake) > > Run SQL and manage asynchronous results, databases, schemas and virtual warehouses through five MCP entity tools. > [card] [SonarQube](/apps-store/marketplace/connectors/sonarqube) > > Read and act on SonarQube / SonarCloud code quality data: projects, issues, hotspots, measures, quality gates, rules and badges. > [card] [Storage (deprecated)](/apps-store/marketplace/connectors/storage-client) > > Deprecated — use Knowledges instead. Still the only connector exposing the administrative surface: per-store API keys, RBAC bindings, skills and diagnostics. > [card] [Tableau](/apps-store/marketplace/connectors/tableau) > > Read and act on Tableau Cloud / Server: REST API 3.x, Metadata GraphQL, VizQL Data Service and Pulse from DSUL or AI agents. > [card] [WebDAV](/apps-store/marketplace/connectors/webdav) > > Browse, read and write files on any WebDAV server (Nextcloud, ownCloud, generic HTTPS WebDAV). 10 file/directory operations with Basic or Bearer auth. > [card] [Word](/apps-store/marketplace/connectors/word) > > Build, upload, parse, convert, version, and manage Microsoft Word documents stored in OneDrive or SharePoint. ## Choosing the Right Mode | Criteria | App Mode | MCP Mode | | - | - | - | | **Caller** | DSUL automations | AI agents (LLM) | | **Tool discovery** | Manual (you specify which automation) | Automatic (agent selects tools) | | **Authentication** | Workspace config | Headers, user session, or workspace config | | **Use case** | Deterministic workflows | Conversational AI, agentic tasks | ### Provider-Specific Fields Some external services expose configurable fields that are defined outside Prisme.ai, such as Jira custom fields, CRM properties, ticket attributes, or board columns. Connector operations should expose these through a generic structured object such as `fields` when the provider API accepts arbitrary field IDs or keys. Prisme.ai passes values to fields that already exist in the external service; it does not create new provider fields unless the connector explicitly includes administrative tools for that provider. When field IDs, available work types, screens, layouts, or create/update metadata matter, use the connector's discovery operations first. Avoid hardcoding provider-specific IDs or assumptions in automations and tests. ### When to Use App Mode * You're building a workflow automation (e.g., sync data on a schedule) * You know exactly which operations to call * You want to chain multiple operations in a single automation * You don't need AI to decide which operations to use ```yaml theme={null} # Example: App mode in DSUL - Jira.searchJira: jql: "project = DEV AND status = 'In Progress'" maxResults: 10 output: results ``` ### When to Use MCP Mode * You're building an AI agent that needs access to external services * The agent should dynamically choose which operations to call * Users interact via natural language (chat interface) * You want tool discovery and schema introspection ```json theme={null} // Example: MCP tool call from AI agent { "name": "searchJira", "arguments": { "jql": "project = DEV AND status = 'In Progress'", "maxResults": 10 } } ``` ## Architecture Each connector is built as a **single Prisme.ai workspace** and published as an app. App-mode instructions and workspace-specific MCP calls run in the installed tenant app instance, reading that workspace's configuration and credentials. Connectors using central per-user OAuth can also expose an optional global MCP endpoint from the connector core. ```mermaid theme={null} flowchart TB subgraph tenant["Your Workspace"] direction TB dsul["DSUL Automation"] agent["Agent Creator agent"] subgraph inst["Connector app instance (tenant context)"] mcp["MCP endpoint"] app["App-mode instructions"] end end core["Optional global MCP endpoint
(connector core)"] api["External API
(Jira, Microsoft Graph)"] dsul -->|"Connector.operation()"| app agent -->|"MCP tools"| mcp agent -.->|"Optional global MCP"| core mcp --> api app --> api core -.-> api ``` The connector wraps the external API as reusable operations, handles authentication (API key, OAuth2, JWT, and more), and groups endpoints into LLM-friendly entity tools. Workspace-specific MCP endpoints gate agents with the tenant allowlist; optional global endpoints rely on per-user OAuth and provider authorization. > [card] [Connector Architecture and Security](/apps-store/marketplace/connectors/architecture) > > Review execution topologies, request controls, authentication, secrets, and agent authorization. ## Next Steps > [card] [Jira Connector](/apps-store/marketplace/connectors/jira) > > Get started with Jira integration > [card] [Building Custom Connectors](/apps-store/marketplace/extending-apps) > > Create your own connector for any API # Power BI Source: https://docs.prisme.ai/apps-store/marketplace/connectors/powerbi Query Power BI datasets with DAX, manage workspaces, reports, dashboards and refreshes from Agent Creator agents and Builder workflows, with per-user Microsoft Entra ID OAuth ![Power BI](https://mintcdn.com/prismeai/X6mcItFK5hqZ4oDG/images/connectors/powerbi.png?fit=max\&auto=format\&n=X6mcItFK5hqZ4oDG\&q=85\&s=fed5aef2f78278f91cc0931b83b8af2f) The Power BI app provides read/write access to the [Microsoft Power BI REST API (v1.0)](https://learn.microsoft.com/en-us/rest/api/power-bi/) through its official endpoints. It can be consumed two ways: as a remote MCP server that **Agent Creator** agents call as tools, or as a Builder app whose instructions you call directly from DSUL. The MCP surface groups every operation into **eleven entity tools** (`workspaces`, `datasets`, `query`, `refresh`, `reports`, `dashboards`, `dataflows`, `gateways`, `imports`, `capacities`, `admin`), each driven by an `action` argument, and runs in the **tenant app-instance context** (it resolves the installing workspace's own credentials and authorizes the calling agent against a per-workspace allowlist). Authentication is **per-user OAuth2 authorization-code with PKCE against Microsoft Entra ID**: each end user signs in with their own Microsoft account, so every call runs with that user's Power BI permissions. > [card] DAX & semantic models > > Run DAX queries against datasets, inspect schema, parameters and datasources, trigger and schedule refreshes > [card] Reports & dashboards > > List, clone, rebind, export (PDF/PPTX/PNG) reports and dashboards, manage tiles and generate embed tokens > [card] Workspaces & admin > > Manage workspaces (groups) and their users, gateways, dataflows, imports and capacities, plus tenant admin APIs ## Who is this for? This connector is used by three different roles. Jump to the section that matches yours; each one is self-contained. > [card] Agent builder > > You build agents in **Agent Creator** and want them to query and manage Power BI. → *Agent builder* tab. > [card] Platform admin > > You run the platform and register the shared Microsoft Entra ID OAuth application. → *Platform admin setup* accordion below. > [card] Workspace builder > > You write Builder automations (DSUL) that call Power BI operations directly. → *Workspace builder* tab. ## Prerequisites * A **Microsoft Power BI** account (Power BI Pro / Premium Per User, or access to a Premium / Fabric capacity for paginated exports and the admin APIs). * A **Microsoft Entra ID** (formerly Azure AD) tenant where you can register an OAuth **application**, done in the [Microsoft Entra admin center](https://entra.microsoft.com) under **App registrations**. * The application must request delegated **Power BI service** permissions; the connector requests this default scope set: ```text theme={null} https://analysis.windows.net/powerbi/api/.default offline_access openid profile ``` * For tenant-wide admin operations (`admin` tool), the connected user must be a **Fabric / Power BI administrator**, and the Power BI tenant settings must allow service-principal / API access where applicable. * To run DAX queries, the **"Dataset Execute Queries REST API"** must be enabled in the Power BI tenant settings. > [accordion] Platform admin (Governance): one-time platform setup > > **Goal:** two one-time tasks: (1) register the shared **Microsoft Entra ID OAuth application** and enter its credentials through the connector's configuration app so every workspace lets its users sign in with their own Microsoft account, and (2) expose Power BI as a reusable **capability** in AI Governance so agent builders can pick it without pasting endpoint URLs. > > ## 1. Configure the connector > > **1. Register the OAuth application in Microsoft Entra ID** > > In the [Microsoft Entra admin center](https://entra.microsoft.com), open **Identity > Applications > App registrations > New registration**. Choose a *Web* platform and set the single redirect URI to the connector's OAuth callback: > > ```text theme={null} > /workspaces/slug:powerbi/webhooks/oauthCallback > ``` > > (e.g. `https://api.studio.prisme.ai/v2/workspaces/slug:powerbi/webhooks/oauthCallback` on production). Under **API permissions**, add the **Power BI Service** delegated permissions matching the scopes in *Prerequisites*, then create a **client secret**. Save the **Application (client) ID**, the **client secret** and the **directory (tenant) ID**. > > **2. Enter the credentials through the configuration app** > > Open the central `powerbi` workspace and launch its **Configuration app**: `/apps/powerbi` (e.g. `https://studio.prisme.ai/apps/powerbi`), also linked as `Configuration app` on the installed instance. Follow the in-app instructions to paste the **client ID**, **client secret** and **tenant**; the app stores them in the workspace's secrets for you. Do not edit Studio's raw Secrets by hand. > > **3. Tell workspaces to connect** > > Each consuming workspace opens the same configuration app, then its users click **Connexion** to sign in with their own Microsoft account (PKCE authorization-code flow). Tokens are stored per user and refreshed automatically. > > ## 2. Declare the capability in AI Governance > > Generic connectors (broad tool surfaces meant to be shared across many agents, like Power BI) are best exposed as a named **capability** in AI Governance. Agent builders then enable that capability on their agents instead of pasting a raw MCP endpoint. > > **1. Open AI Governance > Capabilities** > > Create (or edit) the **Power BI** capability. > > **2. Point it at the MCP endpoint** > > Set the capability's MCP server URL to the connector's **MCP Endpoint**, and set its **Scope** to: > > ```text theme={null} > context_id,agent_id,user_id > ``` > > The `agent_id` in the scope is what lets the connector identify and authorize the calling agent. > > **3. Make it available to agent builders** > > Once created, the capability appears in the capability picker for agent builders in your organization, who enable it on their agents. Access to the catalog follows your organization's existing roles; there is no per-capability role grant. > > **4. Smoke-test** > > From an agent that has the capability, trigger any tool. The user is prompted to connect once (Microsoft sign-in); subsequent calls reuse the stored token transparently and refresh it automatically. > > > [!WARNING] > > > > Declaring the capability makes the connector **available**; it does not by itself authorize a specific agent. This connector follows the **tenant-context model**: which agents may actually call it is gated per-workspace by the **authorized-agents allowlist** in the configuration app (see the *Workspace builder* tab). Agents show a **Connect** button only if the catalog entry carries the connector's connect / status / disconnect webhooks in its `auth` block. The configuration app's **Add to catalog** button writes it for you. If you create the entry by hand, paste that block into **Auth Configuration**: the platform adds it later on its own only for a workspace endpoint (ending in `.mcp`), never for the connector's global `/webhooks/mcp` endpoint. *** > [tab] Agent builder (Agent Creator) > > ## Agent builder > > **Goal:** let an agent you build in Agent Creator query and manage Power BI through MCP tools. > > > [!NOTE] > > > > Before an agent can call the connector, a *Workspace builder* must have installed and configured the Power BI app in a workspace (see the *Workspace builder* tab), and a *Platform admin* must have registered the Microsoft Entra ID OAuth application (see the *Platform admin setup* accordion above). > > This connector runs in the **tenant app-instance context**: your agent is authorized two ways at once: it is identified by the `agent_id` that Agent Creator injects through the capability *Scope*, and that agent must appear in the connector's **authorized-agents allowlist** (managed in the configuration app). The Power BI access token itself is resolved server-side from the connected user's OAuth session. > > There are two ways to wire it up. Pick based on how much isolation you need. > > ## Option A: Enable the shared capability from the catalog > > The fastest path: a *Platform admin* (or a workspace owner via the config app's one-click **Add to catalog** button) has already published a **Power BI** capability to your organization's catalog, so you just pick it. > > **1. Open your agent in Agent Creator** > > Open the agent you want to extend and go to its capabilities / tools. > > **2. Add the Power BI capability** > > Browse the capability catalog, select **Power BI**, and enable it. The MCP endpoint URL and the *Scope* (`context_id,agent_id,user_id`) are already wired: nothing to paste, and the shared instance accepts every agent granted the capability, so there is no allowlist step on your side. > > **3. Connect a Microsoft account** > > On the first tool call, an unconnected user is prompted to sign in; Agent Creator surfaces a `connect_url`. Subsequent calls reuse the stored token. > > > [!NOTE] > > > > Convenient, but your agent runs against a **shared, platform-managed instance**: its Entra ID OAuth client is owned by someone else and the instance accepts every agent that is granted the capability. Prefer Option B for anything beyond quick experiments. > > ## Option B: Run it from your own workspace (recommended) > > For production agents, install the connector in **your own workspace** and point the agent at *that* workspace's MCP endpoint. > > > [!WARNING] > > > > **Prefer this mode for security.** Because the MCP runs in *your* app-instance context, the OAuth client, the per-user Power BI tokens and the authorized-agents allowlist are all **scoped to your workspace**, not shared platform-wide. You decide exactly which agents may call it and which Microsoft accounts back them, and a misconfiguration elsewhere can never expose your data. The shared catalog capability (Option A) is a broad surface many agents can reach; your own workspace is an isolated, least-privilege boundary. > > **1. Install and configure the connector in your workspace** > > Follow the *Workspace builder* tab: install **Power BI** in your workspace, open its **Configuration app**, and connect a Microsoft account. > > **2. Allowlist your agent** > > In that workspace's config app, open **Authorized agents** and tick your agent (the **Install capability** button does this for you), or enable **Allow all agents**. > > **3. Add the MCP capability to your agent** > > In your agent, add a capability pointing at **your workspace's MCP Endpoint** URL, and set its **Scope** to: > > ```text theme={null} > context_id,agent_id,user_id > ``` > > The `agent_id` is what lets the connector identify and authorize your agent; without it, every call is rejected with an explicit "agent could not be identified" message. This *Scope* is separate from the Microsoft OAuth scopes. > > **4. Connect a Microsoft account** > > On the first tool call, the user is prompted to sign in (or uses **Connexion** in the config app). > > ## Brief the agent in its system prompt > > Whichever option you pick, wiring the capability is not enough: the agent must know the MCP exists and when to use it. Copy-pasteable starter: > > ```text theme={null} > You have access to the Power BI MCP server (tools: workspaces, datasets, query, refresh, reports, dashboards, dataflows, gateways, imports, capacities, admin). Each tool takes an `action` argument plus per-action parameters. Use the `query` tool (action executeQuery) to answer data questions with DAX against a dataset; use `datasets` getSchema first to discover tables and columns. Power BI's `groupId` is the workspace id and is optional (empty = "My workspace"). Prefer calling a tool over guessing, and confirm with the user before any destructive action (delete a dataset/report, cancel a refresh). > ``` > > > [!NOTE] > > > > **Legacy AI Knowledge agents** (no native MCP picker): add the connector under **Advanced > Tools > MCP** and paste the **MCP Endpoint** URL. The agent still has to be allowlisted in the config app and its identity propagated so the connector can read its `agent_id`. > > > [!NOTE] > > > > **Restricting to read-only (least privilege).** Power BI tools cover both reads and writes (refresh, take over, create/delete). The connector requests the `.default` scope, so the issued token inherits **exactly** the permissions granted to the Microsoft Entra **app registration**; it never forces write access. To allow only read access, grant the app only read-level **Power BI Service** delegated permissions (e.g. `Dataset.Read.All`, `Report.Read.All`, `Dashboard.Read.All`, `Workspace.Read.All`) instead of their `*.ReadWrite.All` variants. The connection still succeeds (the connection check is a read); any write call is then rejected by Power BI with `403 Forbidden`, surfaced to the agent as an error. This restriction lives on the Entra app, outside any tenant's reach, a hard guarantee. > > ## Available Tools > > Each tool takes an `action` argument selecting the concrete operation, plus the per-action parameters. `groupId` (the workspace id) is optional on most data tools; empty means "My workspace". > > | Tool | Description | > | - | - | > | `workspaces` | Power BI workspaces (groups): list, create, delete and manage workspace users. Actions: `list`, `create`, `delete`, `listUsers`, `addUser`, `updateUser`, `deleteUser`. | > | `datasets` | Datasets (semantic models): list, get, delete, inspect/update datasources & parameters, get schema, take over, bind to a gateway. Actions: `list`, `get`, `delete`, `getTables`, `getDatasources`, `updateDatasources`, `getParameters`, `updateParameters`, `takeOver`, `bindToGateway`, `getSchema`. | > | `query` | Run a DAX query against a dataset and return result rows. Action: `executeQuery`. | > | `refresh` | Dataset refreshes: trigger, read history, get/update schedule, cancel an in-progress refresh. Actions: `trigger`, `history`, `getSchedule`, `updateSchedule`, `cancel`. | > | `reports` | Reports: list, get, delete, clone, rebind, get pages, export (PDF/PPTX/PNG), poll/download an export, update content, generate an embed token. Actions: `list`, `get`, `delete`, `clone`, `rebind`, `getPages`, `getPage`, `export`, `getExportStatus`, `getExportFile`, `updateContent`, `generateToken`. | > | `dashboards` | Dashboards & tiles: list, get, create dashboards; list/get/clone tiles; generate an embed token. Actions: `list`, `get`, `create`, `getTiles`, `getTile`, `cloneTile`, `generateToken`. | > | `dataflows` | Dataflows: list, get (model.json), delete, refresh, list transactions and datasources. Actions: `list`, `get`, `delete`, `refresh`, `getTransactions`, `getDatasources`. | > | `gateways` | On-premises data gateways: list, get, list/create/delete datasources, get a datasource status. Actions: `list`, `get`, `getDatasources`, `createDatasource`, `deleteDatasource`, `getDatasourceStatus`. | > | `imports` | Imports: list imports, get an import, create a temporary upload location (to publish a PBIX). Actions: `list`, `get`, `createUploadLocation`. | > | `capacities` | Premium / Fabric capacities: list capacities, get workloads, get refreshables. Actions: `list`, `getWorkloads`, `getRefreshables`. | > | `admin` | Tenant ADMIN APIs (require the connected user to be a Fabric/Power BI admin): list all workspaces/datasets/reports/dashboards/dataflows, get workspace users, query the activity log, list capacities, get modified workspaces, run the metadata scanner. Actions: `listGroups`, `getGroupUsers`, `listDatasets`, `listReports`, `listDashboards`, `listDataflows`, `getActivityEvents`, `listCapacities`, `getModifiedWorkspaces`, `scanWorkspaces`, `getScanStatus`, `getScanResult`. | > > ## Output Formats > > Every tool accepts an `outputFormat` argument that controls the MCP response shape: > > * **`verbose`** (default): human-readable text optimized for LLM consumption > * **`structured`**: machine-readable JSON in `structuredContent` > * **`both`**: verbose text plus the structured payload > > ## Tool Details > > ### query > > ```json theme={null} > { > "name": "query", > "arguments": { > "action": "executeQuery", > "groupId": "f089354e-8366-4e18-aae3-a5f3c3b0c4d8", > "datasetId": "cfafbeb1-8037-4d0c-896e-a46fb27ff229", > "daxQuery": "EVALUATE TOPN(10, 'Sales', 'Sales'[Amount], DESC)" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | `executeQuery`. | > | `datasetId` | Yes | Target dataset (semantic model) id. | > | `daxQuery` | Yes (or `queries`) | A single DAX query string. Use `queries` for the raw multi-query body. | > | `groupId` | No | Workspace id; omit for "My workspace". | > | `impersonatedUserName` | No | UPN to impersonate for row-level security (admin / service principal). | > > ### datasets > > ```json theme={null} > { > "name": "datasets", > "arguments": { > "action": "getSchema", > "groupId": "f089354e-8366-4e18-aae3-a5f3c3b0c4d8", > "datasetId": "cfafbeb1-8037-4d0c-896e-a46fb27ff229" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | One of `list`, `get`, `delete`, `getTables`, `getDatasources`, `updateDatasources`, `getParameters`, `updateParameters`, `takeOver`, `bindToGateway`, `getSchema`. | > | `datasetId` | For all but `list` | Target dataset id. | > | `groupId` | No | Workspace id; omit for "My workspace". | > | `gatewayObjectId` | For `bindToGateway` | Gateway to bind the dataset to. | > | `updateDetails` | For `updateDatasources`/`updateParameters` | The update payload (datasource mappings or parameter values). | > > > [!NOTE] > > > > `getTables` works **only** for Push-API datasets. On a normal import / DirectQuery semantic model use `getSchema` (column schema via DAX), or the `query` tool with `EVALUATE INFO.VIEW.TABLES()` / `EVALUATE INFO.VIEW.COLUMNS()`. > > ### refresh > > ```json theme={null} > { > "name": "refresh", > "arguments": { > "action": "trigger", > "groupId": "f089354e-8366-4e18-aae3-a5f3c3b0c4d8", > "datasetId": "cfafbeb1-8037-4d0c-896e-a46fb27ff229", > "notifyOption": "MailOnFailure" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | One of `trigger`, `history`, `getSchedule`, `updateSchedule`, `cancel`. | > | `datasetId` | Yes | Target dataset id. | > | `groupId` | No | Workspace id; omit for "My workspace". | > | `refreshId` | For `cancel` | Id of the in-progress refresh to cancel. | > | `notifyOption` | No | Completion notification: `MailOnFailure`, `MailOnCompletion`, `NoNotification`. | > > ### reports > > ```json theme={null} > { > "name": "reports", > "arguments": { > "action": "export", > "groupId": "f089354e-8366-4e18-aae3-a5f3c3b0c4d8", > "reportId": "5b218778-e7a5-4d73-8187-f10824047715", > "format": "PDF" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | One of `list`, `get`, `delete`, `clone`, `rebind`, `getPages`, `getPage`, `export`, `getExportStatus`, `getExportFile`, `updateContent`, `generateToken`. | > | `reportId` | For all but `list` | Target report id. | > | `groupId` | No | Workspace id; omit for "My workspace". | > | `format` | For `export` | `PDF`, `PPTX` or `PNG` (export is async: poll `getExportStatus`, then `getExportFile`). | > | `targetWorkspaceId` / `targetModelId` | For `clone` / `rebind` | Destination workspace / dataset to clone into or rebind to. | > > ### dashboards > > ```json theme={null} > { > "name": "dashboards", > "arguments": { > "action": "generateToken", > "groupId": "f089354e-8366-4e18-aae3-a5f3c3b0c4d8", > "dashboardId": "69ffaa6c-b36d-4d01-96f5-1ed67c64d4af", > "accessLevel": "View" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | One of `list`, `get`, `create`, `getTiles`, `getTile`, `cloneTile`, `generateToken`. | > | `dashboardId` | For all but `list`/`create` | Target dashboard id. | > | `groupId` | No | Workspace id; omit for "My workspace". | > | `tileId` | For `getTile`/`cloneTile` | Target tile id. | > | `accessLevel` | For `generateToken` | Embed token access level, e.g. `View`. | > > ### admin > > ```json theme={null} > { > "name": "admin", > "arguments": { > "action": "getActivityEvents", > "startDateTime": "2026-06-01T00:00:00Z", > "endDateTime": "2026-06-01T23:59:59Z" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | One of `listGroups`, `getGroupUsers`, `listDatasets`, `listReports`, `listDashboards`, `listDataflows`, `getActivityEvents`, `listCapacities`, `getModifiedWorkspaces`, `scanWorkspaces`, `getScanStatus`, `getScanResult`. | > | `groupId` | For `getGroupUsers` and per-workspace listings | Workspace id. | > | `startDateTime` / `endDateTime` | For `getActivityEvents` | ISO 8601 window (same UTC day, per the Power BI admin API). | > | `workspaces` | For `scanWorkspaces` | Array of workspace ids to scan. | > | `scanId` | For `getScanStatus`/`getScanResult` | Id returned by `scanWorkspaces`. | > > > [!NOTE] > > > > All `admin` actions require the **connected user to be a Fabric / Power BI administrator**; otherwise the provider returns `401` / `403`. > [tab] Workspace builder (DSUL) > > ## Workspace builder > > ## Installation > > 1. Go to **Apps** in your workspace > 2. Search for **Power BI** and install it > 3. Open the **Configuration app** (the link auto-populated on install) to connect a Microsoft account and manage the authorized-agents allowlist > > ## Configuration > > | Field | Description | > | - | - | > | **Configuration app** | Auto-populated on install. Open this link to register the Microsoft Entra ID OAuth credentials, connect a Microsoft account, and manage the authorized-agents allowlist. | > > The configuration app drives everything; the app instance itself has no per-field credential form. Authentication is a single mode: > > | Auth mode | What you provide | Best for | > | - | - | - | > | Per-user OAuth2 (PKCE) | Microsoft Entra ID **client ID + secret + tenant** (entered once in the config app), then each user clicks **Connexion** | Every workspace: each user acts with their own Power BI permissions | > > > [!NOTE] > > > > Credentials are provisioned into the workspace's Secrets by the `onInstall` flow and resolved server-side. The agent allowlist (**Authorized agents**) gates which Agent Creator agents may call the MCP endpoint; see the *Agent builder* tab. Per-user tokens are refreshed automatically; a revoked token drops the connection and the user is asked to reconnect. > > ## Available Instructions > > Every instruction resolves credentials from the workspace configuration. Operations are grouped by Power BI resource; the MCP server exposes the same operations behind the eleven entity tools (see the *Agent builder* tab). `groupId` is the workspace id and is optional on data operations (omit for "My workspace"). > > ### Workspaces (groups) > > | Instruction | Description | Returns | > | - | - | - | > | `listWorkspaces` | List the workspaces (groups) the user can access. | `{ value: [{ id, name, isReadOnly, type }] }` | > | `createWorkspace` | Create a workspace by `name`. | The created group `{ id, name }`. | > | `deleteWorkspace` | Delete a workspace by `groupId`. | Empty (HTTP 200). | > | `listWorkspaceUsers` | List the users/roles of a workspace by `groupId`. | `{ value: [{ identifier, principalType, groupUserAccessRight }] }` | > | `addWorkspaceUser` | Grant a user/group access: `user` = `{ identifier, principalType, groupUserAccessRight }`. | Empty (HTTP 200). | > | `updateWorkspaceUser` | Change a user's access right on a workspace. | Empty (HTTP 200). | > | `deleteWorkspaceUser` | Remove a user from a workspace by `emailAddress`/`identifier`. | Empty (HTTP 200). | > > ### Datasets (semantic models) > > | Instruction | Description | Returns | > | - | - | - | > | `listDatasets` | List datasets in a workspace (or "My workspace"). | `{ value: [{ id, name, configuredBy, isRefreshable }] }` | > | `getDataset` | Fetch one dataset by `datasetId`. | A Dataset resource `{ id, name, webUrl, … }`. | > | `deleteDataset` | Delete a dataset by `datasetId`. | Empty (HTTP 200). | > | `getDatasetSchema` | Discover the model's column schema via DAX. | `{ tables: [{ name, columns: [{ name, dataType }] }] }` | > | `getDatasetTables` | List push-API dataset tables (Push datasets only). | `{ value: [{ name, columns }] }` | > | `getDatasetDatasources` | List a dataset's datasources. | `{ value: [{ datasourceType, connectionDetails, … }] }` | > | `updateDatasetDatasources` | Remap datasources via `updateDetails`. | Empty (HTTP 200). | > | `getDatasetParameters` | List the dataset's M parameters. | `{ value: [{ name, type, currentValue }] }` | > | `updateDatasetParameters` | Set parameter values via `updateDetails`. | Empty (HTTP 200). | > | `takeOverDataset` | Take over a dataset (bind it to the calling user). | Empty (HTTP 200). | > | `bindDatasetToGateway` | Bind a dataset to a gateway by `gatewayObjectId`. | Empty (HTTP 200). | > > ### DAX query > > | Instruction | Description | Returns | > | - | - | - | > | `executeQueries` | Run a DAX query (`daxQuery`, or a raw `queries` body) against `datasetId`; `impersonatedUserName` for RLS. | `{ results: [{ tables: [{ rows: [ {…} ] }] }] }` | > > ### Refreshes > > | Instruction | Description | Returns | > | - | - | - | > | `refreshDataset` | Trigger a refresh of `datasetId`; `notifyOption` controls notifications. | Empty (HTTP 202) with a refresh request id header. | > | `getRefreshHistory` | List recent refreshes; `top` caps the count. | `{ value: [{ requestId, status, startTime, endTime }] }` | > | `getRefreshSchedule` | Read the scheduled-refresh configuration. | `{ days, times, enabled, localTimeZoneId, notifyOption }` | > | `updateRefreshSchedule` | Update the refresh schedule via `value`. | Empty (HTTP 200). | > | `cancelRefresh` | Cancel an in-progress refresh by `refreshId`. | Empty (HTTP 200). | > > ### Reports > > | Instruction | Description | Returns | > | - | - | - | > | `listReports` | List reports in a workspace. | `{ value: [{ id, name, datasetId, webUrl, embedUrl }] }` | > | `getReport` | Fetch one report by `reportId`. | A Report resource `{ id, name, datasetId, embedUrl }`. | > | `deleteReport` | Delete a report by `reportId`. | Empty (HTTP 200). | > | `cloneReport` | Clone a report into `targetWorkspaceId` / `targetModelId` with a new `name`. | The cloned Report `{ id, name }`. | > | `rebindReport` | Rebind a report to another dataset (`datasetId`). | Empty (HTTP 200). | > | `getReportPages` / `getReportPage` | List a report's pages / get one by `pageName`. | `{ value: [{ name, displayName, order }] }` / a Page resource. | > | `exportReport` | Start an async export to `format` (PDF/PPTX/PNG). | `{ id, status }` (poll for completion). | > | `getReportExportStatus` | Poll an export by `exportId`. | `{ id, status, percentComplete, resourceLocation }` | > | `getReportExportFile` | Download the finished export by `exportId`. | The exported file bytes. | > | `updateReportContent` | Overwrite a report's content from a source report. | Empty (HTTP 200). | > | `generateReportToken` | Generate an embed token; `accessLevel`, optional `identities` for RLS. | `{ token, tokenId, expiration }` | > > ### Dashboards & tiles > > | Instruction | Description | Returns | > | - | - | - | > | `listDashboards` | List dashboards in a workspace. | `{ value: [{ id, displayName, embedUrl }] }` | > | `getDashboard` | Fetch one dashboard by `dashboardId`. | A Dashboard resource `{ id, displayName, embedUrl }`. | > | `createDashboard` | Create a dashboard by `name`. | The created Dashboard `{ id, displayName }`. | > | `getDashboardTiles` / `getDashboardTile` | List a dashboard's tiles / get one by `tileId`. | `{ value: [{ id, title, embedUrl }] }` / a Tile resource. | > | `cloneDashboardTile` | Clone a tile into `targetDashboardId` (optionally rebinding report/model). | The cloned Tile `{ id, title }`. | > | `generateDashboardToken` | Generate an embed token for a dashboard; `accessLevel`. | `{ token, tokenId, expiration }` | > > ### Dataflows > > | Instruction | Description | Returns | > | - | - | - | > | `listDataflows` | List dataflows in a workspace. | `{ value: [{ objectId, name, description }] }` | > | `getDataflow` | Fetch a dataflow's `model.json` by `dataflowId`. | The dataflow model JSON. | > | `deleteDataflow` | Delete a dataflow by `dataflowId`. | Empty (HTTP 200). | > | `refreshDataflow` | Trigger a dataflow refresh; `processType`/`notifyOption`. | Empty (HTTP 200). | > | `getDataflowTransactions` | List a dataflow's refresh transactions. | `{ value: [{ id, status, startTime, endTime }] }` | > | `getDataflowDatasources` | List a dataflow's datasources. | `{ value: [{ datasourceType, connectionDetails }] }` | > > ### Gateways > > | Instruction | Description | Returns | > | - | - | - | > | `listGateways` | List the on-premises data gateways. | `{ value: [{ id, name, type, gatewayStatus }] }` | > | `getGateway` | Fetch one gateway by `gatewayId`. | A Gateway resource `{ id, name, publicKey }`. | > | `getGatewayDatasources` | List a gateway's datasources. | `{ value: [{ id, datasourceType, datasourceName }] }` | > | `createGatewayDatasource` | Create a datasource: `dataSourceType`, `connectionDetails`, `credentialDetails`, `datasourceName`. | The created datasource `{ id }`. | > | `deleteGatewayDatasource` | Delete a datasource by `datasourceId`. | Empty (HTTP 200). | > | `getGatewayDatasourceStatus` | Check a datasource's connectivity status. | `{ status }` (or an error object). | > > ### Imports > > | Instruction | Description | Returns | > | - | - | - | > | `listImports` | List imports in a workspace. | `{ value: [{ id, importState, reports, datasets }] }` | > | `getImport` | Fetch one import by `importId`. | An Import resource `{ id, importState, reports, datasets }`. | > | `createImportUploadLocation` | Create a temporary upload URL to publish a PBIX. | `{ url }` (time-limited upload location). | > > ### Capacities > > | Instruction | Description | Returns | > | - | - | - | > | `listCapacities` | List the Premium / Fabric capacities the user can see. | `{ value: [{ id, displayName, sku, state }] }` | > | `getCapacityWorkloads` | List a capacity's workloads by `capacityId`. | `{ value: [{ name, state, maxMemoryPercentageSetByUser }] }` | > | `getCapacityRefreshables` | List refreshables on a capacity; `top`/`expand`. | `{ value: [{ id, refreshCount, refreshFailures, … }] }` | > > ### Admin (tenant) > > | Instruction | Description | Returns | > | - | - | - | > | `adminListGroups` | List all workspaces in the tenant; `filter`/`top`/`skip`. | `{ value: [{ id, name, type, state }] }` | > | `adminGetGroupUsers` | List a workspace's users (admin) by `groupId`. | `{ value: [{ identifier, principalType, groupUserAccessRight }] }` | > | `adminListDatasets` / `adminListReports` / `adminListDashboards` / `adminListDataflows` | Tenant-wide listing of each resource. | `{ value: [ … ] }` | > | `adminGetActivityEvents` | Query the activity log between `startDateTime`/`endDateTime` (same UTC day). | `{ activityEventEntities: [...], continuationToken }` | > | `adminListCapacities` | List all capacities in the tenant. | `{ value: [{ id, displayName, sku, state }] }` | > | `adminGetModifiedWorkspaces` | List workspaces modified since `modifiedSince`. | `{ value: [{ id }] }` | > | `adminScanWorkspaces` | Start a metadata scan over `workspaces[]` (`lineage`, `datasourceDetails`, `datasetSchema`, `datasetExpressions`). | `{ id, status }` (scan id). | > | `adminGetScanStatus` / `adminGetScanResult` | Poll a scan by `scanId` / fetch the scan result. | `{ id, status }` / the full metadata scan result. | > > > [!NOTE] > > > > `Returns` shows the shape of the operation output (the underlying Power BI API resource). `groupId` is the workspace id and is optional on data operations; omit it to target "My workspace". All `admin*` instructions require the connected user to be a Fabric / Power BI administrator. > > ## DSUL Examples > > **List datasets in a workspace, then run a DAX query:** > > ```yaml theme={null} > - Power BI.listDatasets: > groupId: '{{workspaceId}}' > output: datasets > - Power BI.executeQueries: > groupId: '{{workspaceId}}' > datasetId: '{{datasets.value[0].id}}' > daxQuery: "EVALUATE TOPN(10, 'Sales', 'Sales'[Amount], DESC)" > output: rows > ``` > > **Trigger a refresh and check its history:** > > ```yaml theme={null} > - Power BI.refreshDataset: > groupId: '{{workspaceId}}' > datasetId: '{{datasetId}}' > notifyOption: MailOnFailure > - Power BI.getRefreshHistory: > groupId: '{{workspaceId}}' > datasetId: '{{datasetId}}' > top: 5 > output: history > ``` > > **Export a report to PDF (async: start, poll, download):** > > ```yaml theme={null} > - Power BI.exportReport: > groupId: '{{workspaceId}}' > reportId: '{{reportId}}' > format: PDF > output: export > - Power BI.getReportExportStatus: > groupId: '{{workspaceId}}' > reportId: '{{reportId}}' > exportId: '{{export.id}}' > output: status > - Power BI.getReportExportFile: > groupId: '{{workspaceId}}' > reportId: '{{reportId}}' > exportId: '{{export.id}}' > output: file > ``` > > **Discover a model's structure with DAX (works on import/DirectQuery models):** > > ```yaml theme={null} > - Power BI.executeQueries: > groupId: '{{workspaceId}}' > datasetId: '{{datasetId}}' > daxQuery: "EVALUATE INFO.VIEW.TABLES()" > output: tables > ``` *** ## Security The answers that hold for every connector (agent access, shared knowledge bases, credentials, models, egress) are on [Connector security](/apps-store/marketplace/connectors/security). This section lists what is specific to Power BI. | Topic | Power BI | | - | - | | Authentication family | Delegated OAuth (Microsoft Entra, authorization code with PKCE): each user connects their own Microsoft 365 account. | | Production modes | `oauth` (the only mode) | | Modes to avoid in production | None: the connector has no static token or app-only mode. | | Read-only scopes | `offline_access`, `openid`, `profile`, `Workspace.Read.All`, `Dataset.Read.All`, `Report.Read.All`, `Dashboard.Read.All`, `Dataflow.Read.All`, `Gateway.Read.All`, `Capacity.Read.All`, `App.Read.All` (the **Read-only preset** of the configuration app). The default scope is `https://analysis.windows.net/powerbi/api/.default`. | | Agent allowlist | Yes (empty at installation). The connector has no global endpoint. | | Per-reader access control on knowledge bases | Not applicable: this connector does not feed knowledge bases. | | Outbound hosts | `api.powerbi.com`, `login.microsoftonline.com` | | Audit events | None specific to this connector | The default scope `.default` grants every Power BI permission consented on the Entra application registration, so the registration, not the connector, decides what agents can do, including the tenant-wide admin APIs when `Tenant.Read.All` is consented. Entra refuses a request that mixes `.default` with individual scopes: replace it with the read-only preset rather than adding to it. *** ## Error Handling | HTTP code | Meaning | | - | - | | `400` | Bad request: invalid parameters, malformed body or DAX syntax error. | | `401` | Unauthorized: the Power BI access token is missing, expired or revoked. The user must reconnect. | | `403` | Forbidden: insufficient OAuth scope, the account lacks access to the resource, or an `admin` action by a non-admin user. | | `404` | Not found: the workspace, dataset, report, dashboard or other id does not exist or is not visible to the account. | | `409` | Conflict: e.g. a refresh is already in progress, or a name collision when creating a resource. | | `429` | Rate limit / capacity throttling: back off and retry. | | `500` / `503` | Power BI service error: transient; retry shortly, no reconnection needed. | ### Common Issues **"This agent is not authorized to use this connector"**: The calling agent is not in the allowlist. Open the configuration app → **Authorized agents** → tick this agent (or enable **Allow all agents**) and Save. **"The calling agent could not be identified"**: The MCP capability *Scope* does not declare `agent_id`, so Agent Creator never injects the agent identity. Set the Scope to `context_id,agent_id,user_id` on the capability, then allow the agent in the config app. **"Power BI is not connected for this user"**: No per-user OAuth token. Open the configuration app and click **Connexion**, or use the agent's connect flow. **"Power BI token refresh failed … must reconnect"**: The stored refresh token was revoked or expired (Microsoft Entra ID invalidated it). The connection is dropped automatically; the user must reconnect from the config app. **"Power BI OAuth is not configured"**: The Microsoft Entra ID client ID/secret/tenant is missing. Open the configuration app and enter the OAuth credentials (or ask the platform admin to register the central application). **`getTables` fails with "not Push API dataset"**: `getTables` only works on Push-API datasets. To inspect a normal import / DirectQuery semantic model, use the `datasets` `getSchema` action, or run a DAX query such as `EVALUATE INFO.VIEW.TABLES()` / `EVALUATE INFO.VIEW.COLUMNS()` via the `query` tool. ## External Resources > [card] [Power BI REST API](https://learn.microsoft.com/en-us/rest/api/power-bi/) > > Official reference for the Microsoft Power BI REST API (v1.0). > [card] [Tool Agents](/products/agent-factory/capabilities) > > Learn how Agent Creator agents consume MCP tools in Prisme.ai. # Salesforce Source: https://docs.prisme.ai/apps-store/marketplace/connectors/salesforce Read and write Salesforce CRM data from Agent Creator agents and Builder workflows: records, SOQL/SOSL, Bulk API, Tooling, reports and approvals ![Salesforce](https://mintcdn.com/prismeai/Oqq72tWGTtxufvRl/images/connectors/salesforce.svg?fit=max\&auto=format\&n=Oqq72tWGTtxufvRl\&q=85\&s=cbbb69ece1342bb11866095892a78e1c) The Salesforce app provides read/write access to a Salesforce org through the [Salesforce REST API v62.0](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/). It can be consumed two ways: as a remote MCP server that **Agent Creator** agents call as tools, or as a Builder app whose instructions you call directly from DSUL. The MCP surface groups every operation into thematic **dispatcher tools** (`records`, `query`, `bulkIngest`, `tooling`, …), each driven by an `action` argument, and runs in the **tenant app-instance context** (it resolves the installing workspace's own Salesforce credentials and gates each agent against a per-workspace allowlist). Authentication is resolved server-side and supports several modes: * **OAuth2 JWT Bearer** (`jwt`, default): service-to-service auth through a Connected App and a service-account user. No interactive sign-in. * **OAuth2 client credentials** (`clientCredentials`): the Connected App's `client_credentials` grant, run as the configured Connected App user. * **Per-user OAuth2** (`oauth`): each end user signs in with their own Salesforce account (authorization-code + PKCE); tokens are stored per user and auto-refreshed. * **Direct access token** (`accessToken`): a caller-managed Salesforce access token + instance URL, used as-is with no exchange. > [card] CRM Records > > Create, read, update, delete and upsert sObjects (Accounts, Contacts, Leads, Opportunities, custom objects) and run SOQL / SOSL searches across them > [card] Bulk & Composite > > Bulk API 2.0 ingest/query jobs and Composite endpoints for high-volume, multi-record and atomic operations > [card] Reports & Process > > Reports, dashboards, approval processes, quick actions, Tooling API (Apex + metadata) and Metadata package deploys ## Who is this for? This connector is used by three different roles. Jump to the section that matches yours; each one is self-contained. > [card] Agent builder > > You build agents in **Agent Creator** and want them to read and act on Salesforce. → *Agent builder* tab. > [card] Platform admin > > You run the platform and want to publish Salesforce as a reusable capability. → *Platform admin setup* accordion below. > [card] Workspace builder > > You write Builder automations (DSUL) that call Salesforce operations directly. → *Workspace builder* tab. ## Prerequisites (Salesforce side) * A **Salesforce** org with administrator access (Production, Developer Edition or Sandbox). * A **Connected App** created in *Setup > App Manager > New Connected App*, with **OAuth Settings** enabled. Its **Consumer Key** and **Consumer Secret** back the OAuth / JWT / client-credentials modes. * The OAuth scopes `api refresh_token offline_access` selected on the Connected App. * The **Login Host** matching the org type: `https://login.salesforce.com` for production / Developer Edition, `https://test.salesforce.com` for sandbox, or a custom My Domain host like `https://.my.salesforce.com`. * For **JWT Bearer** (default mode): enable *Use digital signatures* on the Connected App, upload the matching public certificate, pre-authorize the runtime user, and keep the matching RSA private key (PEM) plus the service-account username. * For **per-user OAuth**: the Connected App's *Callback URL* must contain the connector's auto-computed **OAuth Redirect URI** (shown in the configuration app after install). > [accordion] Platform admin (Governance): one-time platform setup > > **Goal:** Salesforce is a **per-workspace** connector: each workspace configures its own Connected App credentials and auth mode (see the *Workspace builder* tab), so there is **no platform-wide credential to provision**. The only optional platform task is to publish Salesforce as a reusable **capability** so agent builders across the org can enable it from the catalog instead of pasting a raw MCP endpoint. > > > [!NOTE] > > > > There is no shared Salesforce credential and no central OAuth client for this connector. The Connected App credentials, the per-user OAuth tokens and the authorized-agents allowlist always live in the consuming workspace. A capability you publish here points at a specific workspace's MCP endpoint; that workspace still owns the credentials and the allowlist. > > ## 1. Configure the connector > > There is nothing to configure at the platform level. Each consuming workspace installs the Salesforce app, opens its **Configuration app** and provides its own Connected App credentials + auth mode (see the *Workspace builder* tab). The credentials are scoped to that workspace and never shared org-wide. > > ## 2. Declare the capability in AI Governance (optional) > > You have two ways to make Salesforce discoverable as a capability. Both point at a workspace's MCP endpoint and use the same *Scope*; pick whichever fits your governance model. > > **1. Easy path: one-click 'Add to catalog' from the config app** > > Open the connector's **Configuration app** in the workspace that owns the credentials. As an **org owner or admin**, you'll see an **Add to catalog** button (under *Capabilities catalog*). Clicking it publishes Salesforce to your organization's **Capabilities catalog** as an `mcp` entry, pre-wired with the workspace's MCP endpoint, the *Scope* `context_id,agent_id,user_id`, and (in `oauth` mode) the per-user connect / status / disconnect URLs. Once published it is **org-wide**: every builder in the org can attach it to an agent from the catalog. The button is only shown to org owners/admins, and it updates the existing entry if one already points at that endpoint. > > **2. Manual path: declare it yourself in AI Governance** > > Alternatively, open **AI Governance > Capabilities**, create (or edit) a **Salesforce** capability, set its MCP server URL to the connector's **MCP Endpoint**, and set its **Scope** to: > > ```text theme={null} > context_id,agent_id,user_id > ``` > > The `agent_id` in the scope is what lets the connector identify and authorize the calling agent. > > **3. Make it available to agent builders** > > Either path makes the capability appear in the capability picker for agent builders in your organization. Access to the catalog follows your organization's existing roles; there is no per-capability role grant. Which agents may actually call this tenant-context connector is gated separately by the per-workspace allowlist (see below). > > > [!WARNING] > > > > Declaring or publishing the capability makes the connector **available**; it does not by itself authorize a specific agent. This connector follows the **tenant-context model**: the catalog entry points at a workspace that still owns the credentials and the **authorized-agents allowlist**. An agent attaching the published capability still has to be allowlisted in that workspace's config app (or the workspace must enable **Allow all agents**). Agents show a **Connect** button only if the catalog entry carries the connector's connect / status / disconnect webhooks in its `auth` block. The configuration app's **Add to catalog** button writes it for you. If you create the entry by hand, paste that block into **Auth Configuration**: the platform adds it later on its own only for a workspace endpoint (ending in `.mcp`), never for the connector's global `/webhooks/mcp` endpoint. *** > [tab] Agent builder (Agent Creator) > > ## Agent builder > > **Goal:** let an agent you build in Agent Creator read and act on Salesforce through MCP tools. > > > [!NOTE] > > > > Before an agent can call the connector, a *Workspace builder* must have installed and configured the Salesforce app in a workspace (see the *Workspace builder* tab). Optionally, a *Platform admin* may have published a Salesforce capability (see the *Platform admin setup* accordion above). > > This connector runs in the **tenant app-instance context**: your agent is authorized two ways at once: it is identified by the `agent_id` that Agent Creator injects through the capability *Scope*, and that agent must appear in the connector's **authorized-agents allowlist** (managed in the configuration app). The Salesforce token itself is resolved server-side from the configured auth mode, never exposed to the agent. > > There are two ways to wire Salesforce into your agent. > > ## Option A: Attach the published capability from the catalog > > If a *Platform admin* used the config app's **Add to catalog** button (or declared the capability manually), Salesforce appears in your agent's capability picker pre-wired: the MCP endpoint and the *Scope* `context_id,agent_id,user_id` are already filled in. Just pick it and enable it. > > > [!NOTE] > > > > The catalog entry points at the **workspace that published it**: that workspace owns the Salesforce credentials *and* the authorized-agents allowlist. Because this is a tenant-context connector, your agent must still be allowlisted in that publishing workspace (or it must have **Allow all agents** enabled), even though the capability is shared org-wide. Ask the workspace owner to allow your agent, or use Option B to run it from your own workspace. > > ## Option B: Run it from your own workspace (recommended) > > > [!WARNING] > > > > Running the connector from your own workspace is the security-preferred mode: the Connected App credentials, the per-user OAuth tokens and the authorized-agents allowlist are all scoped to *your* workspace. You get least-privilege isolation instead of sharing a broad org-wide surface whose credentials and allowlist someone else controls. > > **1. Install and configure the connector in your workspace** > > Follow the *Workspace builder* tab: install **Salesforce** in your workspace, open its **Configuration app**, choose the auth mode and provide the Connected App credentials (and connect a Salesforce account for the per-user OAuth mode). > > **2. Allowlist your agent** > > In that workspace's config app, open **Authorized agents** and tick your agent (the per-agent **Install capability** button does this for you), or enable **Allow all agents**. > > **3. Add the MCP capability to your agent** > > In your agent, add a capability pointing at **your workspace's MCP Endpoint** URL, and set its **Scope** to: > > ```text theme={null} > context_id,agent_id,user_id > ``` > > The `agent_id` is what lets the connector identify and authorize your agent; without it, every call is rejected with an explicit "agent could not be identified" message. This *Scope* is separate from the Salesforce OAuth scopes. > > **4. Connect a Salesforce account (per-user OAuth mode)** > > In the `oauth` mode, an unconnected user is prompted to sign in on the first tool call: Agent Creator surfaces a `connect_url`, or the user can click **Connect** in the config app. The `jwt`, `clientCredentials` and `accessToken` modes need no per-user sign-in. > > > [!NOTE] > > > > The config app exposes **two distinct publish buttons**. The per-agent **Install capability** button wires the connector into one specific agent (and allowlists it). The org-wide **Add to catalog** button (owners/admins only) publishes Salesforce to the Capabilities catalog so any builder can attach it; that is Option A above. > > ## Brief the agent in its system prompt > > Wiring the capability is not enough: the agent must know the MCP exists and when to use it. Copy-pasteable starter: > > ```text theme={null} > You have access to the Salesforce MCP server. Use it whenever the user asks something that maps to Salesforce data: listing, searching, reading, creating, updating or deleting records, running SOQL/SOSL queries, submitting approval requests, running reports or kicking off Bulk API jobs. Each tool takes an `action` argument selecting the concrete operation. Always prefer calling a tool over guessing from prior context, and confirm with the user before any destructive action (delete, bulk update, metadata deploy). > ``` > > Refine the trigger keywords (sObject names, business domains, typical user phrasings) so the agent reliably picks up the right intent in your context. > > > [!NOTE] > > > > **Legacy AI Knowledge agents** (no native MCP picker): add the connector under **Advanced > Tools > MCP** and paste the **MCP Endpoint** URL. The agent still has to be allowlisted in the config app and its identity propagated so the connector can read its `agent_id`. > > > [!NOTE] > > > > **Restricting to read-only (least privilege).** Salesforce tools cover both reads and writes (create/update/delete records). Unlike scope-granular providers, Salesforce OAuth uses the broad `api` scope and does **not** express read-only at the scope level; object- and field-level access is governed by the **connected user's Profile and Permission Sets** in Salesforce. To allow only read access, back the connection (the user who clicks **Connect**, or the `clientCredentials` / `jwt` integration user) with a Salesforce user whose permissions grant **Read** but not Create/Edit/Delete on the relevant objects. Write calls are then rejected by Salesforce with an `INSUFFICIENT_ACCESS` / `403` error. This restriction lives in Salesforce, outside any tenant's reach, the hardest of the guarantees. > > ## Available Tools > > Each dispatcher tool takes an `action` argument that selects the underlying Salesforce operation; only the arguments relevant to the chosen action need to be passed. > > ### Records & Queries > > | Tool | Description | > | - | - | > | `records` | CRUD on individual records (one per call). Actions: `create`, `get`, `getField`, `update`, `upsert`, `delete`, `getDeleted`, `getUpdated`. | > | `query` | SOQL queries, SOSL searches, parameterized search and pagination. Actions: `soql`, `soqlAll`, `sosl`, `parameterizedSearch`, `next`. | > | `compositeRecords` | Bulk records via the `composite/sobjects` collection: up to 200 writes (2000 reads). Actions: `createMany`, `createManyForType`, `updateMany`, `upsertManyForType`, `deleteMany`, `getMany`. | > | `composite` | Composite endpoints: ordered sub-requests, batch, graph, parent+children tree. Actions: `request`, `batch`, `graph`, `tree`. | > > ### Discovery & Metadata > > | Tool | Description | > | - | - | > | `versions` | REST API versions, available resources, org limits and recent items. Actions: `listVersions`, `listResources`, `getLimits`, `getRecent`. | > | `sobjects` | sObject metadata: global list or per-object describe. Actions: `describeGlobal`, `describe`, `describeBasic`. | > > ### Bulk API 2.0 > > | Tool | Description | > | - | - | > | `bulkIngest` | Bulk API 2.0 ingest jobs (CSV insert/update/upsert/delete). Actions: `create`, `uploadData`, `update`, `get`, `list`, `getSuccessful`, `getFailed`, `getUnprocessed`, `delete`. | > | `bulkQuery` | Bulk API 2.0 query jobs (async SOQL, CSV results). Actions: `create`, `get`, `list`, `getResults`, `update`, `delete`. | > > ### Automation & Analytics > > | Tool | Description | > | - | - | > | `tooling` | Tooling API: query/CRUD metadata (`ApexClass`, `CustomField`, `FlexiPage`…), run Apex, completions. Actions: `query`, `describeGlobal`, `describeSObject`, `createRecord`, `getRecord`, `updateRecord`, `deleteRecord`, `executeAnonymous`, `completions`, `runTestsSync`, `runTestsAsync`. | > | `process` | Process rules and approval processes. Actions: `listRules`, `listRulesForObject`, `triggerRule`, `listApprovals`, `submitApproval`. | > | `quickActions` | Org / object quick actions. Actions: `list`, `describe`, `invoke`. | > | `analytics` | Reports & dashboards. Actions: `listReports`, `describeReport`, `runReport`, `getReportInstance`, `listReportInstances`, `listDashboards`, `describeDashboard`, `runDashboard`, `getDashboardStatus`. | > | `metadata` | Metadata REST deploy. Actions: `deploy`, `getDeployStatus`. | > > ## Output Formats > > Every tool accepts an `outputFormat` argument that controls the MCP response shape: > > * **`verbose`** (default): human-readable text optimized for LLM consumption > * **`structured`**: concise machine-readable JSON in `structuredContent` > * **`both`**: both text and structured content > > ## Tool Details > > ### records > > CRUD on individual Salesforce records. One record per call. Pick the operation via `action`; pass record fields nested inside `body` (Salesforce field API names are case-sensitive). > > ```json theme={null} > { > "name": "records", > "arguments": { > "action": "create", > "sObjectName": "Lead", > "body": { > "FirstName": "Georges", > "LastName": "Abitbol", > "Company": "La Classe Américaine", > "Email": "georges.abitbol@example.com" > } > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | One of `create`, `get`, `getField`, `update`, `upsert`, `delete`, `getDeleted`, `getUpdated`. | > | `sObjectName` | Yes | API name of the sObject (`Account`, `Contact`, `Lead`, `Opportunity`, `My_Custom_Object__c`, …). | > | `recordId` | For `get`/`getField`/`update`/`delete` | Salesforce 15- or 18-char record ID. | > | `body` | For `create`/`update`/`upsert` | Object whose keys are Salesforce field API names. | > | `externalIdField`, `externalIdValue` | For `upsert` | External ID field API name and value. | > | `fieldName` | For `getField` | API name of a single field to fetch (incl. blob/document body). | > | `fields` | For `get` | Comma-separated list of fields to return. | > | `start`, `end` | For `getDeleted`/`getUpdated` | ISO 8601 time window. | > > ### query > > Read with SOQL (database language), SOSL (cross-object text search) or a structured parameterized search. Use `next` with a `queryLocator` returned by a previous SOQL response to page through large result sets. > > ```json theme={null} > { > "name": "query", > "arguments": { > "action": "soql", > "q": "SELECT Id, Name, AnnualRevenue FROM Account WHERE Industry = 'Technology' ORDER BY AnnualRevenue DESC LIMIT 50" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | One of `soql`, `soqlAll`, `sosl`, `parameterizedSearch`, `next`. | > | `q` | For `soql`/`soqlAll`/`sosl` | SOQL or SOSL string. | > | `queryLocator` | For `next` | Locator returned by the previous SOQL call (`nextRecordsUrl`). | > | `body` | For `parameterizedSearch` | Structured search request. | > > ### compositeRecords > > Multi-record CRUD via the `composite/sobjects` collection: up to 200 records per call (2000 for reads), with optional `allOrNone` transactional semantics. > > ```json theme={null} > { > "name": "compositeRecords", > "arguments": { > "action": "createManyForType", > "sObjectName": "Contact", > "body": { > "allOrNone": true, > "records": [ > { "attributes": { "type": "Contact" }, "FirstName": "Jean", "LastName": "Dupont", "Email": "jean.dupont@example.com" }, > { "attributes": { "type": "Contact" }, "FirstName": "Marie", "LastName": "Martin", "Email": "marie.martin@example.com" } > ] > } > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | One of `createMany`, `createManyForType`, `updateMany`, `upsertManyForType`, `deleteMany`, `getMany`. | > | `sObjectName` | For `createManyForType`/`upsertManyForType`/`getMany` | API name of the sObject. | > | `body` | For all writes | `{ allOrNone, records, externalIdField? }`. | > | `ids` | For `deleteMany`/`getMany` | Comma-separated record IDs. | > | `fields` | For `getMany` | Comma-separated list of fields. | > > ### bulkIngest > > Asynchronous high-volume writes via Bulk API 2.0. The typical lifecycle is `create` → `uploadData` (CSV) → `update` (`state: UploadComplete`) → poll `get` until `state=JobComplete` → `getSuccessful` / `getFailed`. > > ```json theme={null} > { > "name": "bulkIngest", > "arguments": { > "action": "create", > "body": { > "object": "Contact", > "operation": "insert", > "contentType": "CSV", > "lineEnding": "LF" > } > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | One of `create`, `uploadData`, `update`, `get`, `list`, `getSuccessful`, `getFailed`, `getUnprocessed`, `delete`. | > | `jobId` | For everything but `create`/`list` | Job ID returned by `create`. | > | `body` | For `create`/`update` | Create payload or `{ state: UploadComplete \| Aborted }`. | > | `rawBody` | For `uploadData` | Raw CSV body (`Content-Type: text/csv`). | > > ### analytics > > Run reports and dashboards asynchronously, then fetch the resulting report instance. Reports return both the metadata and the row-level facts when `includeDetails=true`. > > ```json theme={null} > { > "name": "analytics", > "arguments": { > "action": "runReport", > "reportId": "00O5g00000F1234EAA", > "includeDetails": true > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | One of `listReports`, `describeReport`, `runReport`, `getReportInstance`, `listReportInstances`, `listDashboards`, `describeDashboard`, `runDashboard`, `getDashboardStatus`. | > | `reportId` | For report actions | Salesforce report ID. | > | `dashboardId` | For dashboard actions | Salesforce dashboard ID. | > | `instanceId` | For `getReportInstance` | Async report instance ID. | > | `includeDetails` | No | Include row-level details in the response. | > > ### tooling > > Tooling API for metadata-as-data: query/CRUD on `ApexClass`, `CustomField`, `FlexiPage`, `ValidationRule`, …, plus running Apex (sync, async tests, anonymous execution) and code completions. > > ```json theme={null} > { > "name": "tooling", > "arguments": { > "action": "executeAnonymous", > "anonymousBody": "System.debug('Hello from Apex anonymous');" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | See the Tooling API tool above. | > | `sObjectName` | For Tooling sObject ops | Tooling API sObject name. | > | `recordId` | For `getRecord`/`updateRecord`/`deleteRecord` | Tooling record ID. | > | `q` | For `query` | Tooling SOQL string. | > | `anonymousBody` | For `executeAnonymous` | Apex source to execute as the current user. | > | `body` | For test runs / record mutations | Operation payload (`tests`, `classNames`, …). | > [tab] Workspace builder (DSUL) > > ## Workspace builder > > **Goal:** install the connector in a workspace, configure authentication and the agent allowlist, and call Salesforce operations from your automations. > > ## Installation > > 1. Go to **Apps** in your workspace > 2. Search for **Salesforce** and install it > 3. Open the **Configuration app** (the link auto-populated on install) to choose the auth mode, provide the Connected App credentials, connect a Salesforce account (per-user OAuth mode), and allow the agents that may call the connector > > ## Configuration > > | Field | Description | > | - | - | > | **Configuration app** | Auto-populated on install: open this link to configure authentication (mode + Connected App credentials), connect a Salesforce account (OAuth mode), manage the authorized-agents allowlist, and (org owners/admins) publish Salesforce to the org Capabilities catalog. | > | **REST API Version** | Salesforce REST API version (path segment after `/services/data/`). Defaults to `v62.0`. Override per tenant if you need an older version. | > > The configuration app drives authentication and the allowlist; the app instance itself exposes only the REST API version field. From the config app you pick one of: > > | Auth mode | What you provide | Best for | > | - | - | - | > | `jwt` (default) | Connected App **Consumer Key**, the JWT **username** and the matching **RSA private key (PEM)** + login host | Server-to-service, no interactive sign-in (digital-signature Connected App) | > | `clientCredentials` | Connected App **Consumer Key + Secret** + login host | A Connected App configured with a `client_credentials` run-as user | > | `oauth` | Connected App **Consumer Key + Secret** + login host, then each user clicks **Connect** | Per-user delegated access (authorization-code + PKCE) | > | `accessToken` | A pre-minted Salesforce **access token** + **instance URL** | Short-lived / caller-managed tokens, no exchange | > > > [!NOTE] > > > > Credentials are provisioned into the workspace's Secrets by the config app and resolved server-side on every call. The agent allowlist (**Authorized agents**) gates which Agent Creator agents may call the MCP endpoint; see the *Agent builder* tab. For the per-user `oauth` mode, the Connected App's *Callback URL* must include the auto-computed **OAuth Redirect URI** shown in the config app. > > ## Available Instructions > > Every instruction resolves credentials from the workspace configuration through the `buildAppAuth` helper. Arguments correspond directly to the Salesforce REST API parameters: path params, query params and JSON `body` fields. Most write operations accept a free-form `body` object whose keys are Salesforce field API names (case-sensitive). The MCP server exposes the same operations behind the dispatcher tools (see the *Agent builder* tab). > > ### Discovery > > | Instruction | Description | Returns | > | - | - | - | > | `listVersions` | List available REST API versions. | `[{ version, label, url }]` | > | `listResources` | List available resources for the current API version. | `{ sobjects, query, search, … }` | > | `getLimits` | Get org limits. | `{ DailyApiRequests: { Max, Remaining }, DataStorageMB, … }` | > | `getRecentItems` | Most recently viewed items; optional `limit`. | `[{ Id, Name, attributes }]` | > > ### sObject Metadata > > | Instruction | Description | Returns | > | - | - | - | > | `describeGlobal` | List all available sObjects and basic metadata for each. | `{ encoding, maxBatchSize, sobjects: [{ name, label, … }] }` | > | `describeSObject` | Full describe of one sObject by `sObjectName` (fields, picklists, child relationships). | `{ name, fields: [...], childRelationships: [...], recordTypeInfos }` | > | `describeSObjectBasic` | Basic metadata for one sObject by `sObjectName` (URLs + recent items). | `{ objectDescribe, recentItems }` | > > ### Records (CRUD) > > | Instruction | Description | Returns | > | - | - | - | > | `createRecord` | Create a record of `sObjectName`; `body` = Salesforce field API names. | `{ id, success, errors }` | > | `getRecord` | Fetch one record by `sObjectName` + `recordId`; optional `fields`. | The record `{ Id, attributes, …fields }`. | > | `getRecordField` | Fetch a single `fieldName` on a record (incl. blob/document body). | The field value (raw bytes for blob fields). | > | `updateRecord` | Update fields on a record by `sObjectName` + `recordId`; `body` = field map. | Empty (HTTP 204). | > | `upsertRecord` | Upsert by `externalIdField` + `externalIdValue`; `body` = field map. | `{ id, success, created }` | > | `deleteRecord` | Delete a record by `sObjectName` + `recordId`. | Empty (HTTP 204). | > | `getDeletedRecords` | Records deleted in a `start`/`end` window (recycle bin). | `{ deletedRecords: [{ id, deletedDate }], earliestDateAvailable }` | > | `getUpdatedRecords` | Records updated in a `start`/`end` window. | `{ ids: [...], latestDateCovered }` | > > ### SOQL & SOSL Queries > > | Instruction | Description | Returns | > | - | - | - | > | `runQuery` | Run a SOQL query `q` (excludes deleted/archived). | `{ totalSize, done, records: [...], nextRecordsUrl? }` | > | `runQueryAll` | Run a SOQL query `q` including deleted/archived. | `{ totalSize, done, records: [...] }` | > | `runSearch` | Run a SOSL search `q` across multiple sObjects. | `{ searchRecords: [{ Id, attributes }] }` | > | `runParameterizedSearch` | Structured parameterized search via `body`. | `{ searchRecords: [...] }` | > | `getQueryNext` | Fetch the next page using `queryLocator`. | `{ totalSize, done, records: [...], nextRecordsUrl? }` | > > ### Composite & Multi-Record > > | Instruction | Description | Returns | > | - | - | - | > | `runComposite` | Up to 25 ordered sub-requests with refs; `body` = `{ allOrNone, collateSubrequests, compositeRequest }`. | `{ compositeResponse: [{ httpStatusCode, referenceId, body }] }` | > | `runCompositeBatch` | Up to 25 independent sub-requests; `body` = `{ haltOnError, batchRequests }`. | `{ hasErrors, results: [...] }` | > | `runCompositeGraph` | Multiple composite graphs in one transaction; `body` = `{ graphs }`. | `{ graphs: [{ graphId, isSuccessful, graphResponse }] }` | > | `createSObjectTree` | Insert a parent + related children for `sObjectName`; `body` = `{ records }`. | `{ hasErrors, results: [{ referenceId, id }] }` | > | `createRecords` | Create up to 200 mixed-sObject records; `body` = `{ allOrNone, records }`. | `[{ id, success, errors }]` | > | `createRecordsForType` | Create up to 200 records of `sObjectName`; `body` = `{ allOrNone, records }`. | `[{ id, success, errors }]` | > | `updateRecords` | Update up to 200 mixed-sObject records; `body` = `{ allOrNone, records }`. | `[{ id, success, errors }]` | > | `deleteRecords` | Delete up to 200 records by `ids`; optional `allOrNone`. | `[{ id, success, errors }]` | > | `getRecordsCollection` | Retrieve up to 2000 records of `sObjectName` by `ids`; optional `fields`. | `[{ Id, attributes, …fields }]` | > | `upsertRecordsForType` | Upsert up to 200 records of `sObjectName` by `externalIdField`; `body` = `{ allOrNone, records }`. | `[{ id, success, created, errors }]` | > > ### Bulk API 2.0: Ingest > > | Instruction | Description | Returns | > | - | - | - | > | `createIngestJob` | Create an ingest job; `body` = `{ object, operation, externalIdFieldName?, contentType, lineEnding, columnDelimiter?, assignmentRuleId? }`. | `{ id, state: "Open", object, operation, … }` | > | `uploadIngestData` | Upload CSV `rawBody` to an Open job by `jobId`. | Empty (HTTP 201). | > | `updateIngestJob` | Set job `state` (`UploadComplete` to start, `Aborted` to stop) by `jobId`. | `{ id, state, … }` | > | `getIngestJob` | Get ingest job state and metrics by `jobId`. | `{ id, state, numberRecordsProcessed, numberRecordsFailed, … }` | > | `listIngestJobs` | List ingest jobs; optional `isPkChunkingEnabled`/`jobType`/`queryLocator`. | `{ done, records: [...], nextRecordsUrl? }` | > | `getIngestSuccessful` | Download CSV of successfully processed rows by `jobId`. | CSV (`sf__Id`, `sf__Created`, …). | > | `getIngestFailed` | Download CSV of failed rows with errors by `jobId`. | CSV (`sf__Error`, …). | > | `getIngestUnprocessed` | Download CSV of rows not processed by `jobId`. | CSV of the source rows. | > | `deleteIngestJob` | Delete an ingest job by `jobId` (after JobComplete/Aborted/Failed). | Empty (HTTP 204). | > > ### Bulk API 2.0: Query > > | Instruction | Description | Returns | > | - | - | - | > | `createQueryJob` | Create a bulk SOQL query job; `body` = `{ operation, query, contentType, lineEnding, columnDelimiter? }`. | `{ id, state: "UploadComplete", … }` | > | `getQueryJob` | Get query job state and metrics by `jobId`. | `{ id, state, numberRecordsProcessed, … }` | > | `listQueryJobs` | List bulk query jobs; optional `isPkChunkingEnabled`/`jobType`/`concurrencyMode`. | `{ done, records: [...] }` | > | `getQueryJobResults` | Download CSV results by `jobId`; optional `locator`/`maxRecords`. | CSV result set (paginated via `Sforce-Locator` header). | > | `updateQueryJob` | Set query job `state` (`Aborted` only) by `jobId`. | `{ id, state, … }` | > | `deleteQueryJob` | Delete a bulk query job by `jobId` (after completion/abort). | Empty (HTTP 204). | > > ### Tooling API > > | Instruction | Description | Returns | > | - | - | - | > | `runToolingQuery` | Tooling SOQL `q` (`CustomField`, `ApexClass`, `FlexiPage`, …). | `{ size, totalSize, records: [...] }` | > | `describeToolingGlobal` | List Tooling API sObjects. | `{ sobjects: [{ name, label, … }] }` | > | `describeToolingSObject` | Describe a Tooling sObject by `sObjectName`. | `{ name, fields: [...], … }` | > | `createToolingRecord` | Create a Tooling record of `sObjectName`; `body` = field map. | `{ id, success, errors }` | > | `getToolingRecord` | Fetch a Tooling record by `sObjectName` + `recordId`. | The Tooling record. | > | `updateToolingRecord` | Update a Tooling record by `sObjectName` + `recordId`; `body` = field map. | Empty (HTTP 204). | > | `deleteToolingRecord` | Delete a Tooling record by `sObjectName` + `recordId`. | Empty (HTTP 204). | > | `executeAnonymousApex` | Run a one-off Apex block (`anonymousBody`) as the current user. | `{ compiled, success, line, column, exceptionMessage }` | > | `getApexCompletions` | Apex / VisualForce code completions; `type` = `apex`/`visualforce`. | The completions metadata tree. | > | `runApexTestsSync` | Run Apex tests synchronously; `body` = `{ tests }` (small scope). | `{ numTestsRun, numFailures, successes, failures }` | > | `runApexTestsAsync` | Schedule async Apex test execution; `body` = `{ classNames, classids, suiteNames, suiteids, maxFailedTests, testLevel, tests }`. | The async test run id. | > > ### Process & Approvals > > | Instruction | Description | Returns | > | - | - | - | > | `listProcessRules` | List active process rules across the org. | `{ rules: { : [{ id, name, … }] } }` | > | `listProcessRulesForObject` | Process rules for `sObjectName`. | `{ rules: [{ id, name, namespacePrefix }] }` | > | `triggerProcessRule` | Trigger `ruleId` against record IDs for `sObjectName`; `body` = `{ contextIds }`. | `{ errors, success }` | > | `listApprovals` | List approval requests visible to the current user. | `{ approvals: { : [...] } }` | > | `submitApproval` | Submit/act on records in an approval process; `body` = `{ requests }`. | `[{ actorIds, entityId, instanceStatus, success }]` | > > ### Quick Actions > > | Instruction | Description | Returns | > | - | - | - | > | `listQuickActions` | List global quick actions. | `[{ name, label, type }]` | > | `describeQuickAction` | Describe a quick action by `actionName`. | `{ name, targetSobjectType, layout, … }` | > | `invokeQuickAction` | Invoke `actionName` with an optional `body`. | `{ id, success, errors, feedItemIds }` | > > ### Analytics: Reports & Dashboards > > | Instruction | Description | Returns | > | - | - | - | > | `listReports` | List all reports accessible to the user. | `[{ id, name, url, describeUrl }]` | > | `describeReport` | Describe a report by `reportId`; optional `includeDetails`. | `{ reportMetadata, reportTypeMetadata, reportExtendedMetadata }` | > | `runReport` | Execute a report by `reportId` (async); optional `includeDetails`, `body`. | A report instance / report fact `{ attributes, factMap, … }` | > | `getReportInstance` | Get results of a report instance by `reportId` + `instanceId`. | `{ attributes, factMap, reportMetadata, status }` | > | `listReportInstances` | List async report instances for `reportId`. | `[{ id, status, requestDate, … }]` | > | `listDashboards` | List all dashboards accessible to the user. | `[{ id, name, url }]` | > | `describeDashboard` | Describe a dashboard by `dashboardId` (components, filters, cache state). | `{ id, name, components: [...], dashboardFilters }` | > | `runDashboard` | Refresh a dashboard by `dashboardId` (async). | `{ componentData, dashboardMetadata }` | > | `getDashboardStatus` | Current refresh status of a dashboard by `dashboardId`. | `{ componentStatus, runningStatus }` | > > ### Metadata Deploy > > | Instruction | Description | Returns | > | - | - | - | > | `deployMetadata` | Deploy a zipped metadata package; `body` = `{ deployOptions, file }`. | `{ id, state, deployResult }` | > | `getMetadataDeployStatus` | Get status + details of a deploy `requestId`; optional `includeDetails`. | `{ id, status, done, numberComponentsDeployed, details? }` | > > > [!NOTE] > > > > `Returns` shows the shape of the operation output (the underlying Salesforce REST resource). Several write operations return HTTP 204 with an empty body. CSV-producing Bulk API operations stream the file contents directly. > > ## DSUL Examples > > **Search high-value Accounts (SOQL):** > > ```yaml theme={null} > - Salesforce.runQuery: > q: "SELECT Id, Name, AnnualRevenue, Industry FROM Account WHERE AnnualRevenue > 1000000 ORDER BY AnnualRevenue DESC LIMIT 50" > output: accounts > ``` > > **Create a Lead:** > > ```yaml theme={null} > - Salesforce.createRecord: > sObjectName: Lead > body: > FirstName: Georges > LastName: Abitbol > Company: La Classe Américaine > Email: georges.abitbol@example.com > LeadSource: Web > output: lead > ``` > > **Update an Opportunity stage and amount:** > > ```yaml theme={null} > - Salesforce.updateRecord: > sObjectName: Opportunity > recordId: '{{opportunity_id}}' > body: > StageName: Closed Won > Amount: 250000 > output: result > ``` > > **Bulk insert Contacts via Bulk API 2.0:** > > ```yaml theme={null} > - Salesforce.createIngestJob: > body: > object: Contact > operation: insert > contentType: CSV > lineEnding: LF > output: job > - Salesforce.uploadIngestData: > jobId: '{{job.id}}' > rawBody: | > FirstName,LastName,Email > Jean,Dupont,jean.dupont@example.com > Marie,Martin,marie.martin@example.com > output: upload > - Salesforce.updateIngestJob: > jobId: '{{job.id}}' > body: > state: UploadComplete > output: launched > ``` > > **Run a Report:** > > ```yaml theme={null} > - Salesforce.runReport: > reportId: '{{report_id}}' > includeDetails: true > output: report > ``` *** ## Security The answers that hold for every connector (agent access, shared knowledge bases, credentials, models, egress) are on [Connector security](/apps-store/marketplace/connectors/security). This section lists what is specific to Salesforce. | Topic | Salesforce | | - | - | | Authentication family | Delegated OAuth (authorization code with PKCE, `oauth` mode): each user connects their own Salesforce account. The connector also offers application-level modes, in which every caller acts as one integration user. | | Production modes | `oauth`. Salesforce has no central OAuth client: each workspace registers its own Connected App. | | Modes to avoid in production | `accessToken` (testing only). `jwt`, the default mode, and `clientCredentials` act as one integration user for every caller: avoid them when Salesforce must apply each user's permissions. | | Read-only scopes | None at the scope level. The default scopes, `api refresh_token offline_access`, give access to the whole REST API, and Salesforce has no read-only equivalent of `api`. Read-only access comes from the profile and permission sets of the connected user (or of the integration user). | | Agent allowlist | Yes, on the tenant endpoint (empty at installation). Salesforce has no global endpoint. | | Per-reader access control on knowledge bases | Not applicable: this connector does not feed knowledge bases. | | Outbound hosts | The login host set by the administrator (`login.salesforce.com` by default, or the org's `*.my.salesforce.com` domain) and the instance URL that Salesforce returns at sign-in. In `accessToken` mode, the administrator sets the instance URL. | | Audit events | None specific to this connector | To keep agents read-only, give the connected users, or the integration user, a permission set that grants **Read** but not **Create**, **Edit** or **Delete** on the objects agents need: Salesforce then refuses every write with `INSUFFICIENT_ACCESS`. The connector also exposes anonymous Apex execution and metadata deployment, so make sure that user holds neither **Author Apex** nor **Modify Metadata**. *** ## Error Handling | HTTP Status | Error | Solution | | - | - | - | | 400 | Bad Request | Malformed SOQL, invalid field API name, missing required field. Inspect the `fields`/`errorCode` array returned by Salesforce. | | 401 | Unauthorized | Access token expired or revoked. Reconnect (per-user OAuth mode) or re-check the JWT / client-credentials configuration. | | 403 | Forbidden | The Salesforce profile lacks API access or object/field-level permissions. | | 404 | Not Found | sObject name or record ID does not exist. Note that sObject API names are case-sensitive. | | 422 | Validation | Validation rules, picklist constraints or required-field errors on the sObject. | | 429 | Rate Limited | Org API limit reached (`DailyApiRequests`). Inspect usage via `versions action=getLimits` and back off. | | 500 | Server Error | Transient Salesforce error. Retry with exponential backoff. | ### Common Issues **"This agent is not authorized to use this connector"**: The calling agent is not in the allowlist. Open the configuration app → **Authorized agents** → tick this agent (or enable **Allow all agents**) and Save. This applies even when the agent attached the capability from the org Capabilities catalog: the catalog entry points at a workspace that still owns the allowlist. **"The calling agent could not be identified"**: The MCP capability *Scope* does not declare `agent_id`, so Agent Creator never injects the agent identity. Set the Scope to `context_id,agent_id,user_id` on the capability, then allow the agent in the config app. **"Salesforce is not configured for this workspace"**: No auth mode / credentials set. Open the configuration app and provide the Connected App credentials (JWT Bearer, client credentials, OAuth client, or a direct access token). **"Salesforce is not connected for this user"**: In the per-user `oauth` mode, no token exists for the current user. Click **Connect** in the config app, or use the agent's connect flow. **"Salesforce token refresh failed … must reconnect"**: The stored refresh token was revoked or expired. The user must reconnect from the config app (OAuth mode). **"Forbidden - you need catalog write rights in this org"**: The **Add to catalog** button is only available to org owners/admins, and the org-wide catalog write is gated on that role. Ask an org owner/admin to publish the capability, or wire your agent from your own workspace (Option B in the *Agent builder* tab). **`redirect_uri_mismatch` at callback time**: The auto-computed **OAuth Redirect URI** shown in the config app must be pasted *verbatim* into the Connected App's *Callback URL* field, including the path. Sandbox vs production hosts also matter: use `https://test.salesforce.com` as the login host for sandboxes. **`invalid_grant` on JWT Bearer**: The runtime user is not pre-authorized for the Connected App, the private key does not match the uploaded certificate, or *Use digital signatures* is not enabled on the Connected App. ## External Resources > [card] [Salesforce REST API](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/) > > Official Salesforce REST API documentation (v62.0). > [card] [Tool Agents](/products/agent-factory/capabilities) > > Learn how Agent Creator agents consume MCP tools in Prisme.ai. # SAP LeanIX Source: https://docs.prisme.ai/apps-store/marketplace/connectors/sap-leanix Query and manage SAP LeanIX Enterprise Architecture from Agent Creator agents and Builder workflows: fact sheets, Integration API and surveys ![SAP LeanIX](https://mintcdn.com/prismeai/EuzVAoGHoTkgVHUw/images/connectors/sap-leanix.svg?fit=max\&auto=format\&n=EuzVAoGHoTkgVHUw\&q=85\&s=b9b200e71d62d9c4b3fee753f6f3d7ad) The SAP LeanIX app exposes the [SAP LeanIX](https://www.leanix.net) Enterprise Architecture Management platform through three entity tools. It can be consumed two ways: as a remote MCP server that **Agent Creator** agents call as tools, or as a Builder app whose instructions you call directly from DSUL. It runs in the **tenant app-instance context** (it resolves the installing workspace's own LeanIX credential) and covers three LeanIX surfaces: * **Fact sheets** (Pathfinder GraphQL): search, read, create, update and archive Applications, IT Components, Business Capabilities, Projects and any other fact sheet type, plus a raw GraphQL passthrough for relations, diagrams, tags and introspection. * **Integration API** (LDIF): start and monitor bulk inbound/outbound synchronization runs and list processor configurations. * **Surveys** (Poll v2): list surveys, read their runs and fetch results. Authentication is a **LeanIX API token** (exchanged server-side for a short-lived bearer at the mtm token endpoint) or a **caller-supplied access token**. Agents are identified by the capability **Scope** `context_id,agent_id,user_id` and gated by a per-workspace authorized-agents allowlist. > [card] Enterprise Architecture fact sheets > > Search, read, create, update and archive fact sheets (Applications, IT Components, Business Capabilities, Projects) through the Pathfinder GraphQL API, with a raw query passthrough for anything else. > [card] Bulk Integration API > > Drive LDIF synchronization runs (inbound/outbound), poll their status and results, and list available processor configurations. > [card] Surveys & polls > > List surveys, browse their runs and pull results through the Poll v2 API. ## Who is this for? This connector is used by three different roles. Jump to the section that matches yours; each one is self-contained. > [card] Agent builder > > You build agents in **Agent Creator** and want them to query and manage LeanIX. → *Agent builder* tab. > [card] Platform admin > > You run the platform and want to publish LeanIX as a reusable capability. → *Platform admin setup* accordion below. > [card] Workspace builder > > You write Builder automations (DSUL) that call LeanIX operations directly. → *Workspace builder* tab. ## Prerequisites (SAP LeanIX side) * A **SAP LeanIX** workspace and an account that can create technical-user API tokens. * A **LeanIX API token**, generated in LeanIX under **Administration > Technical Users** (or use a caller-managed access token instead). * Your **instance URL**: the bare workspace host, e.g. `https://eu.leanix.net` (the connector derives the mtm token host from it automatically). * The technical user must have the LeanIX permissions for the resources you intend to use (fact sheets, Integration API, surveys). > [accordion] Platform admin (Governance): one-time platform setup > > **Goal:** SAP LeanIX is a **per-workspace** connector: each workspace configures its own LeanIX credential (see the *Workspace builder* tab), so there is **no platform-wide credential to provision**. The only optional platform task is to publish LeanIX as a reusable **capability** in AI Governance so agent builders can enable it from the catalog instead of pasting a raw MCP endpoint. > > > [!NOTE] > > > > There is no shared LeanIX credential and no central OAuth client for this connector. The LeanIX API token and the authorized-agents allowlist always live in the consuming workspace. A Governance capability you publish here points at a specific workspace's MCP endpoint; that workspace still owns the credential and the allowlist. > > ## Declare the capability in AI Governance (optional) > > **1. Open AI Governance > Capabilities** > > Create (or edit) the **SAP LeanIX** capability. > > **2. Point it at the MCP endpoint** > > Set the capability's MCP server URL to the connector's **MCP Endpoint** (the workspace running the connector), and set its **Scope** to: > > ```text theme={null} > context_id,agent_id,user_id > ``` > > The `agent_id` in the scope is what lets the connector identify and authorize the calling agent. > > **3. Make it available to agent builders** > > Once created, the capability appears in the capability picker for agent builders in your organization, who enable it on their agents. Access to the catalog follows your organization's existing roles; there is no per-capability role grant. Which agents may actually call this tenant-context connector is gated separately by the per-workspace allowlist (see below). > > > [!WARNING] > > > > Declaring the capability makes the connector **available**; it does not by itself authorize a specific agent. This connector follows the **tenant-context model**: which agents may actually call it is gated per-workspace by the **authorized-agents allowlist** in the configuration app (see the *Workspace builder* tab). There is **no OAuth auth-config JSON** to attach in Governance: authentication is a server-side LeanIX token, not a per-user OAuth flow. *** > [tab] Agent builder (Agent Creator) > > ## Agent builder > > **Goal:** let an agent you build in Agent Creator query and manage SAP LeanIX through MCP tools. > > > [!NOTE] > > > > Before an agent can call the connector, a *Workspace builder* must have installed and configured the SAP LeanIX app in a workspace (see the *Workspace builder* tab). Optionally, a *Platform admin* may have published a LeanIX capability in AI Governance (see the *Platform admin setup* accordion above). > > This connector runs in the **tenant app-instance context**: your agent is identified by the `agent_id` that Agent Creator injects through the capability *Scope*, and that agent must appear in the connector's **authorized-agents allowlist** (managed in the configuration app). The LeanIX credential itself is resolved server-side, never exposed to the agent. > > > [!NOTE] > > > > **Easiest registration: one-click "Add to catalog".** In the configuration app, org owners/admins see an **Add to catalog** button (under *Capabilities catalog*). It publishes the connector to your organization's **Capabilities catalog** as a ready-to-use capability (MCP endpoint and Scope `context_id,agent_id,user_id` pre-wired) so any builder can attach it from the picker without wiring the endpoint by hand. This is the recommended path; the manual steps below remain available if you prefer to wire the capability yourself. > > **1. Install and configure the connector in your workspace** > > Follow the *Workspace builder* tab: install **SAP LeanIX** in your workspace, open its **Configuration app**, and provide the LeanIX API token (or access token) and instance URL. > > **2. Allowlist your agent** > > In that workspace's config app, open **Authorized agents** and tick your agent (the **Install capability** button does this for you), or enable **Allow all agents**. > > **3. Add the MCP capability to your agent** > > In your agent, add a capability pointing at **your workspace's MCP Endpoint** URL, and set its **Scope** to: > > ```text theme={null} > context_id,agent_id,user_id > ``` > > The `agent_id` is what lets the connector identify and authorize your agent; without it, every call is rejected with an explicit "agent could not be identified" message. > > **4. Brief the agent** > > Tell the agent the tools exist and when to use them. Copy-pasteable starter: > > ```text theme={null} > You have access to the SAP LeanIX MCP server (tools: factSheets, integration, surveys). Each tool takes an `action` argument. Use factSheets to search, read, create, update or archive Enterprise Architecture fact sheets (Applications, IT Components, Business Capabilities, Projects), or its `graphql` action for anything advanced. Use integration for bulk LDIF synchronization runs, and surveys to read polls. Prefer calling a tool over guessing, and confirm with the user before any create/update/archive. > ``` > > > [!NOTE] > > > > **Legacy AI Knowledge agents** (no native MCP picker): add the connector under **Advanced > Tools > MCP** and paste the **MCP Endpoint** URL. The agent still has to be allowlisted in the config app and its identity propagated so the connector can read its `agent_id`. > > ## Available Tools > > Each tool takes an `action` argument selecting the concrete operation, plus the per-action parameters. > > | Tool | Description | > | - | - | > | `factSheets` | Enterprise Architecture fact sheets (Pathfinder GraphQL). Actions: `search`, `get`, `create`, `update`, `archive`, `graphql` (raw query passthrough). | > | `integration` | Integration API (bulk LDIF import/export). Actions: `startRun`, `runStatus`, `runResults`, `listRunStatuses`, `listProcessors`. | > | `surveys` | Surveys / polls (Poll v2 API). Actions: `list`, `get`, `listRuns`, `results`. | > > ## Output Formats > > Every tool accepts an `outputFormat` argument that controls the MCP response shape: > > * **`verbose`** (default): human-readable text optimized for LLM consumption > * **`structured`**: concise machine-readable JSON in `structuredContent` > * **`both`**: the structured payload, with its JSON also rendered as text > > ## Tool Details > > ### factSheets: search > > ```json theme={null} > { > "name": "factSheets", > "arguments": { > "action": "search", > "factSheetType": "Application", > "fullTextSearch": "CRM", > "first": 25 > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | One of `search`, `get`, `create`, `update`, `archive`, `graphql`. | > | `factSheetType` | No | Filter on one type (`Application`, `ITComponent`, `BusinessCapability`, `Project`, …). | > | `fullTextSearch` | No | Full-text term. | > | `first` / `after` | No | Page size (max 100, default 50) and pagination cursor (`pageInfo.endCursor`). | > | `filter` | No | Raw `FactSheetFilter` `{ facetFilters:[{facetKey,operator,keys}], fullTextSearch, ids }`. | > > ### factSheets: create > > ```json theme={null} > { > "name": "factSheets", > "arguments": { > "action": "create", > "name": "Billing Service", > "type": "Application", > "patches": [ > { "op": "replace", "path": "/description", "value": "Handles invoicing" } > ], > "validateOnly": false > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | `create`. | > | `name` | Yes | Fact sheet display name. | > | `type` | Yes | Fact sheet type (e.g. `Application`). | > | `patches` | No | JSON-patch ops `{ op: add\|replace\|remove, path: "/field", value }` to set fields. | > | `validateOnly` | No | Dry-run if `true`. | > > ### integration: startRun > > ```json theme={null} > { > "name": "integration", > "arguments": { > "action": "startRun", > "body": { > "connectorType": "myConnector", > "connectorId": "id-123", > "connectorVersion": "1.0.0", > "processingDirection": "inbound", > "processingMode": "partial", > "content": [] > } > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | One of `startRun`, `runStatus`, `runResults`, `listRunStatuses`, `listProcessors`. | > | `body` | For startRun | The LDIF run payload `{ connectorType, connectorId, connectorVersion, processingDirection: inbound\|outbound, processingMode, content }`. | > | `id` | For runStatus/runResults | Synchronization run id. | > > ### surveys: list > > ```json theme={null} > { > "name": "surveys", > "arguments": { > "action": "list", > "page": 0, > "size": 50, > "search": "architecture review" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | One of `list`, `get`, `listRuns`, `results`. | > | `pollId` | For get/listRuns | Poll id. | > | `pollRunId` | For results | Poll run id. | > | `page` / `size` / `sort` / `search` | No | Pagination, ordering and (for `list`) a search term. `size` max 100. | > [tab] Workspace builder (DSUL) > > ## Workspace builder > > **Goal:** install the connector in a workspace, configure authentication and the agent allowlist, and call LeanIX operations from your automations. > > ## Installation > > 1. Go to **Apps** in your workspace > 2. Search for **SAP LeanIX** and install it > 3. Open the **Configuration app** (the link auto-populated on install) to choose the auth mode, paste your LeanIX credential and instance URL, and allow the agents that may call the connector > > ## Configuration > > | Field | Description | > | - | - | > | **Configuration app** | Auto-populated on install: open this link to configure authentication (mode + credentials), set the instance URL, and manage the authorized-agents allowlist. | > > The configuration app drives everything; the app instance itself has no per-field credential form. From it you pick one of: > > | Auth mode | What you provide | Best for | > | - | - | - | > | `apiToken` (default) | A LeanIX **API token** + the **instance URL** (e.g. `https://eu.leanix.net`) | Standard setup; the token is exchanged server-side for a short-lived bearer and cached | > | `accessToken` | A caller-managed **bearer access token** + the **instance URL** | Short-lived / externally-minted tokens, no exchange | > > > [!NOTE] > > > > Credentials are provisioned into the workspace's Secrets and resolved server-side. The agent allowlist (**Authorized agents**) gates which Agent Creator agents may call the MCP endpoint; see the *Agent builder* tab. > > ## Available Instructions > > Every instruction resolves credentials from the workspace configuration. Operations are grouped by LeanIX surface; the MCP server exposes the same operations behind the three entity tools (see the *Agent builder* tab). > > ### Fact Sheets > > | Instruction | Description | Returns | > | - | - | - | > | `searchFactSheets` | Search/list fact sheets (Pathfinder `allFactSheets`). Filter by `factSheetType`, `fullTextSearch` or a raw `filter`; cursor-paginate with `first`/`after`. | `{ data: { allFactSheets: { totalCount, edges: [{ node }], pageInfo: { endCursor, hasNextPage } } } }` | > | `getFactSheet` | Fetch a single fact sheet by `id` (UUID). | `{ data: { factSheet } }` | > | `createFactSheet` | Create a fact sheet from `name` + `type`, with optional `patches` and `validateOnly` dry-run. | `{ data: { createFactSheet: { factSheet } } }` | > | `updateFactSheet` | Update a fact sheet by `id` via JSON-patch `patches`; optional `comment`, `validateOnly`. | `{ data: { updateFactSheet: { factSheet } } }` | > | `archiveFactSheet` | Archive a fact sheet by `id` (sets status `ARCHIVED`; LeanIX has no hard delete). | `{ data: { updateFactSheet: { factSheet } } }` | > | `graphqlQuery` | Raw Pathfinder GraphQL passthrough: `query` document + optional `variables` (relations, diagrams, tags, subscriptions, introspection). | The raw GraphQL response `{ data, errors? }` | > > ### Integration API > > | Instruction | Description | Returns | > | - | - | - | > | `startSyncRun` | Start a synchronization run; `body` = the LDIF payload `{ connectorType, connectorId, connectorVersion, processingDirection, processingMode, content }`. | `{ id }` (the run id) | > | `getSyncRunStatus` | Get a run status by `id`; poll until `FINISHED`/`FAILED`. | `{ id, status, … }` | > | `getSyncRunResults` | Get a run's results by `id` (meaningful for outbound runs). | The run results document | > | `listSyncRunStatuses` | List synchronization run statuses. | `{ data: [{ id, status, … }] }` | > | `listProcessors` | List available processor configurations. | `{ data: [{ id, name, … }] }` | > > ### Surveys / Polls > > | Instruction | Description | Returns | > | - | - | - | > | `listPolls` | List surveys/polls; supports `page`/`size`/`sort`/`search`. | `{ data: [{ id, name, … }], total }` | > | `getPoll` | Get a survey/poll by `pollId`. | A Poll resource `{ id, name, … }` | > | `listPollRuns` | List runs of a survey by `pollId`; supports `page`/`size`/`sort`. | `{ data: [{ id, … }] }` | > | `getPollResults` | Get the results of a poll run by `pollRunId`; supports `page`/`size`. | `{ data: [{ … }] }` | > > > [!NOTE] > > > > `Returns` shows the shape of the operation output. Fact-sheet operations return the underlying Pathfinder GraphQL envelope (`{ data, errors? }`); Integration API and Poll v2 operations return the LeanIX REST resource. > > ## DSUL Examples > > **Search Applications by name:** > > ```yaml theme={null} > - SAP LeanIX.searchFactSheets: > factSheetType: Application > fullTextSearch: 'CRM' > first: 25 > output: apps > ``` > > **Create a fact sheet, then set fields:** > > ```yaml theme={null} > - SAP LeanIX.createFactSheet: > name: 'Billing Service' > type: Application > patches: > - { op: replace, path: /description, value: 'Handles invoicing' } > output: created > ``` > > **Start a sync run and poll its status:** > > ```yaml theme={null} > - SAP LeanIX.startSyncRun: > body: > connectorType: '{{connectorType}}' > connectorId: '{{connectorId}}' > connectorVersion: '1.0.0' > processingDirection: inbound > processingMode: partial > content: '{{ldifContent}}' > output: run > - SAP LeanIX.getSyncRunStatus: > id: '{{run.id}}' > output: status > ``` > > **Raw GraphQL passthrough (fact sheet with relations):** > > ```yaml theme={null} > - SAP LeanIX.graphqlQuery: > query: | > query($id: ID!) { > factSheet(id: $id) { > id name > ... on Application { relApplicationToITComponent { edges { node { factSheet { id name } } } } } > } > } > variables: > id: '{{factSheetId}}' > output: result > ``` *** ## Security The answers that hold for every connector (agent access, shared knowledge bases, credentials, models, egress) are on [Connector security](/apps-store/marketplace/connectors/security). This section lists what is specific to SAP LeanIX. | Topic | SAP LeanIX | | - | - | | Authentication family | Technical account or API key: the API token of one LeanIX technical user (`apiToken`), or a bearer access token pasted with the instance URL (`accessToken`). LeanIX sees that technical user for every caller. | | Production modes | `apiToken` | | Modes to avoid in production | `accessToken` (testing only: a LeanIX access token expires after about an hour, and the connector does not renew it) | | Read-only rights | The **Viewer** permission role on the technical user. | | Agent allowlist | Yes, on the tenant endpoint (empty at installation). **Allow all agents** accepts every agent. The connector has no global endpoint. | | Per-reader access control on knowledge bases | Not applicable: this connector does not feed knowledge bases. | | Outbound hosts | The **Instance URL** set at installation (for example `eu.leanix.net`) and its token host: the `-svc` sibling of that host (`eu-svc.leanix.net`), or the **Token host** when you set it. | | Audit events | None specific to this connector | Every allowed agent acts with the technical user's role, whoever uses the agent. The connector also exposes write operations (create, update and archive fact sheets, start Integration API sync runs): with the **Viewer** role, LeanIX refuses them. Create a technical user dedicated to the connector, so that you can rotate or revoke its token without affecting other integrations. *** ## Error Handling | HTTP code | Meaning | | - | - | | `400` | Bad request: invalid parameters, malformed GraphQL document, or an invalid LDIF/patch body. | | `401` | Authentication failed: the LeanIX API token / access token is missing, invalid or expired. | | `403` | Forbidden: the LeanIX technical user lacks permission for the requested resource. | | `404` | Not found: the fact sheet, run, poll or poll run id does not exist or is not visible to the user. | | `429` | Rate limit exceeded; wait and retry. | | `500` | SAP LeanIX server error (transient); retry shortly. | ### Common Issues **"This agent is not authorized to use this connector"**: The calling agent is not in the allowlist. Open the configuration app → **Authorized agents** → tick this agent (or enable **Allow all agents**) and Save. **"The calling agent could not be identified"**: The MCP capability *Scope* does not declare `agent_id`, so Agent Creator never injects the agent identity. Set the Scope to `context_id,agent_id,user_id` on the capability, then allow the agent in the config app. **"SAP LeanIX is not configured"**: No API token / instance URL set. Open the configuration app and provide the LeanIX API token (or access token) and instance URL (e.g. `https://eu.leanix.net`). **"SAP LeanIX rejected the API token"**: The token is wrong or revoked, or the instance URL points at the wrong workspace. Re-generate the token under **Administration > Technical Users** and re-paste it in the config app. **"SAP LeanIX token endpoint temporarily unavailable"**: A transient outage at the mtm token endpoint. Retry shortly; no reconfiguration is needed. **GraphQL returns partial data with warnings**: The Pathfinder API can return permission-filtered results: a `data` payload alongside non-fatal `errors`. The connector treats `errors` as fatal only when no `data` came back. If a field is missing, check the technical user's permissions on that fact sheet type. ## External Resources > [card] [SAP LeanIX Developer Docs](https://docs.leanix.net) > > Official reference for the Pathfinder GraphQL, Integration API and Poll APIs. > [card] [Pathfinder GraphQL API](https://docs.leanix.net/reference/graphql-api-overview) > > The GraphQL schema behind the fact-sheet operations and the `graphql` passthrough. > [card] [Tool Agents](/products/agent-factory/capabilities) > > Learn how Agent Creator agents consume MCP tools in Prisme.ai. # Connector security Source: https://docs.prisme.ai/apps-store/marketplace/connectors/security Answers to the questions a security review asks before a connector goes to production: permissions, agent access, shared knowledge bases, credentials, models, network egress and audit This page answers the questions a security review usually asks before an App + MCP connector is used in production. For each question, it explains what the platform guarantees and what you control through configuration. Most production requirements are met by how you configure the production instance, not by changing the connector. The values that depend on the connector (read-only scopes, outbound hosts, modes to avoid) are listed in the **Security** section of each connector page. The underlying model (endpoints, trust domains, authorization layers) is described in [Connector architecture](/apps-store/marketplace/connectors/architecture), which also holds the checklist for the reviewer. ## How a connector reaches the provider Every connector uses one of four authentication families. The family decides whose identity the provider sees, and therefore how the questions below are answered. | Family | Connectors | Whose identity the provider sees | | - | - | - | | Delegated OAuth, Microsoft | OneNote, SharePoint, Outlook, Microsoft Teams, Power BI | Each user's own Microsoft 365 account | | Delegated OAuth, other provider | Google Workspace, Jira, Confluence, GitLab, HubSpot, Figma, Monday, Snowflake | Each user's own provider account | | Delegated OAuth or integration user | Salesforce | Each user's account in `oauth` mode; one integration user in `jwt` or `clientCredentials` mode | | Application credentials | Word, Excel (client credentials by default) | The Entra application, with the permissions consented on it | | Technical account or API key | SAP LeanIX, Gryzzly, DataGalaxy, WebDAV, ServiceNow, Tableau, SonarQube | One shared account, configured by the administrator | | Platform only | Knowledges | The Prisme.ai user, no third-party provider | With delegated OAuth, the provider applies each user's own permissions: an agent only reaches what the person using it can already open. With a technical account, every caller acts with that account's rights, so the account itself must carry the least privilege. ## Can an agent get more rights than it needs? The rights an agent can use are the scopes (or, for a technical account, the role) granted to the connector, and you choose them. * In the connector's configuration app, request only the read scopes when the agents must not modify anything. The provider then refuses every write itself, whatever the agent tries. The read-only scopes of each connector are listed in its **Security** section. * With the platform's central OAuth client (`oauthCentral`), the scopes a workspace may request depend on the connector and on the central application registered with the provider: check the connector's **Security** section. * On the provider side, restrict the permissions consented on the application registration as well. Some providers, Microsoft Entra among them, issue tokens that carry every permission consented earlier, whatever the connector requests. * For a technical account, create a dedicated account with a read-only role, and rotate its key. ## Are all agents allowed to call the connector? When the connector is installed in your workspace, the MCP endpoint of that installation checks the calling agent against the **Authorized agents** list. The list is empty at installation, so every agent is refused until you add it by name. Leave **Allow all agents** off in production. The list filters on the agent identifier sent with each call. It keeps the connector out of agents you did not choose, but it is not an authentication of the caller: what protects the data is the user's own provider connection (delegated OAuth) or the rights of the technical account. Size those rights accordingly. Some connectors also offer a global endpoint, hosted in the platform's core workspace and shared by every organization. It accepts every agent by design and stays unusable until the platform maintainer configures the central OAuth application. Its protection is the per-user OAuth: each user connects their own account. If your policy requires a per-agent allowlist, install the connector in your own workspace and use its endpoint. ServiceNow, Tableau, SonarQube, Word and Excel follow an older model with no agent list: access is controlled by installing the connector in a workspace and by its API key. ## Can a shared knowledge base expose content a reader cannot open? This applies to connectors that feed knowledge bases with a per-user connection: OneNote, SharePoint, Outlook, Microsoft Teams, Confluence and Google Workspace. A knowledge base is synchronized with the account of the person who connected it. When the base is shared, the platform checks, for each reader and each document, that the reader can open the document at the provider, with the reader's own connection. Documents the reader cannot open are left out of their results, and a reader who never connected their account gets no results from that source. This per-reader access control is enabled by default on new knowledge base connections, and the owner of the base can turn it off. Keep it on for every base shared beyond its owner. A connector that uses a technical account (WebDAV, for example) has no per-reader check: every document the account can read in the configured scope is indexed and visible to every reader of the base. Share such a base only with people entitled to the whole indexed scope. ## Can a static token or key be used permanently? Connectors with delegated OAuth also accept a token pasted directly in the configuration (`accessToken` mode). It is a testing aid, not a production mechanism: every caller then acts with the identity of whoever pasted the token, so the provider no longer applies per-user permissions. * For Microsoft and Google, an access token expires after about an hour, so the mode cannot work permanently anyway. * Personal access tokens and API tokens (GitLab, Jira, Confluence, Snowflake) can last much longer. Do not use them in production when per-user permissions are required. * Application-level modes (client credentials, service account, JWT) are not delegated either: avoid them when the provider must apply each user's permissions. * For connectors whose only mode is a technical account, keep the key in the workspace secrets, give it a read-only role and rotate it. The modes to avoid for each connector are listed in its **Security** section. ## Who can change scopes and credentials? Credentials, scopes and the agent list are stored in the secrets and configuration of the workspace where the connector is installed, and edited through its configuration app. Anyone with editor rights on that workspace can change them. * Restrict the production workspace to its administrators. Do not grant editor rights on a connector workspace to business builders. * Agents and agent builders never receive client secrets or users' tokens: the connector attaches credentials only when it calls the provider. * The client secret of the central OAuth application stays in the platform's core workspace and is never exposed to workspaces or users. ## Which models receive the provider's content? A connector never calls a language model itself. The provider's content reaches only the model of the agent that requested it and, when the connector feeds a knowledge base, the embedding model of that base. Both are chosen among the models your organization has approved, in the region they are deployed in. ## Which hosts does a connector contact? Each connector calls a fixed set of provider hosts, listed in its **Security** section, and the agent cannot change the destination: tools map to a fixed list of operations. * Most connectors contact fixed hosts, which you can allow by name in your egress control. * Connectors for self-hosted or per-instance providers (GitLab self-managed, Jira and Confluence Data Center, Salesforce, Snowflake, SAP LeanIX, WebDAV, ServiceNow, Tableau, SonarQube) contact the address the administrator sets at installation. That address is never supplied by a user or an agent. ## What is recorded? Every automation run produces an execution event in the workspace activity feed, readable by the members of the workspace where the connector is installed. Connectors redact the provider's content (documents, messages, responses) from these events, while keeping identifiers, statuses and operation names readable for troubleshooting. Content converted by a Custom Code step (for example a page turned into Markdown) can still appear in that step's own execution event, which is one more reason to restrict the workspace to its administrators. Some connectors also emit dedicated audit events for the provider calls they make, recording who called which operation, without the content. When a connector does, its **Security** section lists the events. # ServiceNow Source: https://docs.prisme.ai/apps-store/marketplace/connectors/service-now Manage ServiceNow ITSM tickets, change requests, problems and the service catalog from Agent Creator agents and Builder workflows ![ServiceNow](https://mintcdn.com/prismeai/Oqq72tWGTtxufvRl/images/connectors/service-now.svg?fit=max\&auto=format\&n=Oqq72tWGTtxufvRl\&q=85\&s=babf47fadb2a9e49207f8ffb39a4cf80) The ServiceNow app exposes the [ServiceNow](https://www.servicenow.com) ITSM platform through its Table API. It can be consumed two ways: as a remote MCP server that **Agent Creator** agents call as tools, or as a Builder app whose instructions you call directly from DSUL. It covers incidents, change requests, problems, the service catalog, requests, attachments, users and groups, plus a generic table accessor for any other ServiceNow table. Authentication is a **per-workspace credential** resolved server-side: either **Basic Auth** (a ServiceNow user with the right roles) or an **OAuth2 client** (`client_credentials` grant). Agents are identified by the capability **Scope** `context_id,agent_id,user_id`; the credential is never passed through the agent. > [card] ITSM Tickets > > Create, read, update and transition incidents, change requests and problems with work notes and close codes. > [card] Service Catalog > > List and inspect catalog items, then order them with their variables, creating a request and request item. > [card] Generic Table Access > > Query any ServiceNow table with encoded queries, fetch records by sys\_id, and compute aggregate statistics. ## Who is this for? This connector is used by three different roles. Jump to the section that matches yours; each one is self-contained. > [card] Agent builder > > You build agents in **Agent Creator** and want them to manage ServiceNow tickets. → *Agent builder* tab. > [card] Platform admin > > You run the platform and want to publish ServiceNow as a reusable capability. → *Platform admin setup* accordion below. > [card] Workspace builder > > You write Builder automations (DSUL) that call ServiceNow operations directly. → *Workspace builder* tab. ## Prerequisites (ServiceNow side) * A **ServiceNow** instance; its URL has the form `https://.service-now.com`. * A **credential**, one of: * **Basic Auth**: a ServiceNow user (username + password) holding the roles needed for the tables you target. * **OAuth2 client** (`client_credentials` grant): create an **Application Registry** in ServiceNow under **System OAuth > Application Registry** and note its **Client ID** / **Client Secret**. * The **roles** for the tables you intend to use: `itil` for incidents, `change_manager` for change requests, `problem_manager` for problems, `sn_request_write` for catalog requests, and a table-specific role for anything else. The generic table tools are ACL-filtered by the account's effective roles. > [accordion] Platform admin (Governance): one-time platform setup > > **Goal:** ServiceNow is a **per-workspace** connector: each workspace pastes its own ServiceNow credential (see the *Workspace builder* tab), so there is **no platform-wide credential to provision**. The only optional platform task is to publish ServiceNow as a reusable **capability** in AI Governance so agent builders can enable it from the catalog instead of pasting a raw MCP endpoint. > > > [!NOTE] > > > > There is no shared ServiceNow credential and no central OAuth client for this connector. The ServiceNow instance URL and credentials (Basic or OAuth2) always live in the consuming workspace. A Governance capability you publish here points at a specific workspace's MCP endpoint; that workspace still owns the credential. > > ## Declare the capability in AI Governance (optional) > > **1. Open AI Governance > Capabilities** > > Create (or edit) the **ServiceNow** capability. > > **2. Point it at the MCP endpoint** > > Set the capability's MCP server URL to the connector's **MCP Endpoint** (the workspace running the connector), and set its **Scope** to: > > ```text theme={null} > context_id,agent_id,user_id > ``` > > The `agent_id` in the scope is what lets the connector identify the calling agent. > > **3. Make it available to agent builders** > > Once created, the capability appears in the capability picker for agent builders in your organization, who enable it on their agents. Access to the catalog follows your organization's existing roles; there is no per-capability role grant. > > > [!WARNING] > > > > Declaring the capability makes the connector **available**; it does not by itself authorize a specific agent against a ServiceNow instance. The ServiceNow credential is resolved server-side from the workspace running the connector, and ServiceNow ACLs (the account's effective roles) are the final authorization boundary. There is **no OAuth auth-config JSON** to attach in Governance: authentication is a server-side Basic or `client_credentials` credential, not a per-user OAuth flow. *** > [tab] Agent builder (Agent Creator) > > ## Agent builder > > **Goal:** let an agent you build in Agent Creator manage ServiceNow tickets through MCP tools. > > > [!NOTE] > > > > Before an agent can call the connector, a *Workspace builder* must have installed and configured the ServiceNow app in a workspace (see the *Workspace builder* tab). Optionally, a *Platform admin* may have published a ServiceNow capability in AI Governance (see the *Platform admin setup* accordion above). > > The ServiceNow credential (Basic or OAuth2) is resolved server-side from the workspace's app configuration; it is never exposed to the agent. Your agent is identified by the `agent_id` that Agent Creator injects through the capability *Scope*. > > **1. Install and configure the connector in a workspace** > > Follow the *Workspace builder* tab: install **ServiceNow** in a workspace, then fill in the instance URL and credentials (Basic or OAuth2). > > **2. Add the MCP capability to your agent** > > In your agent, add a capability pointing at the workspace's **MCP Endpoint** URL, and set its **Scope** to: > > ```text theme={null} > context_id,agent_id,user_id > ``` > > The `agent_id` is what lets the connector identify your agent. The server URL is the connector's MCP Endpoint, auto-populated when the app is installed. > > **3. Save** > > The agent now has access to every ServiceNow tool exposed by the MCP server. > > ## Brief the agent in its system prompt > > Wiring the capability is not enough: the agent also needs to know the tools exist and when to use them. Add a short paragraph to the agent's system prompt. Copy-pasteable starter: > > ```text theme={null} > You have access to the ServiceNow MCP server. Use it whenever the user asks about ITSM data: incidents, change requests, problems, requested items, the service catalog, attachments, users or groups. Examples: "List my open incidents", "Create a change request for the database upgrade tonight", "What's the status of INC0012345?", "Order a new laptop from the catalog". Prefer calling MCP tools directly over guessing, and confirm with the user before any destructive action (resolve an incident, close a problem, transition a change). > ``` > > Refine the trigger keywords (assignment groups, ticket prefixes, catalog item names) so the agent reliably picks up the right intent in your context. > > > [!NOTE] > > > > **Legacy AI Knowledge agents** (no native MCP picker): add the connector under **Advanced > Tools > MCP** and paste the **MCP Endpoint** URL. The agent's identity is still propagated so the connector can read its `agent_id`. > > ## Available Tools > > ### Generic Table Access > > | Tool | Description | > | - | - | > | `queryRecords` | Query any ServiceNow table using encoded query syntax | > | `getRecord` | Get a single record from any table by `sys_id` | > | `getStats` | Aggregate statistics for a table (count, sum, avg, min, max, group by) | > > ### Incidents > > | Tool | Description | > | - | - | > | `listIncidents` | List incidents (state / priority / assignedTo / assignmentGroup filters) | > | `getIncident` | Get an incident by `sysId` or `number` | > | `createIncident` | Create an incident | > | `updateIncident` | Update an incident (supports `workNotes`, `comments`, `closeCode`, `closeNotes`) | > > ### Change Requests > > | Tool | Description | > | - | - | > | `listChanges` | List change requests | > | `getChange` | Get a change request | > | `createChange` | Create a `normal` / `standard` / `emergency` change | > | `updateChange` | Update a change request | > | `getChangeTransitions` | Get available state transitions | > | `transitionChange` | Transition to a new state | > > ### Problems > > | Tool | Description | > | - | - | > | `listProblems` | List problems | > | `getProblem` | Get a problem | > | `createProblem` | Create a problem | > | `updateProblem` | Update a problem (supports `workaround`, `causeNotes`, `fixNotes`) | > > ### Service Catalog > > | Tool | Description | > | - | - | > | `listCatalogItems` | List available catalog items | > | `getCatalogItem` | Get a catalog item with its variables (form fields) | > | `orderCatalogItem` | Order a catalog item (creates a request + request item) | > > ### Requests & Request Items > > | Tool | Description | > | - | - | > | `listRequests` | List service catalog requests | > | `getRequest` | Get a service catalog request | > | `listRequestItems` | List request items (RITMs), optionally filtered by parent request | > > ### Attachments, Users & Groups > > | Tool | Description | > | - | - | > | `listAttachments` | List attachments on a record | > | `uploadAttachment` | Upload a file (base64) to a record | > | `listUsers` | List ServiceNow users | > | `getUser` | Get a user by `sysId` or `username` | > | `listGroups` | List ServiceNow user groups | > > ## Output Formats > > Tools return the underlying ServiceNow Table API JSON. Most list and get operations accept a `displayValue` argument that controls how reference and choice fields are rendered: > > * **`false`**: raw `sys_id` values (the default for most fields). > * **`true`**: human-readable labels. > * **`all`**: both, under `value` and `display_value`. > > List operations also accept `limit`, `offset` and `fields` (comma-separated) to control the response size and shape. > > ## Tool Details > > ### queryRecords > > Query any ServiceNow table using the [encoded query](https://docs.servicenow.com/bundle/utah-platform-administration/page/use/using-lists/concept/c_EncodedQueryStrings.html) syntax. > > ```json theme={null} > { > "name": "queryRecords", > "arguments": { > "tableName": "incident", > "query": "active=true^priority=1^assignment_groupSTARTSWITHNetwork", > "fields": "number,short_description,assigned_to,priority", > "limit": 50, > "displayValue": "all" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `tableName` | Yes | `incident`, `change_request`, `problem`, `sc_req_item`, `sys_user`, … | > | `query` | No | Encoded query (operators: `=`, `!=`, `STARTSWITH`, `CONTAINS`, `IN`, `^`, `^OR`, …) | > | `fields` | No | Comma-separated field names to return | > | `limit` | No | Max records (default 20) | > | `offset` | No | Pagination offset | > | `displayValue` | No | `true` / `false` / `all` | > > ### createIncident > > ```json theme={null} > { > "name": "createIncident", > "arguments": { > "shortDescription": "VPN disconnects every 10 minutes", > "callerId": "caller-sys-id", > "category": "network", > "impact": "2", > "urgency": "2", > "assignmentGroup": "Network Support", > "contactType": "email" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `shortDescription` | Yes | Brief description of the incident | > | `callerId` | No | Caller `sys_id` | > | `category` / `subcategory` | No | Classification | > | `impact` / `urgency` | No | `1` / `2` / `3`; ServiceNow derives `priority` from these | > | `assignmentGroup` / `assignedTo` | No | Routing | > | `cmdbCi` | No | Affected configuration item `sys_id` | > | `contactType` | No | How reported: `email`, `phone`, `walk-in`, … | > > ### updateIncident > > ```json theme={null} > { > "name": "updateIncident", > "arguments": { > "sysId": "incident-sys-id", > "state": "6", > "closeCode": "Solved (Permanently)", > "closeNotes": "Rolled back the firmware to 7.2.1." > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `sysId` | Yes | Incident `sys_id` | > | `state` | No | `1` New, `2` In Progress, `3` On Hold, `6` Resolved, `7` Closed, `8` Canceled | > | `workNotes` | No | Internal work notes (appended) | > | `comments` | No | Customer-visible comments (appended) | > | `closeCode` / `closeNotes` | No | Required by most workflows when resolving | > > ### transitionChange > > Call `getChangeTransitions` first to discover which target states are legal for a given change, then transition: > > ```json theme={null} > { > "name": "transitionChange", > "arguments": { > "sysId": "change-sys-id", > "state": "-2" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `sysId` | Yes | Change request `sys_id` | > | `state` | Yes | Target state value. Common (model-dependent): `-5` New, `-4` Assess, `-3` Authorize, `-2` Scheduled, `-1` Implement, `0` Review, `3` Closed, `4` Canceled | > > ### orderCatalogItem > > ```json theme={null} > { > "name": "orderCatalogItem", > "arguments": { > "sysId": "catalog-item-sys-id", > "quantity": 1, > "variables": { > "laptop_model": "macbook_pro_16", > "delivery_date": "2026-05-01" > } > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `sysId` | Yes | Catalog item `sys_id` | > | `quantity` | No | Quantity (default 1) | > | `variables` | No | Object of form field values. Keys must match the item's variable names; call `getCatalogItem` first to discover them | > > ### uploadAttachment > > ```json theme={null} > { > "name": "uploadAttachment", > "arguments": { > "tableName": "incident", > "tableSysId": "incident-sys-id", > "fileName": "vpn-logs.txt", > "contentBase64": "VlBOIGxvZ3MgY29udGVudC4uLg==", > "contentType": "text/plain" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `tableName` | Yes | Table the record belongs to | > | `tableSysId` | Yes | Record `sys_id` | > | `fileName` | Yes | Attachment file name | > | `contentBase64` | Yes | File content as a base64 string | > | `contentType` | No | MIME type (e.g. `text/plain`, `application/pdf`) | > > Max attachment size is set by the instance (default 1 GB via `com.glide.attachment.max_size`, but most instances restrict it further). > [tab] Workspace builder (DSUL) > > ## Workspace builder > > **Goal:** install the connector in a workspace, configure the ServiceNow credential, and call its instructions from your automations. > > ## Installation > > 1. Go to **Apps** in your workspace > 2. Search for **ServiceNow** and install it > 3. Open the app instance configuration and fill in the instance URL and credentials (Basic or OAuth2) > > ## Configuration > > | Field | Description | > | - | - | > | **Instance URL** | `https://.service-now.com` (full URL with scheme) | > | **Authentication Type** | `basic` or `oauth2` | > | **Username** / **Password** | Required when `authType = basic` (stored as workspace secrets) | > | **OAuth2 Client ID** / **Client Secret** | Required when `authType = oauth2`; uses the `client_credentials` grant (Client Secret stored as a workspace secret) | > | **MCP Endpoint** | Auto-populated on install; the URL of the MCP endpoint for this instance, used to wire the connector into an agent capability | > > The credential you provide selects the auth mode: > > | Auth mode | What you provide | Best for | > | - | - | - | > | **Basic Auth** (`authType: basic`) | A ServiceNow username + password | Quick setup; reuses an existing technical user and its roles | > | **OAuth2 client credentials** (`authType: oauth2`) | Client ID + Client Secret from an Application Registry | Token-based, server-to-server; the connector exchanges them at `/oauth_token.do` and caches the bearer | > > > [!NOTE] > > > > Credentials are stored as workspace secrets and resolved server-side on every call. Switch modes by editing the app instance configuration; no instruction lets you change credentials at runtime. > > ## Available Instructions > > Every instruction resolves the credential from the workspace configuration. Most list operations accept `limit`, `offset`, `fields` (comma-separated) and `displayValue` (`true` / `false` / `all`) to control the response shape. > > ### Generic Table Access > > | Instruction | Description | Returns | > | - | - | - | > | `queryRecords` | Query any table by `tableName` (required) using an encoded `query`. `fields`, `limit`, `offset`, `displayValue` shape the response. | `{ result: [ { …record fields } ] }` | > | `getRecord` | Get one record by `tableName` (required) + `sysId` (required). | `{ result: { …record fields } }` | > | `getStats` | Aggregate statistics for `tableName` (required): `count`, `sumFields`, `avgFields`, grouped by `groupBy`, filtered by `query`. | `{ result: { stats: { count, … }, groupby_fields } }` | > > ### Incidents > > | Instruction | Description | Returns | > | - | - | - | > | `listIncidents` | List incidents filtered by `state`, `priority`, `assignedTo`, `assignmentGroup` and/or a raw `query`. | `{ result: [ { sys_id, number, short_description, … } ] }` | > | `getIncident` | Get one incident by `sysId` **or** `number` (e.g. `INC0010001`). | `{ result: { sys_id, number, state, … } }` | > | `createIncident` | Create an incident. `shortDescription` (required); plus `callerId`, `category`, `impact`, `urgency`, `assignmentGroup`, `contactType`, … | `{ result: { sys_id, number, … } }` | > | `updateIncident` | Update an incident by `sysId` (required). Supports `state`, `workNotes`, `comments`, `closeCode`, `closeNotes`, reassignment. | `{ result: { sys_id, number, state, … } }` | > > ### Change Requests > > | Instruction | Description | Returns | > | - | - | - | > | `listChanges` | List change requests filtered by `state`, `priority`, `type` (`normal`/`standard`/`emergency`), assignment and/or `query`. | `{ result: [ { sys_id, number, … } ] }` | > | `getChange` | Get one change request by `sysId` (required). | `{ result: { sys_id, number, state, … } }` | > | `createChange` | Create a change. `changeType` + `shortDescription` (required); plus `risk`, `impact`, `startDate`, `endDate`, `implementationPlan`, `backoutPlan`, `testPlan`, … Dates use `YYYY-MM-DD HH:mm:ss`. | `{ result: { sys_id, number, … } }` | > | `updateChange` | Update a change by `sysId` (required): schedule, plans, assignment, `workNotes`, … | `{ result: { sys_id, number, … } }` | > | `getChangeTransitions` | List the legal target states for a change by `sysId` (required). | `{ transitions: [ { state, label } ] }` | > | `transitionChange` | Move a change to a target `state` (required) by `sysId` (required). | `{ result: { sys_id, state, … } }` | > > ### Problems > > | Instruction | Description | Returns | > | - | - | - | > | `listProblems` | List problems filtered by `state`, `priority`, assignment and/or `query`. | `{ result: [ { sys_id, number, … } ] }` | > | `getProblem` | Get one problem by `sysId` (required). | `{ result: { sys_id, number, … } }` | > | `createProblem` | Create a problem. `shortDescription` (required); plus `category`, `impact`, `urgency`, assignment, `cmdbCi`. | `{ result: { sys_id, number, … } }` | > | `updateProblem` | Update a problem by `sysId` (required). Supports `state`, `workaround`, `causeNotes`, `fixNotes`, `workNotes`. | `{ result: { sys_id, number, … } }` | > > ### Service Catalog > > | Instruction | Description | Returns | > | - | - | - | > | `listCatalogItems` | List catalog items, optionally filtered by `catalog`, `category` or `query`. | `{ result: [ { sys_id, name, short_description } ] }` | > | `getCatalogItem` | Get one catalog item with its variables (form fields) by `sysId` (required). | `{ result: { sys_id, name, variables: [ … ] } }` | > | `orderCatalogItem` | Order an item by `sysId` (required), with `quantity` and a `variables` object of form values. | `{ result: { request_id, request_number, sys_id } }` | > > ### Requests & Request Items > > | Instruction | Description | Returns | > | - | - | - | > | `listRequests` | List service catalog requests, optionally filtered by `query`. | `{ result: [ { sys_id, number, … } ] }` | > | `getRequest` | Get one request by `sysId` (required). | `{ result: { sys_id, number, … } }` | > | `listRequestItems` | List request items (RITMs), optionally filtered by parent `requestId` or `query`. | `{ result: [ { sys_id, number, … } ] }` | > > ### Attachments, Users & Groups > > | Instruction | Description | Returns | > | - | - | - | > | `listAttachments` | List attachments on a record by `tableName` (required) + `tableSysId` (required). | `{ result: [ { sys_id, file_name, content_type, size_bytes } ] }` | > | `uploadAttachment` | Upload a base64 file to a record: `tableName`, `tableSysId`, `fileName`, `contentBase64` (all required) + `contentType`. | `{ result: { sys_id, file_name, download_link } }` | > | `listUsers` | List users, optionally filtered by `active` or `query`. | `{ result: [ { sys_id, user_name, name, email } ] }` | > | `getUser` | Get one user by `sysId` **or** `username`. | `{ result: { sys_id, user_name, name, email } }` | > | `listGroups` | List user groups, optionally filtered by `active` or `query`. | `{ result: [ { sys_id, name } ] }` | > > > [!NOTE] > > > > `Returns` shows the shape of the operation output. `displayValue: all` adds a `display_value` alongside each `value` for reference and choice fields. > > ## DSUL Examples > > ### Open an incident from a form > > ```yaml theme={null} > - ServiceNow.createIncident: > shortDescription: VPN disconnects every 10 minutes > description: '{{payload.message}}' > callerId: '{{caller_sys_id}}' > category: network > impact: '2' > urgency: '2' > assignmentGroup: Network Support > contactType: email > output: incident > ``` > > ### Assign and resolve > > ```yaml theme={null} > - ServiceNow.updateIncident: > sysId: '{{incident.sys_id}}' > assignedTo: '{{engineer_sys_id}}' > state: '2' > workNotes: Investigating the VPN concentrator logs. > - ServiceNow.updateIncident: > sysId: '{{incident.sys_id}}' > state: '6' > closeCode: Solved (Permanently) > closeNotes: Rolled back the firmware to 7.2.1. > ``` > > ### Query with an encoded query > > ```yaml theme={null} > - ServiceNow.queryRecords: > tableName: incident > query: active=true^priority=1^assignment_groupSTARTSWITHNetwork > fields: number,short_description,assigned_to,priority > limit: 50 > displayValue: all > output: critical > ``` > > ### Order a catalog item > > ```yaml theme={null} > - ServiceNow.getCatalogItem: > sysId: '{{laptop_item_id}}' > output: item > - ServiceNow.orderCatalogItem: > sysId: '{{laptop_item_id}}' > quantity: 1 > variables: > laptop_model: macbook_pro_16 > delivery_date: 2026-05-01 > output: request > ``` > > ### Aggregate statistics > > ```yaml theme={null} > - ServiceNow.getStats: > tableName: incident > query: active=true > count: true > groupBy: priority,assignment_group > output: stats > ``` *** ## Security The answers that hold for every connector (agent access, shared knowledge bases, credentials, models, egress) are on [Connector security](/apps-store/marketplace/connectors/security). This section lists what is specific to ServiceNow. | Topic | ServiceNow | | - | - | | Authentication family | Technical account or API key: one ServiceNow user with HTTP Basic (`basic`, the default), or an OAuth client with the client credentials grant (`oauth2`). ServiceNow sees that account for every caller. | | Production modes | `basic` or `oauth2` | | Modes to avoid in production | None: both modes use one shared account. Give it a read-only role, keep its credentials in the workspace secrets and rotate them. | | Read-only rights | Add the `snc_read_only` role to the account, on top of the table roles it needs (`itil`, for example): ServiceNow then refuses every create, update and delete. The role comes from the Read-Only User Role plugin, which a ServiceNow administrator may need to activate. | | Agent allowlist | No: access is controlled by installing the connector and by its signed API key. | | Per-reader access control on knowledge bases | Not applicable: this connector does not feed knowledge bases. | | Outbound hosts | The **Instance URL** set at installation (`https://.service-now.com`), for API calls and, in `oauth2` mode, for the token endpoint `/oauth_token.do`. | | Audit events | None specific to this connector | The generic `queryRecords` and `getRecord` tools reach any table the account can read, not only incidents, changes and problems. `snc_read_only` blocks writes, not reads: grant the account the table roles your agents need and nothing more. *** ## Error Handling | HTTP Status | Error | Solution | | - | - | - | | 401 | Unauthorized | Verify credentials; for OAuth2, check the `client_credentials` grant is enabled on the Application Registry | | 403 | Forbidden | The user/client lacks an ACL on the target table; grant `itil`, `change_manager`, `problem_manager`, or a table-specific role | | 404 | Not Found | Verify the `sys_id` / `number` and that the record is not in a restricted domain | | 409 | Conflict | The state transition is not allowed; call `getChangeTransitions` to get the valid targets | | 429 | Rate Limited | The instance returned a `X-RateLimit-*` error; back off, as ServiceNow also enforces per-user transaction quotas | | 500 | Server Error | A ServiceNow business rule or script failed; check the instance's system logs | ### Common Issues **"ServiceNow not configured"**: `instanceUrl` is missing from the app config. Paste the full URL with scheme (`https://acme.service-now.com`). **"Basic Auth requires username and password"**: `authType` is `basic` but one credential is empty. Either fill both or switch to `oauth2`. **"OAuth2 requires clientId and clientSecret"**: `authType` is `oauth2` but the client credentials are missing. Create an **Application Registry** in ServiceNow (**System OAuth > Application Registry**) with the `client_credentials` grant and paste its Client ID / Client Secret. **Empty results with a seemingly valid query**: encoded queries are case-sensitive and ACL-filtered. Try `displayValue: all` and verify the effective roles of the account; a record outside the account's domain is silently excluded. ## External Resources > [card] [ServiceNow Table API](https://developer.servicenow.com/dev.do#!/reference/api/utah/rest/c_TableAPI) > > Official Table API reference > [card] [Encoded Query Strings](https://docs.servicenow.com/bundle/utah-platform-administration/page/use/using-lists/concept/c_EncodedQueryStrings.html) > > Operators and syntax for the `query` argument > [card] [OAuth Inbound Setup](https://docs.servicenow.com/bundle/utah-platform-security/page/administer/security/task/t_CreateEndpointforExternalClients.html) > > Create an OAuth Application Registry > [card] [Tool Agents](/products/agent-factory/capabilities) > > Learn how Agent Creator agents consume MCP tools in Prisme.ai. # SharePoint Source: https://docs.prisme.ai/apps-store/marketplace/connectors/sharepoint SharePoint sites, document libraries, files, lists and permissions from Agent Creator agents and Builder workflows, via Microsoft Graph with per-user Microsoft Entra OAuth ![SharePoint](https://mintcdn.com/prismeai/107CJC0iC0TOqNad/images/connectors/sharepoint.svg?fit=max\&auto=format\&n=107CJC0iC0TOqNad\&q=85\&s=b958760e9a8b5b4507660e1db1f8a6e1) The SharePoint app provides read/write access to Microsoft SharePoint Online and OneDrive through the [Microsoft Graph](https://learn.microsoft.com/en-us/graph/overview) REST API (v1.0): sites, document libraries (drives), files and folders, SharePoint lists, sharing permissions, and the Azure AD directory. It can also read Excel `.xlsx` workbooks and Word `.docx` documents **natively**: cell values and document text are parsed in-process, with no download, OCR or external extraction service. It can be consumed two ways: as a remote MCP server that **Agent Creator** agents call as tools, or as a Builder app whose instructions you call directly from DSUL. The MCP surface groups every operation into **nine entity tools** (`sites`, `drives`, `items`, `search`, `permissions`, `lists`, `directory`, `workbook`, `documents`), each driven by an `action` argument, and runs in the **tenant app-instance context** (it resolves the installing workspace's own credentials). Authentication is per-user and supports several modes: * **Per-user OAuth2 (central client)** (`oauthCentral`, recommended): one Microsoft Entra OAuth Application is registered once by the platform maintainer; every end user signs in with their own Microsoft account. Nothing to register per tenant: each workspace just installs the app and clicks *Connect*. * **Per-user OAuth2 (tenant client)** (`oauth`): paste your own Entra application (client) ID/secret in the connector config app. Each user signs in with their own account against your client (PKCE authorization-code flow). * **Application (client credentials)** (`clientCredentials`): an Entra app with **application** Graph permissions and admin consent, acting without an interactive sign-in. Best for back-office / service automations and content indexing. * **Direct access token** (`accessToken`): a caller-managed Microsoft Graph access token, used as-is with no exchange. > [card] Sites & files > > Discover sites and subsites, browse document libraries and folders, read/create/move/copy files, get pre-signed download URLs, thumbnails and versions, and read Excel `.xlsx` workbooks and Word `.docx` documents natively (cell values, full text) > [card] Lists, search & permissions > > Query and write SharePoint lists and list items, run Microsoft Search across drives and sites, and inspect or manage sharing permissions for access-aware RAG > [card] Flexible per-user auth > > Per-user Microsoft Entra OAuth (central or tenant client), application client-credentials, or a direct access token ## Video tutorial This four-minute tutorial walks through the four ways to use this connector, from the simplest to the most advanced: connecting your own Microsoft account from a chat, adding the SharePoint Next capability to an agent in Agent Creator, controlling authentication and authorized agents from a Builder workspace (with a `searchSites` automation), and declaring the platform OAuth client as an administrator. Use the buttons in the top-right corner of the player to switch the narration language and the subtitles. The sections on the left are clickable. Screens show the English interface; narration and subtitles are available in English and French. ## Who is this for? This connector is used by four different roles. Jump to the section that matches yours; each one is self-contained. > [card] Agent builder > > You build agents in **Agent Creator** and want them to browse SharePoint sites, read files and query lists. → *Agent builder* tab. > [card] Knowledge base owner > > You want SharePoint documents indexed and searchable semantically, kept up to date. → *Knowledge base (sync)* tab. > [card] Platform admin > > You run the platform and set up the shared Microsoft Entra OAuth client once for everyone. → *Platform admin setup* accordion below. > [card] Workspace builder > > You write Builder automations (DSUL) that call SharePoint operations directly. → *Workspace builder* tab. ## Prerequisites (Microsoft side) * A **Microsoft 365 / SharePoint Online** tenant, and an **Azure / Microsoft Entra ID** tenant where you can register an application (or a maintainer who already did). * An **app registration** in [Microsoft Entra ID](https://entra.microsoft.com) (Azure portal → **App registrations**), with a **client secret** created under **Certificates & secrets**. * **Microsoft Graph delegated permissions** granted on the app (for the per-user OAuth modes), covering the resources you intend to use: * Sites & files: `Sites.Read.All` (or `Sites.ReadWrite.All` for create/update/move), `Files.Read.All` (or `Files.ReadWrite.All`) * Directory (access-aware RAG): `User.Read`, `GroupMember.Read.All` (optional) * Sign-in / identity: `openid`, `profile`, `offline_access` * For the **application (client-credentials)** mode instead, grant the equivalent **application** permissions (e.g. `Sites.Read.All`, `Files.Read.All`) and have a Global Administrator grant admin consent. ### Restricting the connector to chosen sites (`Sites.Selected`) `Sites.Read.All` reaches every site of the tenant. To give the connector a handful of sites only, use the `Sites.Selected` **application** permission with the `clientCredentials` mode: 1. On the app registration, grant the `Sites.Selected` application permission (with `Files.Read.All` or `Files.ReadWrite.All` if needed) and have an administrator grant admin consent. On its own, `Sites.Selected` opens no site. 2. A Microsoft 365 administrator grants the application access **site by site**, with the `read` or `write` role (Microsoft Graph `POST /sites/{site-id}/permissions`, or `Grant-PnPAzureADAppSitePermission`). 3. In the connector's configuration app, open the **Authorized sites** tab, paste the URL of each granted site, choose its role (read or write), and save. The configuration app resolves each URL and lists, under each line, the sites the service account cannot open. Once sites are declared: * The agent only sees the declared sites. Listing sites returns that list, and search runs inside each declared site's default document library. * Every call that names a site or a document library outside the list is refused before it reaches Microsoft Graph, with a message naming the authorized sites. A site declared `read` refuses writes; a copy from it into a `write` site is allowed. * Microsoft Search (`/search/query`) and the user's personal OneDrive are not available: `Sites.Selected` does not cover them. * Search covers the default document library of each site, does not rank results across sites, does not return list items, and returns at most the first 200 hits. An empty list puts the connector back to the reach of its credential. The declaration also works with a tenant-wide permission, to expose fewer sites than the credential could reach. The OAuth scopes requested by default are: ```text theme={null} offline_access https://graph.microsoft.com/Sites.Read.All https://graph.microsoft.com/Files.Read.All https://graph.microsoft.com/User.Read ``` > [accordion] Platform admin (Governance): one-time platform setup > > **Goal:** two one-time tasks: (1) configure the shared **central Microsoft Entra OAuth client** so every workspace lets its users sign in with their own Microsoft account, and (2) expose SharePoint as a reusable **capability** in AI Governance so agent builders can pick it without pasting endpoint URLs. > > ## 1. Configure the connector > > **1. Register the OAuth Application in Microsoft Entra ID** > > In [Microsoft Entra ID](https://entra.microsoft.com) → **App registrations > New registration**, register a **Web** application. Add a **Redirect URI** pointing at the core workspace callback: > > ```text theme={null} > /workspaces//webhooks/oauthCallback > ``` > > > [!WARNING] > > > > Microsoft Entra rejects redirect URIs that contain a colon in the path, so use the **raw workspace id** of the core SharePoint workspace (``), **not** the `slug:sharepoint-next` form used by other connectors. Copy the exact URI from the connector's configuration app, which renders it for you. > > Add the Microsoft Graph **delegated** permissions listed in *Prerequisites*, create a **client secret** under **Certificates & secrets**, and note the **Application (client) ID**, the **secret value**, and the **Directory (tenant) ID** (or use `common` / `organizations` for multi-tenant). > > **2. Enter the credentials through the configuration app** > > Open the central `sharepoint-next` workspace and launch its **Configuration app**: `/apps/sharepoint-next` (e.g. `https://studio.prisme.ai/apps/sharepoint-next`), also linked as `Configuration app` on the installed instance. Switch to the maintainer view and follow the in-app instructions to paste the **Client ID**, **Client Secret**, **Tenant** and (optionally) scopes; the app stores them in the core workspace's secrets for you. Do not edit Studio's raw Secrets by hand. These credentials stay in the `sharepoint-next` workspace and are never exposed to tenants or end users; token exchange is proxied through the core `centralTokenExchange` webhook so the client secret never leaves the core workspace. > > **3. Tell workspaces to use the central client** > > Each consuming workspace selects auth mode **`oauthCentral`** in the connector configuration app (no client id/secret to enter on their side). Their users then just click **Connect**. > > ## 2. Declare the capability in AI Governance > > Generic connectors (broad tool surfaces meant to be shared across many agents, like SharePoint) are best exposed as a named **capability** in AI Governance. Agent builders then enable that capability on their agents instead of pasting a raw MCP endpoint. > > **1. Open AI Governance > Capabilities** > > Create (or edit) the **SharePoint** capability. > > **2. Point it at the MCP endpoint** > > Set the capability's MCP server URL to the connector's **MCP Endpoint**, and set its **Scope** to: > > ```text theme={null} > context_id,agent_id,user_id > ``` > > The `agent_id` in the scope is what lets the connector identify and authorize the calling agent. > > **3. Make it available to agent builders** > > Once created, the capability appears in the capability picker for agent builders in your organization, who enable it on their agents. Access to the catalog follows your organization's existing roles; there is no per-capability role grant. > > **4. Smoke-test** > > From an agent that has the capability, in a workspace configured for `oauthCentral`, trigger any tool. The user is prompted to connect once (Microsoft sign-in); subsequent calls reuse the stored token transparently and refresh it automatically. > > > [!NOTE] > > > > The connector's configuration app also offers a one-click **Add to catalog** button (workspace owner / admin only) that publishes the SharePoint capability to the organization-wide Capabilities catalog for you, the easiest way to expose it to agent builders without hand-editing Governance. > > > [!WARNING] > > > > Declaring the capability makes the connector **available**; it does not by itself authorize a specific agent. This connector follows the **tenant-context model**: which agents may actually call it is gated per-workspace by the **authorized-agents allowlist** in the configuration app (see the *Workspace builder* tab). Agents show a **Connect** button only if the catalog entry carries the connector's connect / status / disconnect webhooks in its `auth` block. The configuration app's **Add to catalog** button writes it for you. If you create the entry by hand, paste that block into **Auth Configuration**: the platform adds it later on its own only for a workspace endpoint (ending in `.mcp`), never for the connector's global `/webhooks/mcp` endpoint. *** > [tab] Agent builder (Agent Creator) > > ## Agent builder > > **Goal:** let an agent you build in Agent Creator browse SharePoint sites, read and manage files, query lists, and check permissions through MCP tools. > > > [!NOTE] > > > > Before an agent can call the connector, a *Workspace builder* must have installed and configured the SharePoint app in a workspace (see the *Workspace builder* tab), and, for the central OAuth mode, a *Platform admin* must have provisioned the shared Microsoft Entra OAuth client (see the *Platform admin setup* accordion above). > > This connector runs in the **tenant app-instance context**: your agent is authorized two ways at once: it is identified by the `agent_id` that Agent Creator injects through the capability *Scope*, and that agent must appear in the connector's **authorized-agents allowlist** (managed in the configuration app). The Microsoft Graph access token itself is resolved server-side from the configured auth mode. > > There are two ways to wire it up. Pick based on how much isolation you need. > > ## Option A: Enable the shared capability from the catalog > > The fastest path: a *Platform admin* has already published a **SharePoint** capability (see the *Platform admin setup* accordion above, §2), so you just pick it from the catalog. A workspace owner can publish it in one click with the config app's **Add to catalog** button. > > **1. Open your agent in Agent Creator** > > Open the agent you want to extend and go to its capabilities / tools. > > **2. Add the SharePoint capability** > > Browse the capability catalog, select **SharePoint**, and enable it. The MCP endpoint URL and the *Scope* (`context_id,agent_id,user_id`) are already wired by the admin: nothing to paste, and the shared instance accepts every agent, so there is no allowlist step on your side. > > **3. Connect a Microsoft account (OAuth modes)** > > On the first tool call, an unconnected user is prompted to sign in; Agent Creator surfaces a `connect_url`. Application (`clientCredentials`) and `accessToken` modes need no per-user sign-in. > > > [!NOTE] > > > > Convenient, but your agent runs against a **shared, platform-managed instance**: its Microsoft credentials are owned by someone else and the instance accepts every agent that is granted the capability. Prefer Option B for anything beyond quick experiments. > > ## Option B: Run it from your own workspace (recommended) > > For production agents, install the connector in **your own workspace** and point the agent at *that* workspace's MCP endpoint. > > > [!WARNING] > > > > **Prefer this mode for security.** Because the MCP runs in *your* app-instance context, the Microsoft credentials, the per-user OAuth tokens and the authorized-agents allowlist are all **scoped to your workspace**, not shared platform-wide. You decide exactly which agents may call it and which Microsoft account / auth mode backs them, and a misconfiguration elsewhere can never expose your SharePoint content. The shared catalog capability (Option A) is a broad surface many agents can reach; your own workspace is an isolated, least-privilege boundary. > > **1. Install and configure the connector in your workspace** > > Follow the *Workspace builder* tab: install **SharePoint** in your workspace, open its **Configuration app**, choose the auth mode and connect a Microsoft account. > > **2. Allowlist your agent** > > In that workspace's config app, open **Authorized agents** and tick your agent (the **Install capability** button does this for you). > > **3. Add the MCP capability to your agent** > > In your agent, add a capability pointing at **your workspace's MCP Endpoint** URL, and set its **Scope** to: > > ```text theme={null} > context_id,agent_id,user_id > ``` > > The `agent_id` is what lets the connector identify and authorize your agent; without it, every call is rejected with an explicit "agent could not be identified" message. This *Scope* is separate from the Microsoft Graph OAuth scopes. > > **4. Connect a Microsoft account (OAuth modes)** > > On the first tool call, the user is prompted to sign in (or uses **Connect** in the config app). > > ## Brief the agent in its system prompt > > Whichever option you pick, wiring the capability is not enough: the agent must know the MCP exists and when to use it. Copy-pasteable starter: > > ```text theme={null} > You have access to the SharePoint MCP server (tools: sites, drives, items, search, permissions, lists, directory, workbook, documents). Each tool takes an `action` argument. Use it whenever the user asks about SharePoint sites, document libraries, files and folders, SharePoint lists, sharing permissions, or who can access a document. To read a file, pick the tool by format: a Word `.docx` file with the `documents` tool, an Excel `.xlsx` file with the `workbook` tool, a text file (`.txt`, `.csv`, `.md`, `.json`) with `items` `getContent`, and any other file (PDF, PowerPoint, images) with `items` `attachToChat`, which asks the user to attach it to the conversation. Never try to decode file bytes yourself. Prefer calling a tool over guessing, and confirm with the user before any write or destructive action (create, update/move, copy, delete, invite, create link, add/create worksheet or table). > ``` > > > [!NOTE] > > > > **Legacy AI Knowledge agents** (no native MCP picker): add the connector under **Advanced > Tools > MCP** and paste the **MCP Endpoint** URL. The agent still has to be allowlisted in the config app and its identity propagated so the connector can read its `agent_id`. > > > [!NOTE] > > > > **Restricting to read-only (least privilege).** SharePoint tools cover both reads and writes (create folders, rename, move, copy, delete, share, edit list items and Excel cells; the connector never uploads file content). The default scopes depend on the OAuth client: with your own Microsoft Entra app, the connector requests **read-only** scopes (`Sites.Read.All`, `Files.Read.All`) unless you widen the **Scopes** field; with the platform's central client, it requests `Sites.ReadWrite.All` and `Files.ReadWrite.All`. To keep the connector read-only, set the read scopes (the **Read-only preset** of the configuration app): > > > > ```text theme={null} > > offline_access https://graph.microsoft.com/Sites.Read.All https://graph.microsoft.com/Files.Read.All https://graph.microsoft.com/User.Read > > ``` > > > > Any write attempt is then rejected by Microsoft Graph with `403 Forbidden`. The scope is set at the workspace level (a workspace editor can widen it); for a hard guarantee, use an Entra app limited to read permissions. > > ## Available Tools > > Each tool takes an `action` argument selecting the concrete operation, plus the per-action parameters. > > | Tool | Description | > | - | - | > | `sites` | SharePoint sites discovery. Actions: `search`, `get`, `getRoot`, `listSubsites`. | > | `drives` | Document libraries (drives) of sites and OneDrive. Actions: `listForSite`, `getSiteDefault`, `get`, `getMine`, `listMine`. | > | `items` | Files & folders (driveItems): browse, read text files, offer any other file for attachment to the conversation. Actions: `listMyRootChildren`, `listMyChildrenByPath`, `listChildren`, `listRootChildren`, `changes`, `get`, `getContent`, `attachToChat`, `createFolder`, `update`, `delete`, `copy`, `thumbnails`, `versions`. | > | `search` | Microsoft Search across SharePoint / OneDrive. Action: `query`. | > | `permissions` | Sharing & permissions on driveItems (access-aware RAG). Actions: `list`, `get`, `invite`, `createLink`, `delete`. | > | `lists` | SharePoint lists and list items. Actions: `listForSite`, `get`, `listItems`, `getItem`, `createItem`, `updateItemFields`, `deleteItem`. | > | `directory` | Azure AD users & groups: resolve identities and group membership. Actions: `getUser`, `userMemberOf`, `checkUserMemberGroups`, `getGroup`, `groupMembers`. | > | `workbook` | Read & write Excel `.xlsx` workbooks **natively** via the Microsoft Graph Excel API: no download, no OCR; cells are returned as structured values. Target a file by `driveId` + `itemId`. Actions: `listWorksheets`, `usedRange`, `getRange`, `listTables`, `listTableRows`, `updateRange`, `addTableRow`, `addWorksheet`, `createTable`, `executeFunction`. | > | `documents` | Read the content of Word `.docx` documents **natively**: no external extraction service, no OCR; parses the OOXML in-process. Target a file by `driveId` + `itemId`. Actions: `getText`, `getStructure`. | > > ## Output Formats > > Every tool accepts an `outputFormat` argument that controls the MCP response shape: > > * **`verbose`** (default): a human-readable text view, optimized for LLM consumption. > * **`structured`**: concise machine-readable JSON in `structuredContent`. > * **`both`**: the structured payload, with its JSON also rendered as text. > > ## Tool Details > > ### sites > > ```json theme={null} > { > "name": "sites", > "arguments": { > "action": "search", > "search": "marketing", > "top": 10 > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | One of `search`, `get`, `getRoot`, `listSubsites`. | > | `siteId` | For get/listSubsites | SharePoint site id (`hostname,siteCollectionId,siteId`). | > | `search` | For search | Keyword to match sites; use `*` to list all. | > | `top` / `select` | No | OData `$top` / `$select`. | > > ### drives > > ```json theme={null} > { > "name": "drives", > "arguments": { > "action": "listForSite", > "siteId": "contoso.sharepoint.com,abc-123,def-456" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | One of `listForSite`, `getSiteDefault`, `get`, `getMine`, `listMine`. | > | `siteId` | For listForSite/getSiteDefault | SharePoint site id. | > | `driveId` | For get | Drive (document library) id. | > | `select` | No | OData `$select`. | > > ### items > > ```json theme={null} > { > "name": "items", > "arguments": { > "action": "listChildren", > "driveId": "b!xyz...", > "itemId": "01ABCDEF...", > "top": 50 > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | One of `listMyRootChildren`, `listMyChildrenByPath`, `listChildren`, `listRootChildren`, `changes`, `get`, `getContent`, `attachToChat`, `createFolder`, `update`, `delete`, `copy`, `thumbnails`, `versions`. | > | `driveId` | All actions except `listMyRootChildren`, `listMyChildrenByPath`, and `attachToChat` by `path` | Drive id. | > | `itemId` | For get/getContent/attachToChat/update/delete/copy/thumbnails/versions/listChildren | DriveItem id. | > | `path` | For listMyChildrenByPath; optional for attachToChat | Path in the signed-in user's own OneDrive, without a leading slash (for example `Documents/Reports`). OAuth modes only. | > | `parentItemId` | For createFolder | Parent folder item id. | > | `top` / `select` / `orderby` / `expand` / `skiptoken` | No | OData query options and pagination. | > | `body` | For createFolder/update/copy | JSON body, e.g. `createFolder` → `{ name, folder: {}, "@microsoft.graph.conflictBehavior" }`; `copy` → `{ parentReference, name }`. | > > ### items: reading a file's content > > Pick the reading path by file format: > > | Format | Tool and action | What the agent receives | > | - | - | - | > | Word `.docx` | `documents` `getText` (or `getStructure`) | The full plain text, capped at about 200 KB | > | Excel `.xlsx` | `workbook` (`listWorksheets`, then `usedRange` or `getRange`) | Cell values as structured data | > | Text (`.txt`, `.csv`, `.md`, `.json`, `.html`, `.xml`…) | `items` `getContent` | The decoded text, capped at about 200 KB | > | PDF, PowerPoint, images, other binaries | `items` `attachToChat` | An attachment offer that the user approves in the chat | > > `getContent` decides from the file's metadata before downloading anything: a text file comes back as text, and any other file comes back as the same attachment offer as `attachToChat`, never as raw bytes. > > `attachToChat` never downloads the file. It returns a standard MCP `resource_link` whose `uri` is the file's SharePoint web link. Agent Creator then asks the user to approve the attachment; once approved, the file is fetched server-side from its pre-signed download link and indexed in the conversation, exactly like a file the user dropped in the chat. The agent then searches it like any conversation document. Size limits: > > * PDF, PowerPoint and other documents: up to the chat upload limit (`attachment_direct_max_bytes`, 100 MB by default). > * Images: 4 MB by default (`attachment_fetch_max_bytes`), because an image is copied into the conversation before the model reads it. > > Above the limit, the attachment is refused and the agent should share the file's SharePoint link (`webUrl`, from `items` `get`) instead. A folder cannot be attached. > > For a complete agent built on these reading paths, with the canvas for producing files, follow the [Office 365 agent tutorial](/resources/tutorials/office-365-agent). > > ### lists > > ```json theme={null} > { > "name": "lists", > "arguments": { > "action": "listItems", > "siteId": "contoso.sharepoint.com,abc-123,def-456", > "listId": "b6c8...", > "expand": "fields" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | One of `listForSite`, `get`, `listItems`, `getItem`, `createItem`, `updateItemFields`, `deleteItem`. | > | `siteId` | Yes | SharePoint site id. | > | `listId` | For get/listItems/getItem/createItem/updateItemFields/deleteItem | SharePoint list id. | > | `itemId` | For getItem/updateItemFields/deleteItem | List item id. | > | `expand` | No | OData `$expand`; use `fields` to get column values. | > | `select` / `top` / `filter` | No | OData query options. | > | `body` | For createItem/updateItemFields | `createItem` → `{ fields: { : } }`; `updateItemFields` → `{ : }`. | > > ### permissions > > ```json theme={null} > { > "name": "permissions", > "arguments": { > "action": "list", > "driveId": "b!xyz...", > "itemId": "01ABCDEF..." > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | One of `list`, `get`, `invite`, `createLink`, `delete`. | > | `driveId` | Yes | Drive id. | > | `itemId` | Yes | DriveItem id. | > | `permId` | For get/delete | Permission id. | > | `body` | For invite/createLink | `invite` → `{ recipients, roles, requireSignIn, sendInvitation }`; `createLink` → `{ type, scope }`. | > > ### workbook > > Read & write the cells of an Excel `.xlsx` file natively via the Microsoft Graph Excel API: no download, no OCR. > > ```json theme={null} > { > "name": "workbook", > "arguments": { > "action": "usedRange", > "driveId": "b!xyz...", > "itemId": "01ABCDEF...", > "worksheetId": "Sheet1" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | One of `listWorksheets`, `usedRange`, `getRange`, `listTables`, `listTableRows`, `updateRange`, `addTableRow`, `addWorksheet`, `createTable`, `executeFunction`. | > | `driveId` | Yes | Drive id containing the `.xlsx` file. | > | `itemId` | Yes | DriveItem id of the `.xlsx` file. | > | `worksheetId` | For usedRange/getRange/updateRange | Worksheet id or name. | > | `address` | For getRange/updateRange | A1 range address, e.g. `"A1:D50"` or `"Sheet1!A1:D50"`. | > | `tableId` | For listTableRows/addTableRow | Table id or name. | > | `functionName` | For executeFunction | Excel function name, e.g. `"vlookup"`, `"sum"`, `"today"`. | > | `top` / `select` | No | Query options (`listTableRows` `top`, OData `$select`). | > | `body` | For write actions | `{ values: [[...], [...]] }` (updateRange / addTableRow), `{ name }` (addWorksheet), `{ address, hasHeaders }` (createTable), or the function's named arguments (executeFunction, e.g. `{ values: [[...]] }`). | > > `addWorksheet`, `createTable` and `executeFunction` evaluate / mutate the workbook server-side. `executeFunction` returns `{ value }`, the evaluated result of the Excel function. > > ### documents > > Read the content of a Word `.docx` file natively: the file is downloaded and its OOXML parsed in-process (no external extraction service, no OCR). > > ```json theme={null} > { > "name": "documents", > "arguments": { > "action": "getText", > "driveId": "b!xyz...", > "itemId": "01ABCDEF..." > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | `getText`: full plain text (paragraphs + table cells), capped \~200 KB, best for RAG / reading; or `getStructure`: the element tree (paragraphs with style/runs/formatting, tables with rows/cols/headers/cells) plus metadata and the full text. | > | `driveId` | Yes | Drive id containing the `.docx` file. | > | `itemId` | Yes | DriveItem id of the `.docx` file. | > | `includeContent` | No (getStructure only) | Include per-element text/runs (default `true`). Ignored by `getText`. | > | `maxContentLength` | No (getStructure only) | Max characters of text per element (`0` = no per-element cap). | > [tab] Workspace builder (DSUL) > > ## Workspace builder > > **Goal:** install the connector in a workspace, configure authentication and the agent allowlist, and call SharePoint operations from your automations. > > ## Installation > > 1. Go to **Apps** in your workspace > 2. Search for **SharePoint** and install it > 3. Open the **Configuration app** (the link auto-populated on install) to choose the auth mode, provide credentials, connect, and allow the agents that may call the connector > > ## Configuration > > | Field | Description | > | - | - | > | **Configuration app** | Auto-populated on install; open this link to configure authentication (mode + credentials), connect a Microsoft account (OAuth modes), and manage the authorized-agents allowlist. | > | **Microsoft Graph API version** | `v1.0` (default) or `beta`. | > > The configuration app drives everything; the app instance itself has no per-field credential form. From it you pick one of: > > | Auth mode | What you provide | Best for | > | - | - | - | > | `oauthCentral` | Nothing; just click **Connect** | Workspaces on a platform where the admin set up the central client | > | `oauth` | Your own Entra **Application (client) ID + Secret** (+ tenant; redirect URI `/workspaces//webhooks/.oauthCallback`) | You manage your own Microsoft Entra OAuth app | > | `clientCredentials` | Entra **client ID + secret + tenant** with admin-consented **application** Graph permissions | Server-to-server / back-office, content indexing, no interactive sign-in | > | `accessToken` | A pre-minted Microsoft Graph **access token** | Short-lived / caller-managed tokens | > > > [!WARNING] > > > > Microsoft Entra rejects a colon in the redirect URI path, so for the `oauth` mode use your workspace's **raw id** (``) in the redirect URI, not the `slug:` form. The configuration app shows the exact URI to register. > > > [!NOTE] > > > > Credentials are provisioned into the workspace's Secrets by the `onInstall` flow and resolved server-side. The agent allowlist (**Authorized agents**) gates which Agent Creator agents may call the MCP endpoint; see the *Agent builder* tab. > > ## Available Instructions > > Every instruction resolves credentials from the workspace configuration. Operations are grouped by SharePoint resource; the MCP server exposes the same operations behind the nine entity tools (see the *Agent builder* tab). Site ids use the `hostname,siteCollectionId,siteId` format. > > ### Sites > > | Instruction | Description | Returns | > | - | - | - | > | `searchSites` | Search sites across the tenant; `search` = keyword (`*` for all). | `{ value: [{ id, name, webUrl, displayName }] }` | > | `getSite` | Get a site by `siteId`. | A site resource `{ id, displayName, webUrl, … }`. | > | `getRootSite` | Get the tenant root site. | A site resource. | > | `listSubsites` | List subsites of `siteId`. | `{ value: [ site ] }` | > > ### Drives > > | Instruction | Description | Returns | > | - | - | - | > | `listSiteDrives` | List the document libraries of a `siteId`. | `{ value: [{ id, name, driveType, webUrl }] }` | > | `getSiteDefaultDrive` | Get the default document library of a `siteId`. | A drive resource. | > | `getDrive` | Get a drive by `driveId`. | A drive resource `{ id, name, quota, … }`. | > | `getMyDrive` | Get the signed-in user's OneDrive (OAuth modes). | A drive resource. | > | `listMyDrives` | List the signed-in user's drives (OAuth modes). | `{ value: [ drive ] }` | > > ### Items (files & folders) > > | Instruction | Description | Returns | > | - | - | - | > | `listChildren` | List children of a folder (`driveId`, `itemId`). | `{ value: [ driveItem ], "@odata.nextLink" }`; each item carries `@microsoft.graph.downloadUrl`. | > | `listRootChildren` | List children of the drive root (`driveId`). | `{ value: [ driveItem ] }` | > | `getItem` | Get a driveItem (`driveId`, `itemId`). | A driveItem `{ id, name, size, file, folder, "@microsoft.graph.downloadUrl" }`. | > | `createFolder` | Create a folder under `parentItemId`; `body` = `{ name, folder: {}, "@microsoft.graph.conflictBehavior" }`. | The created driveItem. | > | `updateItem` | Rename/move an item (`itemId`); `body` = changed fields / `parentReference`. | The updated driveItem. | > | `deleteItem` | Recycle an item (`driveId`, `itemId`). | Empty (HTTP 204). | > | `copyItem` | Copy an item asynchronously; `body` = `{ parentReference, name }`. | Empty (HTTP 202 Accepted, `Location` monitor URL). | > | `getThumbnails` | List thumbnails for an item. | `{ value: [{ id, small, medium, large }] }` | > | `listItemVersions` | List versions of an item. | `{ value: [{ id, lastModifiedDateTime, size }] }` | > > ### Lists > > | Instruction | Description | Returns | > | - | - | - | > | `listSiteLists` | List the lists of a `siteId`. | `{ value: [{ id, displayName, list }] }` | > | `getList` | Get a list (`siteId`, `listId`). | A list resource. | > | `listListItems` | List items of a list; use `expand=fields` for column values. | `{ value: [ listItem ] }` | > | `getListItem` | Get a list item (`siteId`, `listId`, `itemId`). | A listItem resource `{ id, fields }`. | > | `createListItem` | Create a list item; `body` = `{ fields: { : } }`. | The created listItem. | > | `updateListItemFields` | Update column values; `body` = `{ : }`. | The updated fields. | > | `deleteListItem` | Delete a list item. | Empty (HTTP 204). | > > ### Search & permissions > > | Instruction | Description | Returns | > | - | - | - | > | `searchQuery` | Microsoft Search; `body` = `{ requests: [{ entityTypes, query: { queryString }, from, size }] }`. | `{ value: [{ hitsContainers: [{ hits: [...] }] }] }` | > | `listPermissions` | List permission grants on an item. | `{ value: [{ id, roles, grantedToV2, link }] }` | > | `getPermission` | Get a single permission by `permId`. | A permission resource. | > | `invite` | Grant access; `body` = `{ recipients, roles, requireSignIn, sendInvitation }`. | `{ value: [ permission ] }` | > | `createLink` | Create a sharing link; `body` = `{ type, scope }`. | A permission with `{ link: { webUrl } }`. | > | `deletePermission` | Remove a permission by `permId`. | Empty (HTTP 204). | > > ### Directory > > | Instruction | Description | Returns | > | - | - | - | > | `getUser` | Get a user by id or UPN/email. | A user resource `{ id, displayName, mail }`. | > | `listUserMemberOf` | List groups/roles a user belongs to. | `{ value: [ group ] }` | > | `checkUserMemberGroups` | Check which of given group ids a user is in; `body` = `{ groupIds: [] }`. | `{ value: [ ] }` | > | `getGroup` | Get a group by id. | A group resource. | > | `listGroupMembers` | List members of a group. | `{ value: [ user ] }` | > > ### Excel workbooks & Word documents (native content) > > Reading and writing file **content** natively is exposed on the **MCP surface** as the `workbook` and `documents` entity tools (see the *Agent builder* tab), not as separate Builder instructions, since they are routed internally. From an agent you call them by `action`: > > | Tool | Actions | Purpose | > | - | - | - | > | `workbook` (Excel `.xlsx`) | `listWorksheets`, `usedRange`, `getRange`, `listTables`, `listTableRows`, `updateRange`, `addTableRow`, `addWorksheet`, `createTable`, `executeFunction` | Read/write cell values natively via the Microsoft Graph Excel API: no download, no OCR. `addWorksheet`/`createTable` mutate the workbook; `executeFunction` evaluates an Excel function (`functionName` + named args) and returns `{ value }`. | > | `documents` (Word `.docx`) | `getText`, `getStructure` | Read document content natively (OOXML parsed in-process). `getText` returns the full plain text (capped \~200 KB); `getStructure` returns the paragraph/table element tree plus metadata. | > > > [!NOTE] > > > > `Returns` shows the shape of the operation output (the underlying Microsoft Graph resource). To download a file, read the `@microsoft.graph.downloadUrl` returned by `getItem` / `listChildren` (a \~1h pre-signed link); content is not returned inline. > > ## DSUL Examples > > **Find a site and list its document libraries:** > > ```yaml theme={null} > - Sharepoint.searchSites: > search: 'Marketing' > top: 5 > output: sites > - Sharepoint.listSiteDrives: > siteId: '{{sites.value[0].id}}' > output: drives > ``` > > **List files at a drive root:** > > ```yaml theme={null} > - Sharepoint.listRootChildren: > driveId: '{{drives.value[0].id}}' > top: 50 > orderby: lastModifiedDateTime desc > output: items > ``` > > **Create a folder:** > > ```yaml theme={null} > - Sharepoint.createFolder: > driveId: '{{drives.value[0].id}}' > parentItemId: root > body: > name: 'Reports 2026' > folder: {} > '@microsoft.graph.conflictBehavior': rename > output: folder > ``` > > **Run a Microsoft Search across document libraries:** > > ```yaml theme={null} > - Sharepoint.searchQuery: > body: > requests: > - entityTypes: > - driveItem > query: > queryString: 'quarterly report' > from: 0 > size: 25 > output: results > ``` > > **Create a SharePoint list item:** > > ```yaml theme={null} > - Sharepoint.createListItem: > siteId: '{{sites.value[0].id}}' > listId: '{{listId}}' > body: > fields: > Title: 'New entry' > Status: 'Open' > output: created > ``` > [tab] Knowledge base (sync) > > ## Knowledge base > > **Goal:** index SharePoint documents into a knowledge base so an agent can search their **content**, and keep that base up to date. > > > [!NOTE] > > > > Before a base can be attached, a *Workspace builder* must have installed and configured the SharePoint app in a workspace and connected an account (see the *Workspace builder* tab). Nothing else is needed: the same app instance serves both the agent tools and the sync surface. The **Authorized agents** allowlist does **not** apply here — it gates the connector as an agent *tool*, and has no effect on synchronization. > > ## What can be synced > > **Document libraries** and the files inside them. SharePoint **pages and lists are not synced**: they are agent tools, not indexable resources. > > ## How it fits together > > ```mermaid theme={null} > flowchart LR > SP["SharePoint
Microsoft Graph"] > Conn["SharePoint connector
MCP resources"] > Sync["Knowledge Sync
browse · diff · index"] > KB["Knowledge base
vector store"] > Agent["Agent"] > > Sync -->|"resources/list · resources/read"| Conn > Conn -->|"Graph API"| SP > Sync -->|"documents"| KB > Agent -->|"search"| KB > Agent -.->|"per-reader access check"| Sync > ``` > > The resource tree is three levels deep — a **site**, its **document libraries**, then any **item** inside them — and any container can be picked as a sync root: > > ```text theme={null} > sharepoint://site/{siteId} > sharepoint://site/{siteId}/drive/{driveId} > sharepoint://site/{siteId}/drive/{driveId}/item/{itemId} > ``` > > ## Attach the connector to a base > > **1. Copy the MCP endpoint** > > Open the connector's **Configuration app** in the workspace where it is installed; it displays and copies that workspace's MCP endpoint: > > ```text theme={null} > /workspaces//webhooks/.mcp > ``` > > **2. Create the connection in Knowledges** > > Go to **Knowledges → Connectors → New Connection → Your own MCP server**, paste the endpoint and click **Check**. > > **3. Browse to the folder you want** > > Pick a site, then a document library, then descend into folders and confirm with **Use this location**. Everything below the selected root is synced, nested folders included. > > **4. Pick the destination and sync** > > Choose an existing knowledge base or create one from the same step, then click **Sync Now**. Large libraries are spread over several runs; the schedule (*Hourly* to *Daily*, under **Auto-sync**) finishes the job. > > The full wizard, the run history and the connection settings are documented once for every provider in [Knowledges → Connectors](/products/ai-knowledge/connectors). This tab covers only what is specific to SharePoint. > > > [!NOTE] > > > > SharePoint is normally also published as a **catalog connector**, which appears under **Available Providers** and asks each person to sign in with their own Microsoft account. Attaching this connector's own endpoint instead is what lets a base be fed by an **application identity** (`clientCredentials` mode) rather than by a person — the credential then belongs to the workspace, and no reader ever signs in for the sync. > > ## Who may sync, and who may read > > | Moment | Acts as | Authorized by | > | - | - | - | > | Attaching the connection, browsing the tree | You | Your **role on the workspace** holding the connector's configuration — the right to read that workspace is the right to read this SharePoint through it | > | A scheduled sync run | No user at all | The calling workspace must be listed in `knowledgeSync.trustedCallers`; the Knowledge Sync workspace ships there by default | > | Answering a reader's question | The reader | A live per-reader access check (`items` / `checkAccess`) against Microsoft Graph | > > > [!NOTE] > > > > **Per-user access control is supported and worth keeping on.** The connector declares an access tool, so each reader's own rights are re-checked in SharePoint at query time: a file you lost access to stops appearing in answers without waiting for the next sync. Turning it off serves every synced document to anyone who can query the agent, whatever their SharePoint rights. Note that a connection backed by `clientCredentials` feeds the base with the **application's** reach — narrow it at the source (sites-selected permissions) rather than counting on the selection made in the wizard. > > ## What gets indexed > > | Aspect | Behavior | > | - | - | > | Document unit | One **driveItem** (a file) = one document. Sites, libraries and folders are containers, never indexed themselves. | > | Content | Graph hands out a short-lived **pre-signed download URL**, so the bytes are fetched out of band — the format-aware path. Small text-like files (≤ 1 MB) are inlined directly instead, capped at 200 000 characters. | > | Revision marker | `cTag`, falling back to `eTag`. Unchanged files are never re-read and never re-indexed. | > | Identity | The **item id**. Renaming or moving a file inside the synced root therefore does *not* re-index it. | > | Deletions | Each run is a **full traversal**: a file absent from a complete listing is removed from the base. A listing that failed halfway deletes nothing. | > > > [!NOTE] > > > > **The Knowledge profile this connector declares** — the descriptor Knowledges probes at `sharepoint://profile/knowledge`: > > > > | Field | Value | > > | - | - | > > | `provider` | `sharepoint-next` | > > | `hierarchy` | `site` › `drive` › `item` | > > | `canonical_uri` | `sharepoint://site/{siteId}/drive/{driveId}/item/{itemId}` | > > | `revision` | `cTag`, fallback `eTag` | > > | `read` | Pre-signed download URL for binaries; inline text ≤ 1 MB, 200 000 characters | > > | `list` | 50 resources per page by default, 200 max; `delta_on_drive: false` | > > | `access` | Tool `items`, action `checkAccess` | > > | `authentication` | `oauth`, `oauthCentral`, `clientCredentials`, `accessToken` | > > ## Troubleshooting the sync > > **The URL check says "You are not allowed to read it"**: you have no role on the workspace holding the connector's configuration. Ask its administrator for one — this is not about your SharePoint rights. > > **The URL check says "It answered, but could not serve its content"**: the connector itself is not fully configured. Open its configuration app and connect an account. > > **A site does not appear when browsing**: a site created moments ago is not searchable yet — `/sites?search=` is served by the SharePoint search index, which takes minutes to hours. It is reachable by path in the meantime. > > **A whole library syncs slowly**: that is expected — runs are bounded and the schedule finishes the job. Prefer selecting a folder, or several narrow connections, over one library-wide root. > > **A file is in the library but not in the base**: check its format is one the platform indexes, and that it is under the selected root. A file whose download failed is reported in the connection's synchronization errors rather than half-indexed. > > **A scheduled sync keeps running after a right was revoked**: the role check runs on the interactive paths only. A scheduled run is authorized as the platform's synchronization workspace — delete the connection to stop it for certain. *** ## Security The answers that hold for every connector (agent access, shared knowledge bases, credentials, models, egress) are on [Connector security](/apps-store/marketplace/connectors/security). This section lists what is specific to SharePoint. | Topic | SharePoint | | - | - | | Authentication family | Delegated OAuth (Microsoft Entra, authorization code with PKCE): each user connects their own Microsoft 365 account. An app-only mode (`clientCredentials`) also exists. | | Production modes | `oauthCentral` or `oauth` | | Modes to avoid in production | `accessToken` (testing only, and a Graph access token expires after about an hour). `clientCredentials` acts as the application, not as the user: avoid it when per-user permissions are required. | | Read-only scopes | `offline_access`, `User.Read`, `Sites.Read.All`, `Files.Read.All` (the **Read-only preset** of the configuration app). These are the default with your own Microsoft Entra app; the platform's central client requests `Sites.ReadWrite.All` and `Files.ReadWrite.All` by default. | | Site perimeter | Optional list of authorized sites, from the **Authorized sites** tab. Calls outside the list are refused before they reach Microsoft Graph. Pairs with the `Sites.Selected` application permission. | | Agent allowlist | Yes, on the tenant endpoint (empty at installation). The global endpoint accepts every agent. | | Per-reader access control on knowledge bases | Yes: each file is checked against the reader's own Microsoft 365 connection, even when the base is synchronized in `clientCredentials` mode. | | Outbound hosts | `graph.microsoft.com`, `login.microsoftonline.com`, and your tenant's SharePoint hosts (for example `contoso.sharepoint.com`, and `contoso-my.sharepoint.com` for OneDrive files): when a user approves an attachment, the platform fetches the file server-side from its pre-signed download link. | | Audit events | None specific to this connector | With the read-only scopes, Microsoft refuses every folder creation, rename, move, copy, delete, sharing link, list item change and Excel cell write. `Sites.Read.All` and `Files.Read.All` still reach every site and file the user can open: no scope limits them to chosen sites. To do that, declare the authorized sites (see [Restricting the connector to chosen sites](#restricting-the-connector-to-chosen-sites-sites-selected)). In `clientCredentials` mode, the application permissions apply to every site of the tenant, whoever calls the agent. *** ## Error Handling | HTTP code | Meaning | | - | - | | `400` | Bad request: invalid parameters or malformed body (e.g. bad OData filter, invalid driveItem/list resource). | | `401` | Unauthorized: the Microsoft Graph access token is missing, expired or revoked. The user must reconnect (OAuth modes). | | `403` | Forbidden: insufficient Graph scope/permission, missing admin consent (application mode), or the account lacks access to the site/drive/item. | | `404` | Not found: the site, drive, item, list or permission id does not exist or is not visible to the account. | | `429` | Throttled: Microsoft Graph rate limit; back off and retry (honor `Retry-After`). | | `500` / `503` | Microsoft Graph service error: transient; retry shortly, no reconnection needed. | ### Common Issues **"This agent is not authorized to use this connector"**: The calling agent is not in the allowlist. Open the configuration app → **Authorized agents** → tick this agent (or enable **Allow all agents**) and Save. **"The calling agent could not be identified"**: The MCP capability *Scope* does not declare `agent_id`, so Agent Creator never injects the agent identity. Set the Scope to `context_id,agent_id,user_id` on the capability, then allow the agent in the config app. **"Microsoft Graph is not connected for this user"**: No per-user OAuth token. Open the configuration app (OAuth mode) and click **Connect**, or use the agent's connect flow. **"Microsoft Graph token refresh failed … must reconnect"**: The stored refresh token was revoked or expired (Microsoft Entra invalidated it, or it aged past its limit). The connection is dropped automatically; the user must reconnect from the config app. **"Microsoft Graph not authenticated" / "OAuth is not configured"**: Neither a tenant OAuth client nor the central platform client is available. Set the client ID/secret/tenant in the config app, or ask the platform maintainer to provision the central Entra OAuth client. **`client_credentials` exchange failed**: In application mode, check the Application (client) ID / secret, the tenant id, and that a Global Administrator granted **admin consent** for the application Graph permissions. **"Site not found"**: The site id format is `hostname,siteCollectionId,siteId`. Use `sites` `search` (or Graph Explorer) to find the correct id. **Microsoft Entra redirect URI rejected**: Entra rejects a colon in the redirect URI path. Register the redirect URI with the workspace's **raw id**, not the `slug:` form: `/workspaces//webhooks/oauthCallback` for the platform client, `/workspaces//webhooks/.oauthCallback` for your own Entra app. Copy the exact value from the config app. ## External Resources > [card] [Microsoft Graph API](https://learn.microsoft.com/en-us/graph/api/resources/sharepoint) > > Official reference for the SharePoint sites, drives, files, lists and permissions REST APIs. > [card] [Tool Agents](/products/agent-factory/capabilities) > > Learn how Agent Creator agents consume MCP tools in Prisme.ai. # SharePoint (legacy) Source: https://docs.prisme.ai/apps-store/marketplace/connectors/sharepoint-legacy Browse and download files from SharePoint document libraries > [!NOTE] > > This is the **legacy SharePoint connector**, superseded by the new **[SharePoint](/apps-store/marketplace/connectors/sharepoint)** connector (App+MCP, tenant-context, per-user Microsoft Entra OAuth). Use the new SharePoint connector for new work; it adds sites/drives/items/search/permissions/lists/directory tools, central or tenant OAuth, and per-agent authorization. This page is kept for reference only. ![SharePoint](https://mintcdn.com/prismeai/107CJC0iC0TOqNad/images/connectors/sharepoint.svg?fit=max\&auto=format\&n=107CJC0iC0TOqNad\&q=85\&s=b958760e9a8b5b4507660e1db1f8a6e1) The SharePoint connector provides access to Microsoft SharePoint Online document libraries via the Microsoft Graph API, enabling AI agents and automations to browse folders, list files, and download content. > [card] Browse Structure > > List sites, drives, and folder hierarchies > [card] File Access > > Download files with metadata for change detection > [card] Access Control > > Per-user permission validation (PBAV) for secure access ## Prerequisites * An **Azure AD Application** registered in your tenant * **Application permissions** granted: * `Sites.Read.All` - Read sites and files * `Files.Read.All` - Read file content * `GroupMember.Read.All` - For PBAV group membership checks (optional) * **Admin consent** granted for these permissions > [!NOTE] > > For Knowledges document sync with per-user access control, see the dedicated [SharePoint Connector for Knowledges](/products/ai-knowledge/connectors) documentation. *** > [tab] Usage as App > > ## Usage as App > > ## Installation > > 1. Go to **Apps** in your workspace > 2. Search for **Sharepoint** and install it > 3. Configure the app instance with your Azure AD credentials > > ## Configuration > > | Field | Value | > | - | - | > | **Client ID** | Application (client) ID from Azure AD | > | **Client Secret** | Client secret value | > | **Tenant ID** | Directory (tenant) ID | > | **Site URL** | Optional, default SharePoint site URL | > | **Site ID** | Optional, default SharePoint site ID | > > ## Available Automations > > ### Site Operations > > | Automation | Description | > | - | - | > | `listSites` | List SharePoint sites accessible to the app | > > ### Drive Operations > > | Automation | Description | > | - | - | > | `listDrives` | List document libraries in a site | > > ### File & Folder Operations > > | Automation | Description | > | - | - | > | `listChildren` | List items in a folder or drive root | > | `getItem` | Get item metadata by ID | > | `getFiles` | List files with metadata | > | `getFileTree` | Get recursive folder structure | > | `downloadFile` | Download file content | > > ### Authentication > > | Automation | Description | > | - | - | > | `ensureAccessToken` | Get or refresh access token | > | `getAccessToken` | Get a new access token | > > ## DSUL Examples > > ### List Sites > > ```yaml theme={null} > - Sharepoint.listSites: > output: sites > ``` > > ### List Document Libraries > > ```yaml theme={null} > - Sharepoint.listDrives: > siteId: "contoso.sharepoint.com,abc-123,def-456" > output: drives > ``` > > ### List Files in a Folder > > ```yaml theme={null} > - Sharepoint.listChildren: > siteId: "contoso.sharepoint.com,abc-123,def-456" > driveId: "b!xyz..." > itemId: "01ABCDEF..." > output: items > ``` > > ### Download a File > > ```yaml theme={null} > - Sharepoint.downloadFile: > siteId: "contoso.sharepoint.com,abc-123,def-456" > driveId: "b!xyz..." > itemId: "01ABCDEF..." > output: fileContent > ``` > > ### Get Folder Tree > > ```yaml theme={null} > - Sharepoint.getFileTree: > siteId: "contoso.sharepoint.com,abc-123,def-456" > driveId: "b!xyz..." > output: tree > ``` > [tab] Usage as MCP > > ## Usage as MCP > > ## MCP Setup > > 1. Open your **Knowledges project** > 2. Go to **Advanced > Tools** > 3. Click **Add** and select the **MCP** tab > 4. Enter the MCP endpoint URL > 5. In the **Headers** field, add your credentials > > ## Authentication > > The MCP server supports both service-to-service and delegated authentication: > > ### Service Account (Client Credentials) > > Configure workspace secrets: > > | Secret | Description | > | - | - | > | `azureClientId` | Azure AD client ID | > | `azureClientSecret` | Azure AD client secret | > | `azureTenant` | Azure AD tenant ID | > | `azureSiteId` | Optional default SharePoint site ID | > > ### Delegated Auth (OAuth) > > For per-user access with PBAV (Permission-Based Access Validation), users connect their Microsoft account via OAuth. This enables: > > * Per-user file access validation > * Respecting SharePoint permissions at query time > * Secure document access in multi-tenant environments > > ## Available Tools > > | Tool | Description | > | - | - | > | `configureSharePoint` | Configure credentials for service-to-service auth | > | `listSharePointFolders` | List folders and document libraries | > | `listSharePointFiles` | List files with metadata for RAG indexing | > | `downloadSharePointFile` | Download file content | > > ## Tool Details > > ### configureSharePoint > > Configure SharePoint credentials for Client Credentials Flow. > > ```json theme={null} > { > "name": "configureSharePoint", > "arguments": { > "clientId": "your-azure-client-id", > "clientSecret": "your-client-secret", > "tenant": "your-tenant-id" > } > } > ``` > > ### listSharePointFolders > > List folders and document libraries with metadata for change detection. Supports pagination. > > ```json theme={null} > { > "name": "listSharePointFolders", > "arguments": { > "siteId": "contoso.sharepoint.com,abc-123,def-456", > "driveId": "b!xyz...", > "folderId": "01ABCDEF..." > } > } > ``` > > | Parameter | Description | > | - | - | > | `siteId` | SharePoint site ID (optional if default configured) | > | `driveId` | Document library ID (omit to list all drives) | > | `folderId` | Folder item ID (omit for root) | > | `pageToken` | Pagination token from previous response | > > ### listSharePointFiles > > List files with full metadata for RAG indexing. Returns `eTag`, `cTag`, `contentHash` for change detection. > > ```json theme={null} > { > "name": "listSharePointFiles", > "arguments": { > "siteId": "contoso.sharepoint.com,abc-123,def-456", > "driveId": "b!xyz...", > "includeDownloadUrl": true > } > } > ``` > > | Parameter | Description | > | - | - | > | `siteId` | SharePoint site ID (optional if default configured) | > | `driveId` | Document library ID (required unless using pageToken) | > | `folderId` | Folder item ID (omit for drive root) | > | `includeDownloadUrl` | Include pre-signed download URLs (default: false) | > | `pageToken` | Pagination token from previous response | > > ### downloadSharePointFile > > Download file content as text or base64-encoded binary. > > ```json theme={null} > { > "name": "downloadSharePointFile", > "arguments": { > "siteId": "contoso.sharepoint.com,abc-123,def-456", > "driveId": "b!xyz...", > "fileId": "01ABCDEF..." > } > } > ``` > > ## Output Formats > > All tools support an `outputFormat` parameter: > > * **`verbose`** (default) - Human-readable text for LLM consumption > * **`structured`** - Machine-readable JSON in `structuredContent` > * **`both`** - Both text and structured content > > ## Permission-Based Access Validation (PBAV) > > When using delegated OAuth, PBAV ensures that RAG query results respect each user's SharePoint permissions: > > 1. User submits a query to the Knowledges agent > 2. RAG retrieves relevant document chunks > 3. For each SharePoint chunk, the system validates user access via their OAuth token > 4. Chunks from inaccessible files are filtered out before the LLM responds > > See [SharePoint Connector for Knowledges](/products/ai-knowledge/connectors) for detailed PBAV documentation. *** ## Error Handling | HTTP Status | Error | Solution | | - | - | - | | 401 | Unauthorized | Verify Azure AD credentials | | 403 | Forbidden | Check app permissions or user access | | 404 | Not Found | Verify site/drive/item IDs exist | | 429 | Rate Limited | Wait and retry | ### Common Issues **"Site not found"** - The site ID format is `hostname,siteCollectionId,siteId`. Use Graph Explorer to find the correct format. **"Access denied"** - The Azure AD app needs `Sites.Read.All` permission with admin consent. **"Token expired"** - OAuth tokens expire after 1 hour. Use `ensureAccessToken` to refresh. ## External Resources > [card] [Microsoft Graph Files API](https://learn.microsoft.com/en-us/graph/api/resources/driveitem) > > Official API documentation > [card] [SharePoint Sites API](https://learn.microsoft.com/en-us/graph/api/resources/site) > > Site operations reference > [card] [Graph Explorer](https://developer.microsoft.com/en-us/graph/graph-explorer) > > Test API calls interactively > [card] [Knowledges SharePoint Connector](/products/ai-knowledge/connectors) > > Document sync and PBAV for Knowledges # Snowflake Source: https://docs.prisme.ai/apps-store/marketplace/connectors/snowflake Run SQL and manage Snowflake databases, schemas and virtual warehouses from Agent Creator agents and Builder workflows ![Snowflake](https://mintcdn.com/prismeai/oaK4fkwjVLsG7LId/images/connectors/snowflake.png?fit=max\&auto=format\&n=oaK4fkwjVLsG7LId\&q=85\&s=ad9a12bfc486dbc6790d0938b189be46) The Snowflake app exposes the Snowflake SQL API and selected Snowflake REST APIs to **Agent Creator** agents through MCP and to Builder workflows through DSUL instructions. It runs in the installing workspace's tenant context and covers SQL execution, asynchronous results, databases, schemas and virtual warehouses. Authentication supports platform-managed or tenant-owned Snowflake OAuth with PKCE, key-pair JWT, programmatic access tokens and pre-minted access tokens. > [card] SQL and results > > Execute one SQL statement, monitor or cancel asynchronous work, and retrieve paginated results > [card] Database catalog > > List, inspect, create, alter, drop and undrop Snowflake databases and schemas > [card] Virtual warehouses > > Inspect and manage warehouses, including explicit resume and suspend operations ## Who is this for? This connector is used by three different roles. Jump to the section that matches yours, each one is self-contained. > [card] Agent builder > > You build agents in **Agent Creator** and want them to query or administer Snowflake. → *Agent builder* tab. > [card] Platform admin > > You configure a shared Snowflake OAuth client and publish the capability. → *Platform admin setup* accordion below. > [card] Workspace builder > > You write Builder automations that call Snowflake operations directly. → *Workspace builder* tab. ## Prerequisites (Snowflake side) * A **Snowflake account** and its public HTTPS account URL, for example `https://myorg-myaccount.snowflakecomputing.com`. * A Snowflake user or OAuth integration whose role has the privileges required by the operations you intend to expose. Use a dedicated least-privilege role rather than an account-admin role. * One supported credential: * A [Snowflake OAuth custom-client integration](https://docs.snowflake.com/en/user-guide/oauth-custom) with refresh tokens and PKCE. * A [key pair](https://docs.snowflake.com/en/user-guide/key-pair-auth) assigned to the Snowflake user. * A [programmatic access token](https://docs.snowflake.com/en/user-guide/programmatic-access-tokens). * A valid pre-minted OAuth or External OAuth access token. * A virtual warehouse for SQL that needs compute. Database and schema metadata operations may not require an active warehouse. > [accordion] Platform admin (Governance), one-time platform setup > > **Goal:** configure a shared OAuth client for one Snowflake account, then expose the connector as a reusable capability in AI Governance. > > ## 1. Configure the connector > > **1. Create a dedicated Snowflake role** > > Create a role containing only the database, schema, warehouse and SQL privileges that agents need. Grant it to the users who will authorize the connector. Snowflake OAuth does not allow the connector to exceed the selected role's privileges. > > **2. Create a Snowflake OAuth security integration** > > In the target Snowflake account, create a confidential custom-client integration. Use the core workspace callback as its redirect URI: > > ```text theme={null} > /workspaces/slug:snowflake/webhooks/oauthCallback > ``` > > On production, `` is `https://api.studio.prisme.ai/v2`. > > ```sql theme={null} > CREATE SECURITY INTEGRATION PRISME_SNOWFLAKE_OAUTH > TYPE = OAUTH > ENABLED = TRUE > OAUTH_CLIENT = CUSTOM > OAUTH_CLIENT_TYPE = CONFIDENTIAL > OAUTH_REDIRECT_URI = '/workspaces/slug:snowflake/webhooks/oauthCallback' > OAUTH_ISSUE_REFRESH_TOKENS = TRUE > OAUTH_ENFORCE_PKCE = TRUE > ALLOWED_ROLES_LIST = ('PRISME_AGENT_ROLE'); > ``` > > **3. Retrieve the OAuth client credentials** > > Run the following command with a role allowed to inspect the integration. Keep the returned secret in a secrets manager. > > ```sql theme={null} > SELECT SYSTEM$SHOW_OAUTH_CLIENT_SECRETS('PRISME_SNOWFLAKE_OAUTH'); > ``` > > The result contains `oauth_client_id` and two rotatable client secrets. > > **4. Enter the credentials through the configuration app** > > Open the central `snowflake` workspace and launch its **Configuration app** at `/apps/snowflake` (for example `https://studio.prisme.ai/apps/snowflake`). Enter the Snowflake account URL, client ID, client secret, default role and optional warehouse. The app writes the central secret; do not edit Studio Secrets manually. > > **5. Tell workspaces to use the central client** > > Each consuming workspace selects `oauthCentral` in its connector configuration. The central client is tied to the Snowflake account configured above; another account must use tenant-owned OAuth or a non-OAuth credential. > > ## 2. Declare the capability in AI Governance > > **1. Create the Snowflake capability** > > Open **AI Governance > Capabilities** and create a capability named **Snowflake**. > > **2. Point it at the MCP endpoint** > > Set the MCP server URL to the connector's **MCP Endpoint** and set **Scope** to: > > ```text theme={null} > context_id,agent_id,user_id > ``` > > `agent_id` lets the connector identify and authorize the calling agent. `user_id` keeps delegated OAuth sessions user-specific. > > **3. Make it available to agent builders** > > Publish the capability in the catalog. Catalog visibility follows the organization's existing RBAC; tenant-context capabilities do not require a separate per-capability role grant. > > **4. Smoke-test** > > Enable the capability on an agent, authorize that agent in the connector configuration app, connect a Snowflake user and run a read-only query such as `SELECT CURRENT_USER(), CURRENT_ROLE()`. > > > [!WARNING] > > > > Declaring the capability makes Snowflake available; it does not authorize an agent. Each installed connector instance still applies its **Authorized agents** allowlist. There is no OAuth auth-config JSON to attach in Governance. *** > [tab] Agent builder (Agent Creator) > > ## Agent builder > > **Goal:** let an Agent Creator agent query and manage Snowflake through five MCP tools. > > > [!NOTE] > > > > A *Workspace builder* must first install and configure the Snowflake app. Platform-managed OAuth additionally requires the one-time setup in the *Platform admin* accordion. > > The MCP endpoint runs in the installed app instance. It resolves credentials server-side, identifies the caller from the capability scope and checks the workspace's agent allowlist. > > ## Option A, Enable the shared capability from the catalog > > **1. Open your agent** > > Open the agent in Agent Creator and go to its capabilities. > > **2. Enable Snowflake** > > Select **Snowflake** from the capability catalog. The endpoint and `context_id,agent_id,user_id` scope are already configured. > > **3. Connect to Snowflake** > > With OAuth, connect on the first tool call or from the connector configuration app. Key-pair, programmatic-token and access-token modes do not need an interactive sign-in. > > > [!NOTE] > > > > The shared capability uses credentials and an allowlist managed by the platform workspace. Use a workspace-owned instance when the agent needs an isolated Snowflake account, role or credential boundary. > > ## Option B, Run it from your own workspace (recommended) > > > [!WARNING] > > > > Prefer a workspace-owned instance for production. Its credentials, OAuth tokens and authorized-agent list are isolated to your workspace, and its Snowflake role can be restricted to the agent's exact duties. > > **1. Install and configure Snowflake** > > Follow the *Workspace builder* tab. Select an authentication mode and test the credential. > > **2. Allowlist the agent** > > In the configuration app, open **Authorized agents**, select the agent and save. The **Install capability** action can perform this wiring. > > **3. Add the MCP capability** > > Point the capability at this app instance's **MCP Endpoint** and set **Scope** to: > > ```text theme={null} > context_id,agent_id,user_id > ``` > > **4. Connect the user when using OAuth** > > Click **Connect** in the configuration app or follow the connection prompt surfaced by Agent Creator. > > ## Brief the agent in its system prompt > > ```text theme={null} > You have access to the Snowflake MCP tools: sql, results, databases, schemas and warehouses. > Each tool requires an `action`. Prefer read operations unless the user explicitly requests a mutation. > Before executing DML, DDL, database/schema deletion, or warehouse resume/suspend, restate the target > and obtain confirmation. Narrow SQL results with SELECT columns, WHERE, aggregation and deterministic > keyset pagination; never assume an omitted result row can be recovered from MCP output. > ``` > > > [!NOTE] > > > > **Legacy AI Knowledge agents** without the native capability picker can add an MCP tool under **Advanced > Tools > MCP** and paste the **MCP Endpoint**. The agent must still be allowlisted and its identity propagated to the connector. > > > [!NOTE] > > > > **Restricting to read-only (least privilege).** Snowflake permissions are role-based. For OAuth, set `ALLOWED_ROLES_LIST` on the security integration and configure the connector to request a dedicated read-only role. For a programmatic access token, use `ROLE_RESTRICTION`; for key-pair or access-token modes, restrict the backing user's grants. The connector remains usable for reads while Snowflake rejects writes with `403` or a SQL privilege error. This provider-side role boundary cannot be widened from the Prisme.ai workspace. > > ## Available Tools > > Each tool takes an `action` argument that selects the concrete operation. > > | Tool | Description | > | - | - | > | `sql` | Execute one SQL statement, inspect its status or cancel it. MCP responses are capped at 100 rows and 80 KB. | > | `results` | Fetch a page from an asynchronous Snowflake Resource API result by opaque `result_handler`. | > | `databases` | List, get, create, create-or-alter, undrop and delete databases. | > | `schemas` | List, get, create, create-or-alter, undrop and delete schemas within a database. | > | `warehouses` | List, get, create, create-or-alter, resume, suspend and delete virtual warehouses. | > > ## Output Formats > > Snowflake tool calls return one bounded JSON payload in MCP text content. The connector: > > * limits SQL execution to one statement; > * asks Snowflake for at most 100 rows and caps the final MCP response at 80 KB; > * omits binary cell values; > * adds `_mcpLimits` and, when truncation occurs, `_truncation` metadata with a refinement suggestion. > > The schema accepts `outputFormat` (`verbose`, `structured` or `both`) for compatibility. The current Snowflake implementation returns the same bounded JSON text envelope for all three values. > > ## Tool Details > > ### sql > > ```json theme={null} > { > "name": "sql", > "arguments": { > "action": "execute", > "statement": "SELECT REGION, SUM(REVENUE) AS TOTAL FROM ANALYTICS.SALES GROUP BY REGION ORDER BY TOTAL DESC", > "warehouse": "ANALYTICS_WH", > "role": "PRISME_AGENT_ROLE", > "async": false > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | `execute`, `status` or `cancel`. | > | `statement` | For `execute` | One SQL statement. It may be read-only or mutating. | > | `statementHandle` | For `status` / `cancel` | Handle returned by this connector's `execute` action. | > | `database`, `schema`, `warehouse`, `role` | No | Case-sensitive execution context. | > | `bindings` | No | Snowflake SQL bind values. | > | `async` | No | Return a statement handle without waiting for completion. | > | `requestId` | No | UUID used to make submission idempotent. | > | `partition` | For additional SQL partitions | Zero-based provider partition requested by `status`. It cannot recover rows omitted by the MCP response cap. | > > ### results > > ```json theme={null} > { > "name": "results", > "arguments": { > "action": "get", > "result_handler": "opaque-result-handler", > "page": 0 > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | Only `get`. | > | `result_handler` | Yes | Opaque handle returned by an asynchronous Snowflake Resource API operation. | > | `page` | No | Zero-based result page; defaults to `0`. | > > ### databases > > ```json theme={null} > { > "name": "databases", > "arguments": { > "action": "list", > "like": "ANALYTICS_%", > "showLimit": 25 > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | `list`, `get`, `create`, `createOrAlter`, `undrop` or `delete`. | > | `name` | For get/createOrAlter/undrop/delete | Case-sensitive database identifier. | > | `body` | For create/createOrAlter | Complete Snowflake Database resource definition. | > | `createMode` | No | `errorIfExists`, `orReplace` or `ifNotExists`. | > | `like`, `startsWith`, `fromName`, `showLimit`, `history` | For list | Server-side list filters and pagination controls. | > | `restrict` | For delete | Keep `true` unless cascading removal is explicitly requested. | > > ### schemas > > ```json theme={null} > { > "name": "schemas", > "arguments": { > "action": "create", > "database": "ANALYTICS", > "createMode": "ifNotExists", > "body": { > "name": "REPORTING", > "comment": "Curated reporting layer" > } > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | `list`, `get`, `create`, `createOrAlter`, `undrop` or `delete`. | > | `database` | Yes | Parent database identifier. | > | `name` | For get/createOrAlter/undrop/delete | Schema identifier. | > | `body` | For create/createOrAlter | Complete Snowflake Schema resource definition. | > | `kind` | No | `transient` or permanent (empty value). | > | `restrict` | For delete | Keep `true` unless cascading removal is explicitly requested. | > > ### warehouses > > ```json theme={null} > { > "name": "warehouses", > "arguments": { > "action": "suspend", > "name": "ANALYTICS_WH", > "ifExists": true > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | `list`, `get`, `create`, `createOrAlter`, `resume`, `suspend` or `delete`. | > | `name` | For all but list/create | Warehouse identifier. | > | `body` | For create/createOrAlter | Complete Snowflake Warehouse resource definition. | > | `createMode` | No | `errorIfExists`, `orReplace` or `ifNotExists`. | > | `ifExists` | No | Make resume, suspend or delete succeed when the warehouse is absent. | > > > [!WARNING] > > > > Resuming a warehouse starts compute billing. Suspending it can interrupt workloads. Call either action only after explicit user confirmation. > [tab] Workspace builder (DSUL) > > ## Workspace builder > > **Goal:** install Snowflake in a workspace, configure credentials and call its operations from automations. > > ## Installation > > 1. Go to **Apps** in your workspace. > 2. Search for **Snowflake** and install it. > 3. Open the auto-populated **Configuration app**, select an authentication mode, test it and configure **Authorized agents**. > > ## Configuration > > | Field | Description | > | - | - | > | **Configuration app** | Auto-populated on install. Opens authentication, connection testing and the authorized-agent allowlist. | > > | Auth mode | What you provide | Best for | > | - | - | - | > | `oauthCentral` | Connect a user; optional role and warehouse | A platform-managed OAuth client tied to the configured Snowflake account | > | `oauth` | Account URL, OAuth client ID/secret, optional role and warehouse; then Connect | A workspace-owned Snowflake OAuth integration | > | `keyPair` | Account URL and identifier, username, public-key fingerprint, PEM private key, optional passphrase, role and warehouse | Non-interactive service users with key-pair authentication | > | `programmaticAccessToken` | Account URL, programmatic access token, optional role and warehouse | Rotatable non-interactive access with Snowflake role restriction | > | `accessToken` | Account URL, pre-minted token, optional role and warehouse | Caller-managed OAuth or External OAuth tokens | > > > [!NOTE] > > > > Credentials and the allowlist are stored as workspace secrets and resolved server-side. The public account URL must be an HTTPS Snowflake account origin, not a Snowsight page URL. > > ## Available Instructions > > Every instruction resolves credentials from the workspace configuration and returns the raw Snowflake API payload. > > ### SQL and asynchronous results > > | Instruction | Description | Returns | > | - | - | - | > | `submitStatement` | Submit one or more statements in App mode; `statement` is required and execution context is optional. | A SQL API ResultSet (`data`, `resultSetMetaData`, `statementHandle`) or QueryStatus for asynchronous work. | > | `getStatementStatus` | Check execution and fetch a result partition by `statementHandle`; optional `partition` is zero-based. | A ResultSet when complete or QueryStatus while running. | > | `cancelStatement` | Cancel a running statement by `statementHandle`; optional `requestId` identifies the request. | Snowflake cancellation status. | > | `fetchResult` | Fetch page `page` from a Resource API asynchronous `result_handler`. | The raw Result API page and its provider pagination metadata. | > > ### Databases > > | Instruction | Description | Returns | > | - | - | - | > | `listDatabases` | List accessible databases; filter with `like`, `startsWith`, `fromName`, `showLimit` and `history`. | A collection of Snowflake Database resources or an async result handle. | > | `fetchDatabase` | Fetch one database by `name`. | A Snowflake Database resource. | > | `createDatabase` | Create a database from a complete `body`; optional `createMode` and `kind`. | The created Database resource or async result handle. | > | `createOrAlterDatabase` | Create or fully alter `name` from a complete `body`. | The resulting Database resource or async result handle. | > | `undropDatabase` | Restore a dropped database by `name` when retention permits. | Snowflake operation status. | > | `deleteDatabase` | Delete `name`; `restrict` defaults to `true` in the connector. | Snowflake operation status. | > > ### Schemas > > | Instruction | Description | Returns | > | - | - | - | > | `listSchemas` | List schemas in `database`; supports name filters, `showLimit`, cursor and history. | A collection of Snowflake Schema resources or an async result handle. | > | `fetchSchema` | Fetch `database`.`name`. | A Snowflake Schema resource. | > | `createSchema` | Create a schema in `database` from a complete `body`. | The created Schema resource or async result handle. | > | `createOrAlterSchema` | Create or fully alter `database`.`name` from `body`. | The resulting Schema resource or async result handle. | > | `undropSchema` | Restore a dropped `database`.`name` when retention permits. | Snowflake operation status. | > | `deleteSchema` | Delete `database`.`name`; `restrict` defaults to `true` in the connector. | Snowflake operation status. | > > ### Virtual warehouses > > | Instruction | Description | Returns | > | - | - | - | > | `listWarehouses` | List warehouses, optionally filtered by `like`. | A collection of Snowflake Warehouse resources or an async result handle. | > | `fetchWarehouse` | Fetch one warehouse by `name`. | A Snowflake Warehouse resource. | > | `createWarehouse` | Create a warehouse from a complete `body`; optional `createMode`. | The created Warehouse resource or async result handle. | > | `createOrAlterWarehouse` | Create or fully alter `name` from `body`. | The resulting Warehouse resource or async result handle. | > | `resumeWarehouse` | Resume `name`; this starts compute billing. | Snowflake operation status. | > | `suspendWarehouse` | Suspend `name`; this affects workload availability. | Snowflake operation status. | > | `deleteWarehouse` | Delete `name`; optional `ifExists` makes the operation idempotent. | Snowflake operation status. | > > > [!NOTE] > > > > Snowflake Resource API operations can return `202 Accepted`. Use the returned result handler with `fetchResult` until the operation completes. > > ## DSUL Examples > > **Run a parameterized aggregate query:** > > ```yaml theme={null} > - Snowflake.submitStatement: > statement: | > SELECT REGION, SUM(REVENUE) AS TOTAL > FROM ANALYTICS.SALES > WHERE SALE_DATE >= ? > GROUP BY REGION > ORDER BY TOTAL DESC > warehouse: ANALYTICS_WH > role: PRISME_AGENT_ROLE > bindings: > "1": > type: TEXT > value: '{{startDate}}' > output: queryResult > ``` > > **Submit asynchronous SQL and poll it:** > > ```yaml theme={null} > - Snowflake.submitStatement: > statement: '{{sql}}' > async: true > requestId: '{{requestId}}' > output: submitted > - Snowflake.getStatementStatus: > statementHandle: '{{submitted.statementHandle}}' > output: status > ``` > > **Create a reporting schema if it does not exist:** > > ```yaml theme={null} > - Snowflake.createSchema: > database: ANALYTICS > createMode: ifNotExists > body: > name: REPORTING > comment: Curated reporting layer > output: schema > ``` > > **Inspect and suspend an idle warehouse:** > > ```yaml theme={null} > - Snowflake.fetchWarehouse: > name: ANALYTICS_WH > output: warehouse > - conditions: > '{{warehouse.state}} == "STARTED" and {{shouldSuspend}}': > - Snowflake.suspendWarehouse: > name: ANALYTICS_WH > ifExists: true > output: suspended > ``` *** ## Security The answers that hold for every connector (agent access, shared knowledge bases, credentials, models, egress) are on [Connector security](/apps-store/marketplace/connectors/security). This section lists what is specific to Snowflake. | Topic | Snowflake | | - | - | | Authentication family | Delegated OAuth (Snowflake OAuth, authorization code with PKCE): each user connects their own Snowflake account. The connector also offers key-pair and token modes, in which every caller acts as one Snowflake user. | | Production modes | `oauthCentral` or `oauth` | | Modes to avoid in production | `accessToken` (testing only). `programmaticAccessToken` and `keyPair` act as one Snowflake user for every caller: avoid them when Snowflake must apply each user's permissions. | | Read-only scopes | Role-based. The connector requests `refresh_token` and `session:role:` for the role set in the configuration app (set by the platform maintainer for `oauthCentral`, which a workspace can override). Read-only access comes from the grants of that role. Without a configured role, Snowflake uses the user's default role. | | Agent allowlist | Yes, on the tenant endpoint (empty at installation). The global endpoint accepts every agent. | | Per-reader access control on knowledge bases | Not applicable: this connector does not feed knowledge bases. | | Outbound hosts | The Snowflake account URL set by the administrator (by the platform maintainer for `oauthCentral`). The connector accepts only HTTPS addresses under `snowflakecomputing.com` or `snowflakecomputing.cn`. | | Audit events | None specific to this connector | Create a dedicated read-only role and list it in `ALLOWED_ROLES_LIST` on the security integration. Statements accept a `role` argument: in `keyPair` and `accessToken` modes, an agent can use any role granted to the Snowflake user, so grant that user the read-only role only. For a programmatic access token, set `ROLE_RESTRICTION` to that role. *** ## Error Handling | HTTP code | Meaning | | - | - | | `400` | Invalid account URL, SQL, identifier, request body or OAuth configuration. | | `401` | Missing, expired, revoked or invalid Snowflake credential. OAuth users may need to reconnect. | | `403` | The Snowflake role lacks the required privilege, the OAuth role is blocked, or a network policy rejects the request. | | `404` | The requested statement, database, schema, warehouse or result handler is absent or not visible. | | `409` | The resource already exists or its current state conflicts with the requested operation. | | `422` | Snowflake rejected the resource definition or an action for its current state. | | `429` | Snowflake concurrency or rate limit reached; retry with backoff. | | `500` / `503` | Transient Snowflake or connector failure; retry before changing credentials. | ### Common Issues **"This agent is not authorized to use this connector"**, Open the configuration app, add the agent under **Authorized agents** (or enable **Allow all agents**) and save. **"The calling agent could not be identified"**, The capability scope is missing `agent_id`. Set it to `context_id,agent_id,user_id`, then authorize the agent. **"Snowflake OAuth is not connected for this user"**, Open the configuration app and click **Connect**, or follow the connection URL surfaced by Agent Creator. **"Snowflake token refresh failed … must reconnect"**, The refresh token expired or was revoked. Reconnect the user. Snowflake OAuth refresh-token validity is controlled by the security integration. **"Snowflake platform OAuth is not configured for an account"**, Ask the platform maintainer to configure the central client, or select tenant OAuth, key-pair, programmatic-token or access-token mode. **SQL output is truncated**, MCP responses are intentionally limited to 100 rows and 80 KB. Narrow the query with selected columns, `WHERE`, aggregation and deterministic keyset pagination. A provider `partition` cannot recover rows omitted locally by the connector. ## External Resources > [card] [Snowflake REST APIs](https://docs.snowflake.com/en/developer-guide/snowflake-rest-api/reference) > > Official Snowflake REST API reference for databases, schemas, warehouses and asynchronous results. > [card] [Tool Agents](/products/agent-factory/capabilities) > > Learn how Agent Creator agents consume MCP tools in Prisme.ai. # SonarQube Source: https://docs.prisme.ai/apps-store/marketplace/connectors/sonarqube Read and act on SonarQube / SonarQube Cloud code-quality data from Agent Creator agents and Builder workflows ![SonarQube](https://mintcdn.com/prismeai/wAgJDx_RXqITi8An/images/connectors/sonarqube.svg?fit=max\&auto=format\&n=wAgJDx_RXqITi8An\&q=85\&s=8700229e04528ef2fc229ed06c045509) The SonarQube app exposes the [SonarQube](https://www.sonarsource.com/products/sonarqube/) and [SonarQube Cloud](https://sonarcloud.io) Web API. It can be consumed two ways: as a remote MCP server that **Agent Creator** agents call as tools, or as a Builder app whose instructions you call directly from DSUL. It covers projects, components, issues, security hotspots, measures, metrics, quality gates, quality profiles, rules, organizations, user tokens, analyses, branches, webhooks and SVG badges. Authentication is a **SonarQube User Token**, either one token shared by the workspace or **each user's own token**, resolved server-side and never passed through the agent. Each installed instance serves its own MCP endpoint and is set up through a configuration app. > [card] Code Quality > > Issues, security hotspots, rules and quality profiles to triage code findings. > [card] Project Insights > > Measures, metric definitions, history, quality-gate status and analyses. > [card] Admin & Operations > > Projects, organizations, branches, webhooks, user tokens and SVG badges. ## Who is this for? This connector is used by three different roles. Jump to the section that matches yours; each one is self-contained. > [card] Agent builder > > You build agents in **Agent Creator** and want them to use SonarQube. → *Agent builder* tab. > [card] Platform admin > > You run the platform and set up SonarQube once for everyone. → *Platform admin setup* accordion below. > [card] Workspace builder > > You write Builder automations (DSUL) that call SonarQube operations directly. → *Workspace builder* tab. ## Prerequisites * A **SonarQube Server** (self-hosted) or a **SonarQube Cloud** account. * A **User Token** (type *User token*, not an analysis token) generated in **My Account > Security > Generate Tokens**: one shared token for the workspace, or one per user in per-user mode (see *Authentication modes* in the *Workspace builder* tab). * The **API base URL** of your instance: * SonarQube Cloud: `https://sonarcloud.io/api` * Self-hosted: `https:///api` * For SonarQube Cloud only: the **organization key** that owns your projects (most search and create operations require it; use `searchOrganizations` to discover the keys visible to your token). * Prisme.ai platform **27.5.7 or later**. The SonarQube API must be reachable from the platform's runtime. | SonarQube | Supported | How the token is sent | | - | - | - | | Server 9.9 LTS | Yes | `Authorization: Basic` (token as login, empty password) | | Server 10.x and later (incl. 2025.x LTA) | Yes | `Authorization: Basic` | | Cloud | Expected (not re-verified with this version) | `Authorization: Basic`, retried once as `Bearer` when rejected | The connector always tries Basic first and falls back to Bearer on a `401`, so you never pick a scheme: SonarQube Server before 10.0 only accepts Basic, SonarQube Cloud documents Bearer. Server versions older than 9.9 are not tested. > [accordion] Platform admin (Governance): one-time platform setup > > **Goal:** SonarQube is a **per-workspace** connector: each workspace that installs it chooses its authentication mode and owns its credentials (see the *Workspace builder* tab), so there is **no platform-wide credential to provision** and no central OAuth client. The only optional platform task is to make a workspace's SonarQube connector available in the Capabilities catalog. > > > [!NOTE] > > > > The simplest path is the **Add to catalog** button in the connector's configuration app (*Agents* tab): it creates the catalog entry with the right MCP endpoint, scope and, in per-user mode, the connect/status/disconnect URLs. Declare the capability by hand only if you cannot use that button. > > ## Declare the capability in AI Governance by hand (optional) > > **1. Open AI Governance > Capabilities** > > Create (or edit) the **SonarQube** capability. > > **2. Point it at the MCP endpoint** > > Set the capability's MCP server URL to the connector's **MCP endpoint**, shown in the configuration app (*Agents* tab). It has the form `https:///v2/workspaces/slug:/webhooks/.mcp`. Set its **Scope** to: > > ```text theme={null} > context_id,agent_id,user_id > ``` > > The `agent_id` in the scope is what lets the connector identify the calling agent; the agent must also be allowed in the configuration app (*Agents* tab). > > **3. Per-user mode only: add the connection URLs** > > In per-user mode, each user connects their own SonarQube token. The capability needs an `auth` block of type `oauth2` with an empty scope list and these three URLs, all on the same instance: > > ```json theme={null} > { > "type": "oauth2", > "status_url": "https:///v2/workspaces/slug:/webhooks/.oauthStatus", > "connect_url": "https:///v2/workspaces/slug:/webhooks/.oauthConnect", > "disconnect_url": "https:///v2/workspaces/slug:/webhooks/.oauthDisconnect", > "scopes": [] > } > ``` > > There is no OAuth flow behind these names: `connect_url` opens a form where the user pastes their own SonarQube token. Encode spaces in the instance name as `%20`. > > **4. Make it available to agent builders** > > Once created, the capability appears in the capability picker for agent builders in your organization, who enable it on their agents. Access to the catalog follows your organization's existing roles. *** > [tab] Agent builder (Agent Creator) > > ## Agent builder > > **Goal:** let an agent you build in Agent Creator read and act on SonarQube code-quality data through MCP tools. > > > [!NOTE] > > > > Before an agent can call the connector, a *Workspace builder* must have installed and configured the SonarQube app in a workspace (see the *Workspace builder* tab). Optionally, a *Platform admin* may have published a SonarQube capability in AI Governance (see the *Platform admin setup* accordion above). > > The SonarQube credential is resolved server-side and never exposed to the agent: the workspace's shared token, or, in per-user mode, the calling user's own token. Your agent is identified through the capability *Scope* that Agent Creator injects, and must be allowed in the connector's configuration app. > > **1. Install and configure the connector in a workspace** > > Follow the *Workspace builder* tab: install **SonarQube** in a workspace, open its configuration app and set the authentication mode and API base URL. > > **2. Add the MCP capability to your agent** > > In the configuration app, open the *Agents* tab, tick your agent and click **Install capability**. This adds the MCP tool with the right endpoint and scope (`context_id,agent_id,user_id`), plus the per-user connection URLs in per-user mode. Alternatively, pick the SonarQube capability from the catalog if an administrator published it. > > **3. Per-user mode: connect your SonarQube token** > > On the first use, Agent Creator shows a **Connect** button on the SonarQube capability. It opens a form where you paste your own SonarQube **User token**; the connector checks it against SonarQube before storing it in your personal secrets. Every tool call then runs with your SonarQube permissions. Use **Disconnect** to remove it. > > **4. Brief the agent in its system prompt** > > Wiring the capability is not enough: the agent also needs to know the MCP exists and when to reach for it. Add a short paragraph to the agent's system prompt. Copy-pasteable starter: > > ```text theme={null} > You have access to the SonarQube MCP server. Use it whenever the user asks about code-quality data: projects, issues, security hotspots, measures, quality gates, rules or badges. Examples: "List the blocker issues in project X", "What's the coverage of auth-service?", "Show the security hotspots opened this week", "Why is the quality gate failing on main?". On SonarCloud, most search and create operations need an organization key; call searchOrganizations first if you don't know it. Prefer calling MCP tools directly over guessing, and confirm with the user before any destructive action (mark issues as false positive, change severity, delete a project or branch). If a tool answers that SonarQube is not connected for this user, ask the user to click Connect on the SonarQube capability. > ``` > > Refine the trigger keywords (project keys, branch names, rule families) so the agent reliably picks up the right intent in your context. > > > [!NOTE] > > > > **Legacy AI Knowledge agents** (no native MCP picker): add the connector under **Advanced > Tools > MCP** and paste the **MCP endpoint** URL shown in the configuration app (*Agents* tab). Newer Agent Creator agents use the native capability picker described above. > > ## Available Tools > > ### System & Authentication > > | Tool | Description | > | - | - | > | `validateAuthentication` | Validate the current token | > | `getServerVersion` | Get SonarQube version | > | `listLanguages` | List supported languages | > > ### Organizations > > | Tool | Description | > | - | - | > | `searchOrganizations` | List SonarCloud organizations visible to the token. **Pass `member: true` for your own orgs, or `organizations` to check specific keys**; use the returned `key` as the `organization` argument elsewhere | > > ### Projects > > | Tool | Description | > | - | - | > | `searchProjects` | Search projects you administer (filter by `q`, `qualifiers`, `visibility`, `analyzedBefore`). **Admin-scoped; for public orgs use `searchPublicProjects`** | > | `searchPublicProjects` | Browse projects in any org, including public orgs you are not a member of (Project Explorer endpoint) | > | `createProject` | Create a project | > | `deleteProject` | Delete a project | > | `updateProjectKey` | Update the project key | > | `updateProjectVisibility` | Change project visibility | > > ### Components > > | Tool | Description | > | - | - | > | `showComponent` | Describe a component (project, file, directory) | > | `searchComponents` | Search components (projects, files) | > | `getComponentTree` | Navigate the component tree | > > ### Issues > > | Tool | Description | > | - | - | > | `searchIssues` | Search for issues. **For "my issues / mes issues" pass `assignees: __me__`** (or `author: __me__` for issues you reported). To filter unresolved, pass `statuses: OPEN,CONFIRMED,REOPENED` | > | `assignIssue` | Assign or unassign an issue (omit `assignee` to unassign) | > | `transitionIssue` | Perform a workflow transition on an issue | > | `addIssueComment` | Add a comment to an issue | > | `setIssueTags` | Set tags on an issue (comma-separated; empty to clear) | > | `setIssueSeverity` | Change the severity of an issue | > | `setIssueType` | Change the type of an issue | > > ### Measures & Metrics > > | Tool | Description | > | - | - | > | `getComponentMeasures` | Get measures of a component (e.g. `ncloc,bugs,coverage`) | > | `getComponentTreeMeasures` | Get measures for a component tree | > | `getMeasuresHistory` | Get history of measures over a period | > | `searchMetrics` | Search metric definitions | > > ### Quality Gates > > | Tool | Description | > | - | - | > | `listQualityGates` | List quality gates | > | `showQualityGate` | Show a quality gate (by `id` or `name`) | > | `getProjectQualityGateStatus` | Get the quality-gate status of a project / branch / PR | > | `selectQualityGate` | Associate a project with a quality gate | > > ### Quality Profiles & Rules > > | Tool | Description | > | - | - | > | `searchQualityProfiles` | Search quality profiles | > | `searchRules` | Search rules | > | `showRule` | Show a rule | > > ### Hotspots > > | Tool | Description | > | - | - | > | `searchHotspots` | Search security hotspots. **For "my hotspots" pass `onlyMine: true`. For unresolved pass `status: TO_REVIEW`** | > | `showHotspot` | Show a security hotspot | > | `changeHotspotStatus` | Change the status of a hotspot | > > ### User Tokens > > | Tool | Description | > | - | - | > | `searchUserTokens` | List user tokens (admin-only when `login` targets another user) | > | `generateUserToken` | Generate a user token (`USER_TOKEN`, `PROJECT_ANALYSIS_TOKEN`, `GLOBAL_ANALYSIS_TOKEN`) | > | `revokeUserToken` | Revoke a user token by name | > > ### Analyses & Branches > > | Tool | Description | > | - | - | > | `searchProjectAnalyses` | Search project analyses | > | `createAnalysisEvent` | Create an event on a project analysis | > | `listProjectBranches` | List branches of a project | > | `deleteProjectBranch` | Delete a branch from a project | > > ### Webhooks > > | Tool | Description | > | - | - | > | `listWebhooks` | List webhooks (global or per-project) | > | `createWebhook` | Create a webhook | > | `deleteWebhook` | Delete a webhook | > > ### Badges > > | Tool | Description | > | - | - | > | `getProjectMeasureBadge` | Get an SVG badge for a project metric | > | `getProjectQualityGateBadge` | Get an SVG badge for the project quality-gate status | > > ## Output Formats > > Every tool accepts an `outputFormat` argument that controls the MCP response shape: > > * **`verbose`** (default): human-readable text for LLM consumption > * **`structured`**: machine-readable JSON in `structuredContent` > * **`both`**: both text and structured content > > ## Tool Details > > ### searchIssues > > Search and filter issues on a project. Default response includes all issues the token can see; combine filters to scope down. > > ```json theme={null} > { > "name": "searchIssues", > "arguments": { > "componentKeys": "my_org_my-project", > "types": "BUG,VULNERABILITY", > "severities": "CRITICAL,BLOCKER", > "statuses": "OPEN,CONFIRMED,REOPENED", > "branch": "main", > "ps": 100 > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `componentKeys` | No | Comma-separated component / project keys | > | `assignees` | No | Use `__me__` for the current user | > | `severities` | No | `INFO`,`MINOR`,`MAJOR`,`CRITICAL`,`BLOCKER` | > | `types` | No | `BUG`,`VULNERABILITY`,`CODE_SMELL` | > | `statuses` | No | `OPEN`,`CONFIRMED`,`REOPENED`,`RESOLVED`,`CLOSED` | > | `tags` | No | Comma-separated tag names | > | `createdAfter` / `createdBefore` | No | ISO date or `YYYY-MM-DD` | > | `branch` / `pullRequest` | No | Restrict to a branch or PR | > | `p` / `ps` | No | Pagination; `ps` max 500 | > > ### searchOrganizations > > Discover the SonarCloud organization keys your token can see; call this first when you do not know the `organization` value other tools require. > > ```json theme={null} > { > "name": "searchOrganizations", > "arguments": { > "member": true > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `member` | No\* | When `true`, return only orgs the authenticated user belongs to | > | `organizations` | No\* | Comma-separated org keys to check (one of `member` or `organizations` is required on SonarCloud) | > | `p` / `ps` | No | Pagination | > > ### transitionIssue > > Move an issue through SonarQube's workflow. > > ```json theme={null} > { > "name": "transitionIssue", > "arguments": { > "issue": "AY9z...", > "transition": "falsepositive" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `issue` | Yes | Issue key | > | `transition` | Yes | `confirm`, `unconfirm`, `reopen`, `resolve`, `falsepositive`, `wontfix`, `close` | > > ### getComponentMeasures > > Read one or several metric values for a component (project, file, directory). > > ```json theme={null} > { > "name": "getComponentMeasures", > "arguments": { > "component": "my_org_my-project", > "metricKeys": "ncloc,bugs,vulnerabilities,coverage,duplicated_lines_density", > "branch": "main" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `component` | Yes | Component key (project, file or directory) | > | `metricKeys` | Yes | Comma-separated metric keys; see `searchMetrics` | > | `branch` | No | Branch name | > | `pullRequest` | No | Pull request ID | > | `additionalFields` | No | Extra fields (e.g. `metrics,periods`) | > > ### getProjectQualityGateStatus > > Useful as a one-shot pass/fail check for CI gates. > > ```json theme={null} > { > "name": "getProjectQualityGateStatus", > "arguments": { > "projectKey": "my_org_my-project", > "branch": "main" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `projectKey` | No\* | Project key (one of `projectKey` or `projectId` must be set) | > | `projectId` | No\* | Project ID, an alternative to `projectKey` | > | `branch` | No | Restrict to a branch | > | `pullRequest` | No | Restrict to a pull request | > > ### createProject > > Provision a new project. On SonarCloud, `organization` is required. > > ```json theme={null} > { > "name": "createProject", > "arguments": { > "name": "Website Revamp", > "project": "my_org_website-revamp", > "organization": "my_org", > "visibility": "private" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `name` | Yes | Display name | > | `project` | Yes | Project key (unique, alphanumeric + `-_.:`) | > | `organization` | No\* | Required on SonarCloud | > | `visibility` | No | `public` or `private` | > [tab] Workspace builder (DSUL) > > ## Workspace builder > > **Goal:** install the connector in a workspace, configure the SonarQube credential, and call SonarQube operations from your automations. > > ## Installation > > 1. Go to **Apps** in your workspace, search for **SonarQube** and install it. Pick an instance name; spaces are allowed. > 2. Open the instance configuration and follow the **Configuration app** link (`configAppUrl`, filled in automatically a few seconds after install). > 3. In the *Authentication* tab, choose the mode, set the API base URL and save (see below). > 4. In the *Agents* tab, allow the agents that may call the connector and install the capability on them. > > ## Authentication modes > > | Mode | What the workspace admin sets | Whose SonarQube permissions apply | Best for | > | - | - | - | - | > | **One token for the whole workspace** | A SonarQube User token + the API base URL | The token owner's, for every user and agent | Service accounts, automations without a user (scheduled runs) | > | **Personal token per user** | The API base URL only | Each Prisme.ai user's own SonarQube account | Interactive agents where results must follow each person's SonarQube rights | > > Both are stored in the workspace secret `sonarqubeAuth`, written by the configuration app. Switching to per-user mode deletes the shared token from it. > > ### One token for the whole workspace > > Paste the User token and the API base URL, then **Save authentication** and **Test connection**. The test calls `api/users/current` and reports the SonarQube login the token belongs to. > > ### Personal token per user > > Set only the API base URL and save. Each user then connects their own token: > > * **From Agent Creator**: the **Connect** button on the capability opens the token form (see the *Agent builder* tab). > * **From the configuration app**: **Connect my token** opens the same form for the signed-in user; **Test connection** then tests that user's own token. > > What the connector does with a personal token: > > | Event | Behaviour | > | - | - | > | Connect | The token is checked with `api/users/current` (`isLoggedIn` must be `true`) before being stored in the user's personal secrets, replacing any previous one. A rejected token keeps the previous one. An unreachable SonarQube is reported as such, not as an invalid token. | > | Tool call | Runs with that user's token. A user who has not connected gets the message *SonarQube is not connected for this user*. | > | SonarQube answers `401` | The token is revoked or expired: it is removed, the agent is told to reconnect, and the capability shows **Connect** again. | > | SonarQube answers `403` | The token is kept: it is valid but lacks permission on that resource. | > | Disconnect | The user's token is deleted. | > > > [!WARNING] > > > > In per-user mode, a call needs a signed-in Prisme.ai user. Automations without one (scheduled runs, events without a user) get *not connected* errors. Use the shared-token mode for them, in a separate instance if needed. > > Tokens never appear in clear in the workspace activity feed, in either mode. > > > [!NOTE] > > > > SonarQube identifiers are project keys, component keys, issue keys and login names, never numeric IDs except for quality-gate `gateId`. Most list / search operations accept `p` (page index, 1-based) and `ps` (page size, max 500) for pagination. On SonarCloud, most search and create operations also require an `organization` key. > > ## Available Instructions > > Every instruction resolves credentials like the MCP tools: the workspace's shared token, or the calling user's own token in per-user mode. > > ### System & Authentication > > | Instruction | Description | Returns | > | - | - | - | > | `validateAuthentication` | Validate the current token against the instance. | `{ valid, login }` | > | `getServerVersion` | Get the SonarQube server version. | A version string | > | `listLanguages` | List supported languages; optional `q` filter on name. | `{ languages: [{ key, name }] }` | > > ### Organizations > > | Instruction | Description | Returns | > | - | - | - | > | `searchOrganizations` | List SonarCloud organizations visible to the token; pass `member: true` or `organizations`. | `{ organizations: [{ key, name, description, url }], paging }` | > > ### Projects > > | Instruction | Description | Returns | > | - | - | - | > | `searchProjects` | Search projects you administer; filter by `organization`, `projects`, `q`, `qualifiers`, `visibility`, `analyzedBefore`, `onProvisionedOnly`. | `{ components: [{ key, name, visibility }], paging }` | > | `searchPublicProjects` | Browse projects in any org (incl. public orgs you are not a member of) by `organization`, optional `filter`/`s`/`asc`. | `{ projects: [{ key, name }], paging }` | > | `createProject` | Create a project from `name` + `project` (key); `organization` required on SonarCloud; optional `visibility`. | `{ project: { key, name, visibility } }` | > | `deleteProject` | Delete a project by `project` key. | Empty (HTTP 204) | > | `updateProjectKey` | Rename a project key `from` → `to`. | Empty (HTTP 204) | > | `updateProjectVisibility` | Set `visibility` (`public`/`private`) on a `project`. | Empty (HTTP 204) | > > ### Components > > | Instruction | Description | Returns | > | - | - | - | > | `showComponent` | Describe a `component` (project, file, directory); optional `branch`/`pullRequest`. | `{ component: { key, name, qualifier } }` | > | `searchComponents` | Search components by `q`, `qualifiers` (`TRK`,`FIL`,`DIR`…), `organization`. | `{ components: [{ key, name, qualifier }], paging }` | > | `getComponentTree` | Navigate the tree under `component`; `strategy` (`children`/`all`/`leaves`), `qualifiers`, `q`, `branch`, `s`. | `{ baseComponent, components: [{ key, name }], paging }` | > > ### Issues > > | Instruction | Description | Returns | > | - | - | - | > | `searchIssues` | Search issues by `componentKeys`, `projects`, `assignees`, `author`, `severities`, `types`, `statuses`, `resolutions`, `resolved`, `tags`, `createdAfter`/`createdBefore`, `languages`, `rules`, `branch`/`pullRequest`. | `{ issues: [{ key, rule, severity, type, status, component }], paging }` | > | `assignIssue` | Assign `issue` to `assignee` (omit `assignee` to unassign). | `{ issue }` | > | `transitionIssue` | Apply `transition` (`confirm`/`reopen`/`resolve`/`falsepositive`/`wontfix`/`close`…) to `issue`. | `{ issue }` | > | `addIssueComment` | Add `text` comment to `issue`. | `{ issue, comment }` | > | `setIssueTags` | Set comma-separated `tags` on `issue` (empty clears). | `{ issue }` | > | `setIssueSeverity` | Set `severity` (`INFO`…`BLOCKER`) on `issue`. | `{ issue }` | > | `setIssueType` | Set `type` (`BUG`/`VULNERABILITY`/`CODE_SMELL`) on `issue`. | `{ issue }` | > > ### Measures & Metrics > > | Instruction | Description | Returns | > | - | - | - | > | `getComponentMeasures` | Read `metricKeys` for a `component`; optional `branch`/`pullRequest`/`additionalFields`. | `{ component: { measures: [{ metric, value }] } }` | > | `getComponentTreeMeasures` | Read `metricKeys` across the tree under `component`; `strategy`, `qualifiers`, `s`. | `{ baseComponent, components: [{ measures }], paging }` | > | `getMeasuresHistory` | History of `metrics` for `component` over `from`/`to`. | `{ measures: [{ metric, history: [{ date, value }] }], paging }` | > | `searchMetrics` | Search metric definitions; optional fields `f`. | `{ metrics: [{ key, name, type }], total }` | > > ### Quality Gates > > | Instruction | Description | Returns | > | - | - | - | > | `listQualityGates` | List quality gates; optional `organization`. | `{ qualitygates: [{ id, name }], default }` | > | `showQualityGate` | Show a gate by `id` or `name`. | `{ id, name, conditions: [{ metric, op, error }] }` | > | `getProjectQualityGateStatus` | Pass/fail status for `projectKey`/`projectId`; optional `branch`/`pullRequest`. | `{ projectStatus: { status, conditions: [...] } }` | > | `selectQualityGate` | Associate `projectKey` with a gate (`gateId`/`gateName`). | Empty (HTTP 204) | > > ### Quality Profiles & Rules > > | Instruction | Description | Returns | > | - | - | - | > | `searchQualityProfiles` | Search profiles by `organization`, `language`, `project`, `qualityProfile`, `defaults`. | `{ profiles: [{ key, name, language }] }` | > | `searchRules` | Search rules by `q`, `languages`, `repositories`, `severities`, `types`, `tags`, `statuses`, `qprofile`, `activation`. | `{ rules: [{ key, name, severity }], total }` | > | `showRule` | Show a rule by `key`; optional `organization`. | `{ rule: { key, name, htmlDesc } }` | > > ### Hotspots > > | Instruction | Description | Returns | > | - | - | - | > | `searchHotspots` | Search hotspots by `projectKey`, `branch`/`pullRequest`, `status` (`TO_REVIEW`/`REVIEWED`), `resolution`, `onlyMine`, `sinceLeakPeriod`. | `{ hotspots: [{ key, status, vulnerabilityProbability }], paging }` | > | `showHotspot` | Show a hotspot by `hotspot` key. | `{ key, status, rule, component }` | > | `changeHotspotStatus` | Set `status` on `hotspot`; optional `resolution`, `comment`. | Empty (HTTP 204) | > > ### User Tokens > > | Instruction | Description | Returns | > | - | - | - | > | `searchUserTokens` | List user tokens; optional `login` (admin-only for other users). | `{ userTokens: [{ name, createdAt }] }` | > | `generateUserToken` | Generate a token `name`; optional `login`, `type`, `projectKey`, `expirationDate`. | `{ name, token, type }` | > | `revokeUserToken` | Revoke a token by `name`; optional `login`. | Empty (HTTP 204) | > > ### Analyses & Branches > > | Instruction | Description | Returns | > | - | - | - | > | `searchProjectAnalyses` | Search analyses for `project`; optional `branch`, `category`, `from`/`to`. | `{ analyses: [{ key, date, events }], paging }` | > | `createAnalysisEvent` | Add `name` event (`category` `VERSION`/`OTHER`) to `analysis`. | `{ event: { key, name, category } }` | > | `listProjectBranches` | List branches of `project`. | `{ branches: [{ name, type, status }] }` | > | `deleteProjectBranch` | Delete `branch` from `project`. | Empty (HTTP 204) | > > ### Webhooks > > | Instruction | Description | Returns | > | - | - | - | > | `listWebhooks` | List webhooks; optional `organization`/`project`. | `{ webhooks: [{ key, name, url }] }` | > | `createWebhook` | Create webhook `name` + `url`; optional `organization`, `project`, `secret`. | `{ webhook: { key, name, url } }` | > | `deleteWebhook` | Delete a webhook by `webhook` key. | Empty (HTTP 204) | > > ### Badges > > | Instruction | Description | Returns | > | - | - | - | > | `getProjectMeasureBadge` | SVG badge for `project` + `metric`; optional `branch`, `token`. | Raw SVG document | > | `getProjectQualityGateBadge` | SVG badge for the quality-gate status of `project`; optional `branch`, `token`. | Raw SVG document | > > > [!NOTE] > > > > `Returns` shows the shape of the operation output. Arguments noted with `*` in the *Agent builder* tool details are required; on SonarCloud, pass `organization` explicitly or default it in your automation. > > ## DSUL Examples > > ### List all unresolved bugs on a project > > ```yaml theme={null} > - SonarQube.searchIssues: > componentKeys: '{{projectKey}}' > types: BUG > statuses: OPEN,CONFIRMED,REOPENED > ps: 100 > output: issues > ``` > > ### Get the quality-gate status of a branch > > ```yaml theme={null} > - SonarQube.getProjectQualityGateStatus: > projectKey: '{{projectKey}}' > branch: main > output: gateStatus > - conditions: > '{{gateStatus.projectStatus.status}} == "ERROR"': > - emit: > event: qualityGateFailed > payload: > project: '{{projectKey}}' > conditions: '{{gateStatus.projectStatus.conditions}}' > ``` > > ### Triage a flaky issue as false positive > > ```yaml theme={null} > - SonarQube.transitionIssue: > issue: '{{issueKey}}' > transition: falsepositive > - SonarQube.addIssueComment: > issue: '{{issueKey}}' > text: 'False positive; already addressed in {{commitSha}}' > ``` > > ### Pull last week's coverage and bugs trend > > ```yaml theme={null} > - SonarQube.getMeasuresHistory: > component: '{{projectKey}}' > metrics: coverage,bugs,vulnerabilities,code_smells > from: '{{lastWeekIso}}' > ps: 1000 > output: history > ``` > > ### Provision a new SonarCloud project > > ```yaml theme={null} > - SonarQube.createProject: > name: '{{repoName}}' > project: '{{org}}_{{repoName}}' > organization: '{{org}}' > visibility: private > output: project > - SonarQube.selectQualityGate: > projectKey: '{{project.project.key}}' > gateName: 'Sonar way' > organization: '{{org}}' > ``` ## Migrating from the previous version Earlier versions of the SonarQube app used a **central MCP endpoint** (`/workspaces/slug:sonarqube/webhooks/mcp`) authenticated with an `mcp-api-key` header, and stored the token in the instance configuration (`token`, bound to the workspace secret `sonarqubeToken`). The current version serves an **MCP endpoint per installed instance**, keeps its settings in the secrets `sonarqubeAuth` and `sonarqubeAuthorizedAgents`, and is configured through its configuration app. The token is carried over automatically. Agents and capabilities are not: each workspace has one reconfiguration step to run and its agents to re-authorize. Follow this section for every workspace where the app is installed. ### What changes, and when New code takes effect as soon as the platform publishes the new app version: installed instances are not pinned to a version. Their configuration, however, is only migrated when the instance is reconfigured (step 3). In between: | Usage | Right after the upgrade | After step 3 | After steps 4–5 | | - | - | - | - | | DSUL instructions (`SonarQube.searchIssues`, …) | Work, with the old token | Work | Work | | Agents using the old capability (central endpoint + `mcp-api-key`) | Fail with *This SonarQube capability was installed for a previous version of the connector and no longer works…* | Same | Replaced by the new capability | | New per-instance MCP endpoint | Refuses every agent (no allowlist yet) | Refuses agents not allowed yet | Works | Plan the migration so that steps 3 to 5 follow the upgrade closely: agents lose SonarQube between the upgrade and step 5. ### Before you start * **Platform**: 27.5.7 or later. * **Inventory**, per workspace where SonarQube is installed: the instance name (slug), the agents that use the SonarQube capability, and who can generate a new SonarQube token if needed. * **Access**: a workspace editor account on each of these workspaces, and an API access token for that account (step 3 is an API call). * **Decide the mode** for each workspace: keep one shared token, or switch to personal tokens (see *Authentication modes* in the *Workspace builder* tab). ### Step 1 — Deploy the new version The SonarQube app is part of the workspaces delivered with the platform image (`extended` group). On startup, the platform imports the bundled workspaces and republishes the SonarQube app, which updates every installed instance. * Check that the platform's startup import includes the `extended` group (`STARTUP_IMPORT_GROUPS`). Otherwise, import the `sonarqube` workspace from the `release` repository manually. * To confirm the new version is live: in any workspace, open the SonarQube instance configuration. The new version shows a single read-only **Configuration app** field; the old one showed *SonarQube API Base URL*, *API Token*, *MCP Endpoint* and *MCP API Key*. ### Step 2 — Check that DSUL instructions still work (optional) Run any automation that calls `SonarQube.` in an affected workspace. It should behave as before: until step 3, the connector reads the old `token` / `baseUrl` instance settings. ### Step 3 — Reconfigure each instance The instance must receive a configuration change to run its installation routine again. That routine: * creates the secret `sonarqubeAuth`, **pre-filled with the old token and API base URL**; * creates the secret `sonarqubeAuthorizedAgents`, empty; * links both to the instance; * fills in the **Configuration app** link. > [!WARNING] > > Opening the instance configuration in the Builder and saving it unchanged does **nothing**: no change, no event. Use the API call below. Send one configuration change per instance. Clearing `configAppUrl` is harmless: the routine fills it in again. ```bash theme={null} API_URL="https:///v2" # the platform API, including /v2 WORKSPACE_ID="" INSTANCE="" TOKEN="" curl -X PATCH "$API_URL/workspaces/$WORKSPACE_ID/apps/$INSTANCE/config" \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{"configAppUrl": ""}' ``` Check the result a few seconds later: ```bash theme={null} curl "$API_URL/workspaces/$WORKSPACE_ID/apps/$INSTANCE/config" -H "Authorization: Bearer $TOKEN" ``` The response must contain a non-empty `configAppUrl`, and `auth` / `authorizedAgents` bindings. If `configAppUrl` is still empty, look in the workspace activity feed for an event whose type ends with `sonarqube.onInstall.failed`: the routine stops without writing anything when it cannot read the workspace secrets or configuration. > [!NOTE] > > **Alternative without the API**: uninstall the instance and install it again under the same name. The routine then runs, but it cannot recover the old settings: `sonarqubeAuth` is created with an empty token and the SonarQube Cloud URL. Enter **both the token and your API base URL** again in step 4. The old `sonarqubeToken` secret is left in place. ### Step 4 — Check authentication in the configuration app Open the **Configuration app** link from step 3, *Authentication* tab: * **Keeping a shared token**: the token and API base URL are pre-filled. Click **Test connection**; it must report success. * **Switching to personal tokens**: select *Personal token per user*, keep the API base URL, **Save authentication**. The shared token is removed from `sonarqubeAuth`. Users connect on their first use (see the *Agent builder* tab). ### Step 5 — Re-authorize agents In the *Agents* tab: 1. Tick each agent from your inventory (or **Allow all agents**). The list is empty after migration, so every agent is refused until allowed. 2. Click **Install capability** on each agent. It adds the new SonarQube MCP tool. 3. Remove the **old** SonarQube capability from each agent: the MCP tool whose server URL ends with `/workspaces/slug:sonarqube/webhooks/mcp`. **Install capability** only replaces a tool named `sonarqube` or pointing at the new endpoint, so an old capability under another name stays and keeps failing. 4. If an administrator had published SonarQube in the Capabilities catalog, publish it again with **Add to catalog** / **Update catalog entry** (or update the entry by hand, see *Platform admin setup*) so that it points at the new endpoint. ### Step 6 — Rotate the shared SonarQube token The previous version wrote the token in clear in the activity events of the **central `sonarqube` workspace** each time an agent used it (`runtime.automations.executed`, `accessToken` argument). The current version masks it. * After migration, generate a new SonarQube token for every workspace that kept a shared token, paste it in the configuration app, then revoke the old one in SonarQube. * If you switched to personal tokens, revoke the old shared token in SonarQube. * Treat the stored events of the `sonarqube` workspace as containing credentials (retention, access rights, purge). ### Step 7 — Clean up (optional) These leftovers are no longer read and are harmless: | Leftover | Where | How to remove | | - | - | - | | Secret `sonarqubeToken` | Each workspace with an instance | `DELETE $API_URL/workspaces/$WORKSPACE_ID/security/secrets/sonarqubeToken` | | Keys `token`, `baseUrl`, `mcpApiKey`, `mcpEndpoint` | Instance configuration | Leave them: removing them requires rewriting the whole instance configuration | | Key `sonarqubeToken` | Workspace configuration (`config.value`) | Leave it, or remove it when editing the workspace configuration | | Secret `appSecret` | The central `sonarqube` workspace | Delete it once no workspace uses the previous version | ### Verification checklist * [ ] Each instance configuration has a non-empty `configAppUrl`. * [ ] **Test connection** succeeds (shared mode), or a user connects with **Connect my token** and **Test connection** succeeds (per-user mode). * [ ] An allowed agent answers a SonarQube question; its tool call goes to `/webhooks/.mcp`. * [ ] No agent still has the old capability (`/workspaces/slug:sonarqube/webhooks/mcp`). * [ ] Old shared tokens are revoked in SonarQube. *** ## Security The answers that hold for every connector (agent access, shared knowledge bases, credentials, models, egress) are on [Connector security](/apps-store/marketplace/connectors/security). This section lists what is specific to SonarQube. | Topic | SonarQube | | - | - | | Authentication family | Technical account or API key: one SonarQube token (the only mode), sent with every request. SonarQube sees the owner of the token for every caller. | | Production modes | API token | | Modes to avoid in production | None: the token is the only mode. Create it on a dedicated account with read-only permissions, keep it in the workspace secrets and rotate it. | | Read-only rights | A user token of a dedicated account that holds only the **Browse** permission (and **See Source Code** if the agents need code snippets) on the projects concerned, and no global permission. | | Agent allowlist | No: access is controlled by installing the connector and by its signed API key. | | Per-reader access control on knowledge bases | Not applicable: this connector does not feed knowledge bases. | | Outbound hosts | `sonarcloud.io` by default, or the **SonarQube API Base URL** set at installation for SonarQube Server. | | Audit events | None specific to this connector | The connector exposes tools that generate and revoke user tokens, delete projects and branches, change project visibility and manage webhooks. A token with administrative permissions lets every allowed agent use them; with **Browse** only, SonarQube refuses them. *** ## Error Handling | HTTP Status | Error | Solution | | - | - | - | | 400 | Bad Request | Verify required arguments; on SonarCloud, most operations need `organization` (discover it with `searchOrganizations`) | | 401 | Unauthorized | Verify the User Token and `baseUrl`. In per-user mode, the user's token is removed and they must connect again | | 403 | Forbidden | Check the SonarQube permissions of the token owner (admin-only operations such as `searchUserTokens` for other users) | | 404 | Not Found | Verify project keys, component keys, issue keys and login names | | 409 | Conflict | Resource already exists (project key, token name, …); pick a different identifier | | 429 | Rate Limited | Back off and retry with exponential delay | | 500 | Server Error | Server-side issue; check SonarQube logs (self-hosted) or SonarCloud status | ### Common Issues **"SonarQube is not configured for this workspace"**: Shared-token mode with no token. Open the configuration app (*Authentication* tab), paste a User token generated in *SonarQube > My Account > Security > Generate Tokens*, then save. **"SonarQube is not connected for this user"**: Per-user mode and the user has not connected a token yet, or it was removed after SonarQube rejected it. Click **Connect** on the SonarQube capability in Agent Creator (or **Connect my token** in the configuration app). **"SonarQube rejected your personal token (revoked or expired), so it was removed"**: The user's token was revoked or has expired in SonarQube. Generate a new one and connect again. **"SonarQube rejected the token" when connecting**: The token is wrong, revoked, or belongs to another SonarQube instance. Check the API base URL configured by the administrator, and use a token of type *User token*. **"SonarQube could not be reached or answered an error"** when connecting: The platform cannot reach the API base URL (network, proxy, TLS) or SonarQube answered an error. The token was not stored. Check the URL (it must end with `/api`) and that the platform's runtime can reach it. **"This agent is not authorized to use this connector"**: Allow the agent in the configuration app (*Agents* tab), or use **Install capability**, which does it for you. **"This SonarQube capability was installed for a previous version of the connector"**: The agent still uses the central endpoint of the previous version. See [Migrating from the previous version](#migrating-from-the-previous-version), steps 3 to 5. **"organization parameter is missing"**: On SonarCloud, most search and create operations require the `organization` key. Pass it explicitly in the tool arguments or as a default in your DSUL automation; call `searchOrganizations` to discover the keys your token can see. **`searchProjects` returns nothing on a public org**: `searchProjects` is admin-scoped (it only lists projects in organizations you administer). To browse projects in any organization, including public ones you are not a member of, use `searchPublicProjects`. **Badge tools return non-SVG content**: `getProjectMeasureBadge` and `getProjectQualityGateBadge` return raw SVG. The MCP transport currently surfaces them as JSON-encoded strings; consume them in App mode (DSUL) to write the SVG straight to a file or HTTP response. ## External Resources > [card] [SonarQube Web API](https://next.sonarqube.com/sonarqube/web_api) > > Official SonarQube Web API reference > [card] [SonarCloud Web API](https://sonarcloud.io/web_api) > > SonarCloud-flavored Web API reference > [card] [SonarSource Documentation](https://docs.sonarsource.com) > > Product documentation, metrics catalog, rule descriptions > [card] [Tool Agents](/products/agent-factory/capabilities) > > Learn how Agent Creator agents consume MCP tools in Prisme.ai. # Storage (deprecated) Source: https://docs.prisme.ai/apps-store/marketplace/connectors/storage-client Deprecated connector to the Prisme.ai Storage backend — use the Knowledges connector instead > [!WARNING] > > **This connector is deprecated. Use [Knowledges](/apps-store/marketplace/connectors/knowledges) instead.** > > Knowledges covers the same knowledge-base surface with the current naming (`knowledges`, `documents`, `webSources` instead of `vectorStores` and `vectorStoreFiles`) and the same credential-free authentication. Install it for any new agent or automation, and migrate the existing ones when convenient. > > This page is kept for the workspaces that still run the Storage connector. It stays functional, and remains the only connector exposing the administrative surface — per-store API keys, RBAC access bindings, agent skills and admin diagnostics — which Knowledges does not cover. The former `files` tool and its file instructions (`listFiles`, `uploadFile`, `getFile`, `deleteFile`, `downloadFileContent`) have been removed: upload the file to the platform, attach it with `vectorStoreFiles.add`, and use `vectorStoreFiles.list`, `get`, `delete` and `getSourceUrl` from there. The Prisme.ai Storage app is a **client connector to the Prisme.ai Storage backend** (the `slug:storage` workspace running in the current environment). It can be consumed two ways: as a remote MCP server that **Agent Creator** agents call as tools, or as a Builder app whose instructions you call directly from DSUL automations. It exposes the Storage REST API (vector stores, vector-store files, web crawling, RBAC access bindings, per-store API keys, agent skills and admin diagnostics) grouped into 7 entity tools covering 34 operations. Unlike third-party SaaS connectors, **this connector requires no credential to paste**. It runs in the installing workspace's app-instance context and propagates the caller's Prisme.ai identity to the Storage backend over the platform's cross-workspace forward-auth mechanism: every call inherits the user × workspace permissions of whoever triggered it, and the Storage backend enforces its own RBAC bindings on top. Agents are identified by the capability **Scope** `context_id,agent_id,user_id`; credentials are resolved server-side. > [card] Vector Stores & RAG > > Create vector stores, attach files (an uploaded platform file or a URL), download their sources, trigger reindex, run semantic search, monitor crawling. > [card] Access, Keys & Skills > > Grant/revoke RBAC bindings per principal, create and rotate per-store API keys, manage reusable agent skills. ## Who is this for? This connector is used by three different roles. Jump to the section that matches yours; each one is self-contained. > [card] Agent builder > > You build agents in **Agent Creator** and want them to manage files, vector stores and RAG. → *Agent builder* tab. > [card] Platform admin > > You run the platform and want to expose Storage as a reusable capability once for everyone. → *Platform admin setup* accordion below. > [card] Workspace builder > > You write Builder automations (DSUL) that call Storage instructions directly. → *Workspace builder* tab. ## Prerequisites * A Prisme.ai workspace with the **Prisme.ai Storage** app installed. * The Storage backend ships pre-wired to the **current environment** (sandbox or prod); there is **no `baseUrl`, service URL or API token to configure**. The connector resolves the Storage workspace via `slug:storage` and forwards the caller's authentication automatically. * The end user (or agent's calling user) must hold the appropriate **role on the target vector store / file**: * **`viewer`**: read files, list vector stores, run semantic search. * **`contributor`**: add/remove files in a vector store, trigger recrawls. * **`owner`**: manage access bindings, API keys and skills; delete vector stores. * **`admin`** (platform admin): `admin.getStats`, `admin.healthCheck`, cross-workspace listings (`scope=all`). * For URL-based ingestion (`vectorStoreFiles.add` with `url=…`), the URL must be reachable from the Storage backend (a public URL or a Prisme.ai `share_token`). > [accordion] Platform admin (Governance): one-time platform setup > > > [!NOTE] > > > > **No platform-level credential.** This connector carries no third-party API key; each workspace installs the app and the caller's Prisme.ai identity is forwarded to the Storage backend automatically. There is nothing to register in Studio Secrets and no per-tenant credential to provision. > > The only optional one-time task is to expose Storage as a reusable **capability** in AI Governance, so agent builders can enable it from the capability picker instead of pasting an MCP endpoint URL. > > ## Declare the capability in AI Governance > > **1. Open AI Governance > Capabilities** > > Create (or edit) a **Prisme.ai Storage** capability. > > **2. Point it at the MCP endpoint** > > Set the capability's MCP server URL to the connector's **MCP Endpoint** (read from the installed app instance), and set its **Scope** to: > > ```text theme={null} > context_id,agent_id,user_id > ``` > > The `agent_id` and `user_id` in the scope are what let the connector identify the calling agent and forward the user's identity to the Storage backend. > > **3. Make it available to agent builders** > > Once created, the capability appears in the capability picker for agent builders in your organization. Access to the catalog follows your organization's existing roles; there is no per-capability role grant for this connector. > > **4. Smoke-test** > > From an agent that has the capability, ask it to list vector stores or files. The call runs as the agent's user, and the Storage backend returns only the resources that user can see. > > > [!WARNING] > > > > Declaring the capability makes the connector **available**; it does not by itself authorize a specific agent against any data. Authorization is enforced by the **Storage backend's own RBAC bindings**, evaluated against the forwarded caller identity: a user (or agent's user) only ever sees the stores and files they hold a role on. There is no OAuth auth-config JSON to attach in Governance: authentication is the forwarded Prisme.ai identity, not a per-user OAuth flow. *** > [tab] Agent builder (Agent Creator) > > ## Agent builder > > **Goal:** let an agent you build in Agent Creator manage files, vector stores and RAG through the Storage MCP tools. > > > [!NOTE] > > > > Before an agent can call the connector, a *Workspace builder* must have installed the Prisme.ai Storage app in a workspace (see the *Workspace builder* tab), or a *Platform admin* must have published the capability in AI Governance (see the *Platform admin setup* accordion above). > > This connector runs in the **tenant app-instance context** and forwards the caller's Prisme.ai identity to the Storage backend. Your agent is identified by the `agent_id` and `user_id` that Agent Creator injects through the capability *Scope*; the Storage backend then enforces its own RBAC bindings against that user; there is no credential for the agent to hold or paste. > > **1. Get the MCP endpoint** > > Install the Prisme.ai Storage app in your workspace (see the *Workspace builder* tab) and copy its **MCP Endpoint** from the app instance configuration. If a *Platform admin* already published the capability, you can skip straight to the capability picker. > > **2. Add the capability to your agent** > > In your agent, add a capability pointing at the **MCP Endpoint** URL (or pick the published **Prisme.ai Storage** capability from the catalog), and set its **Scope** to: > > ```text theme={null} > context_id,agent_id,user_id > ``` > > The `agent_id` lets the connector identify the calling agent; `user_id` is what propagates the caller's identity to the Storage backend so its RBAC applies. Without `user_id` in the scope, calls run anonymously and the backend rejects them. > > **3. Use it** > > Ask the agent to manage files or knowledge; it calls the Storage tools, and every call is scoped to what the calling user is allowed to see. > > ## Brief the agent in its system prompt > > Wiring the capability is not enough; the agent must know the tools exist and when to reach for them. Copy-pasteable starter: > > ```text theme={null} > You have access to the Prisme.ai Storage MCP server. Use it whenever the user asks to manage vector stores (create, list, search), attach documents to a knowledge base (a file already uploaded to the platform, or a URL), list or download those documents, trigger a recrawl, manage RBAC bindings or per-store API keys. Calls run with the user's identity, so the user only sees stores and files they have access to. Always confirm with the user before destructive actions (vectorStoreFiles.delete, vectorStores.delete, access.revoke, apiKeys.revoke). > ``` > > Refine the trigger keywords (resource names, business domains, typical user phrasings) so the agent reliably picks up the right intent in your context. > > > [!NOTE] > > > > **Legacy AI Knowledge agents** (no native MCP picker): add the connector under **Advanced > Tools > MCP** and paste the **MCP Endpoint** URL. The agent's identity is still propagated so the Storage backend can resolve the caller's RBAC. > > ## Available Tools > > The MCP server exposes 7 entity-level tools, each with an `action` argument that selects the operation. Every tool also accepts an `outputFormat` argument (`verbose` default / `structured` / `both`). > > ### `vectorStores` > > | Tool | Description | > | - | - | > | `vectorStores` | Vector stores (RAG indexes). Actions: `list` (`scope` = `own`/`shared`/`all`), `create` (`name` + `embedding` object `{model, dimensions?}`, optional `chunking_strategy` object), `get`, `update`, `delete` (removes all files/chunks), `search` (`query` ≤2048 chars, optional `max_num_results`, `filters`, `ranking_options`), `reindexAll` (queues a reindex of every document and returns `202 {status, documents_queued}` before processing; `409 REINDEX_ALREADY_RUNNING` while one is being dispatched), `getAdminUrl` (pure URL formatter, no HTTP call). | > > ### `vectorStoreFiles` > > | Tool | Description | > | - | - | > | `vectorStoreFiles` | Files attached to a vector store. Actions: `list`, `add` (by `file_id` preferred, or `url` for backend ingestion; accepts `tags`, `metadata`, `force_recrawl`, `file_name`, `mime_type`, `headers`), `get`, `update`, `delete`, `getChunks` (debug), `reindex`, `getSourceUrl` (browser-usable URL of the document's source: a short-lived download link for uploaded files, the original URL otherwise). | > > ### `crawling` > > | Tool | Description | > | - | - | > | `crawling` | Web-crawling for a vector store. Actions: `getStatus`, `recrawl` (one or more `websites`), `getSourceCounts` (per-source page counts). | > > ### `access` > > | Tool | Description | > | - | - | > | `access` | RBAC access bindings on a vector store. Actions: `list`, `grant` (`principal_type`, `principal_id`, `role`), `update` (change role), `revoke`. | > > ### `apiKeys` > > | Tool | Description | > | - | - | > | `apiKeys` | Per-vector-store API keys. Actions: `list`, `create` (`name`, optional `slug`, `permissions`, `expiresAt`), `revoke`, `rotate` (mints a new secret, revokes the old one). | > > ### `skills` > > | Tool | Description | > | - | - | > | `skills` | Reusable agent skills (instructions + tools). Actions: `list` (optional `search`), `create` (`name`, `instructions`, optional `tools`), `get`, `update`, `delete`. | > > ### `admin` > > | Tool | Description | > | - | - | > | `admin` | Admin-only diagnostics. Actions: `getStats` (aggregate over `own`/`shared`/`all`), `healthCheck` (end-to-end). | > > ## Output Formats > > Every tool accepts an `outputFormat` argument that controls the MCP response shape: > > * **`verbose`** (default): human-readable text optimized for LLM consumption. > * **`structured`**: machine-readable JSON in `structuredContent`. > * **`both`**: the structured payload, with its JSON also rendered as text. > > ## Tool Details > > ### `vectorStores` (action: `create`) > > ```json theme={null} > { > "name": "vectorStores", > "arguments": { > "action": "create", > "name": "Customer Support KB", > "description": "Searchable knowledge base for the support team", > "embedding": { > "model": "text-embedding-3-large", > "dimensions": 3072 > }, > "chunking_strategy": { "type": "auto" } > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | Must be `create`. | > | `name` | Yes | Display name of the store. | > | `embedding` | Yes | Object `{ model, dimensions? }`: the embedding model. Never pass a string. | > | `description` | No | Free-text description. | > | `chunking_strategy` | No | Object `{type: "auto"}` (default) or `{type: "static", max_chunk_size_tokens, chunk_overlap_tokens}`. | > | `provider` | No | Vector index backend (`elasticsearch`/`opensearch`/`mock`); NOT the embedding provider. Omit for the workspace default. | > > ### `vectorStoreFiles` (action: `add`) > > ```json theme={null} > { > "name": "vectorStoreFiles", > "arguments": { > "action": "add", > "vector_store_id": "vs_01H...", > "file_id": "file_01H...", > "tags": ["onboarding", "v2"], > "metadata": { "owner": "support-team", "year": 2026 } > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | Must be `add`. | > | `vector_store_id` | Yes | Target vector store. | > | `file_id` | No | Id of a file already uploaded to the platform (alias of `native_file_id`). Either `file_id` OR `url` must be set. | > | `url` | No | Public URL: the backend ingests the file. **Note:** URL ingestion does not honor `file_name`; for filename control, upload the file to the platform first and pass its id as `file_id`. | > | `tags` | No | List of free-text tags for filtering at search time. | > | `metadata` | No | Structured metadata stored on the chunk. | > | `force_recrawl` | No | Re-ingest the URL even if a previous crawl was cached (also pass the original `url`). | > > ### `vectorStores` (action: `search`) > > ```json theme={null} > { > "name": "vectorStores", > "arguments": { > "action": "search", > "vector_store_id": "vs_01H...", > "query": "How do I reset my password?", > "max_num_results": 5, > "filters": { "key": "year", "type": "eq", "value": 2026 } > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | Must be `search`. | > | `vector_store_id` | Yes | Target vector store. | > | `query` | Yes | Natural-language query (max 2048 chars). | > | `max_num_results` | No | Number of chunks to return. | > | `filters` | No | Elasticsearch-like metadata filter, e.g. `{key, type: "eq", value}` or `{type: "and", filters: [...]}`. | > | `ranking_options` | No | Object, e.g. `{score_threshold: 0.5}`. | > > ### `access` (action: `grant`) > > ```json theme={null} > { > "name": "access", > "arguments": { > "action": "grant", > "vector_store_id": "vs_01H...", > "principal_type": "group", > "principal_id": "grp_01H...", > "role": "contributor" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | Must be `grant`. | > | `vector_store_id` | Yes | Target vector store. | > | `principal_type` | Yes | `user`, `group` or `apiKey`. | > | `principal_id` | Yes | ID of the principal. | > | `role` | Yes | `viewer`, `contributor` or `owner`. | > > ### `apiKeys` (action: `create`) > > ```json theme={null} > { > "name": "apiKeys", > "arguments": { > "action": "create", > "vector_store_id": "vs_01H...", > "name": "integration-test-suite", > "slug": "qa-tests", > "permissions": ["vector_store:read", "vector_store:search"], > "expiresAt": "2026-12-31T23:59:59Z" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | Must be `create`. | > | `vector_store_id` | Yes | Target vector store. | > | `name` | Yes | Human-readable key name. | > | `slug` | No | Stable identifier (recommended for traceability). | > | `permissions` | No | List of scopes the key may call. Default = same as the creator's role. | > | `expiresAt` | No | RFC3339 timestamp. Omit for non-expiring keys. | > > > [!WARNING] > > > > The plaintext API-key secret is returned only at creation time. Store it securely; the platform keeps only a hash. > [tab] Workspace builder (DSUL) > > ## Workspace builder > > ## Installation > > 1. Go to **Apps** in your workspace > 2. Search for **Prisme.ai Storage** and install it > 3. Open the app instance configuration; only the MCP endpoint is surfaced, and it is auto-populated on install. There is no credential to enter. > > ## Configuration > > | Field | Description | > | - | - | > | **MCP Endpoint** | Auto-populated on install: URL of the MCP endpoint for this app instance. | > > There is no third-party credential to configure. The connector forwards the caller's Prisme.ai identity to the Storage backend on every call, and the backend enforces its own RBAC bindings. > > | Auth mode | What you provide | Best for | > | - | - | - | > | **Forward-auth (default)** | Nothing; the caller's user × workspace identity is propagated automatically over cross-workspace forward-auth. | All standard use; calls run with the caller's permissions. | > | **`accessToken` override** | An explicit Storage token passed per call via the `accessToken` argument. | Server-to-server flows that must act as a specific principal rather than the caller. | > > > [!NOTE] > > > > The connector is pre-wired to the Storage backend of the **current environment** (sandbox or prod) via `slug:storage`; there is no `baseUrl` to set. Anonymous calls (no forwarded identity and no `accessToken`) are rejected by the Storage backend. > > ## Available Instructions > > Every instruction resolves identity from the caller's authenticated request. Vector-store-scoped operations target a `vector_store_id`; file operations take a `file_id`; cross-store operations take a `scope` (`own`, `shared`, or `all` for admins). > > ### Vector Stores > > | Instruction | Description | Returns | > | - | - | - | > | `listVectorStores` | List stores; `scope` (`own`/`shared`/`all`), `pageSize`, `page`, `status`, `agent_id`, `include_agents`. | `{ vector_stores: [{ id, name, status }], page }` | > | `createVectorStore` | Create a store; `name` + `embedding` object `{model, dimensions?}`; optional `chunking_strategy`, `metadata`, `provider`. | `{ id, name, embedding, status }` | > | `getVectorStore` | Retrieve a store by `vector_store_id`. | `{ id, name, description, embedding, status }` | > | `updateVectorStore` | Update `name`, `description`, `metadata`, `expires_after`, `chunking_strategy`. | `{ id, name, … }` | > | `deleteVectorStore` | Delete a store and all its files/chunks. | Empty (HTTP 204) | > | `searchVectorStore` | Semantic search; `query` (≤2048 chars), optional `max_num_results`, `filters`, `ranking_options`, `rewrite_query`. | `{ data: [{ score, content, metadata }] }` | > | `reindexAllFiles` | Queue a reindex of every document in the store; returns once the work is dispatched, before processing. `409 REINDEX_ALREADY_RUNNING` while a previous reindex is being dispatched. | `{ status, documents_queued }` (HTTP 202) | > | `getVectorStoreAdminUrl` | Format a deep-link to the store's admin page (no HTTP call). | `{ url }` | > > ### Vector Store Files > > | Instruction | Description | Returns | > | - | - | - | > | `listVectorStoreFiles` | List files in a store; `vector_store_id` + optional `status`, `limit`, `page`, `agent_id`. | `{ files: [{ id, name, status }], page }` | > | `addFileToVectorStore` | Attach a file by `file_id` (preferred) OR `url`; `tags`, `metadata`, `force_recrawl`, `file_name`, `mime_type`, `headers`. | `{ file_id, status }` | > | `getVectorStoreFile` | Retrieve a vector-store file's metadata by `vector_store_id` + `file_id`. | `{ id, name, status, tags, metadata }` | > | `updateVectorStoreFile` | Update a vector-store file's `tags` / `metadata`. | `{ id, tags, metadata }` | > | `deleteVectorStoreFile` | Detach (and delete) a file from a store. | Empty (HTTP 204) | > | `getVectorStoreFileChunks` | Return the embedded chunks of a file (debug); `limit`, `offset`. | `{ chunks: [{ content, metadata }] }` | > | `reindexVectorStoreFile` | Re-embed a single file; optional `force`. | `{ status }` | > | `getVectorStoreFileSourceUrl` | Resolve a browser-usable URL for a document's source by `vector_store_id` + `file_id`: a short-lived download link for uploaded files, the original URL otherwise. | `{ url, expires_at }` | > > ### Web Crawling > > | Instruction | Description | Returns | > | - | - | - | > | `getCrawlStatus` | Get the current crawl status of a store by `vector_store_id`. | `{ status, sources: [...] }` | > | `recrawlWebSources` | Trigger a recrawl of one or more `websites`. | `{ status }` | > | `getWebSourceCounts` | Get per-source page counts. | `{ counts: [{ url, pages }] }` | > > ### Access (RBAC) > > | Instruction | Description | Returns | > | - | - | - | > | `listVectorStoreAccess` | List RBAC bindings on a store; `limit`, `page`. | `{ bindings: [{ id, principal_type, principal_id, role }] }` | > | `grantVectorStoreAccess` | Grant access; `principal_type` (`user`/`group`/`apiKey`), `principal_id`, `role` (`viewer`/`contributor`/`owner`). | `{ id, role }` | > | `updateVectorStoreAccess` | Change the role of an existing binding. | `{ id, role }` | > | `revokeVectorStoreAccess` | Remove a binding. | Empty (HTTP 204) | > > ### API Keys > > | Instruction | Description | Returns | > | - | - | - | > | `listAPIKeys` | List API keys on a store; `limit`, `page`. | `{ keys: [{ id, name, slug, permissions }] }` | > | `createAPIKey` | Create a key; `name`, optional `slug`, `permissions`, `expiresAt`. | `{ id, secret, name, permissions }` (secret returned once) | > | `revokeAPIKey` | Revoke a key by `key_id`. | Empty (HTTP 204) | > | `rotateAPIKey` | Mint a new secret and revoke the old one. | `{ id, secret }` | > > ### Skills > > | Instruction | Description | Returns | > | - | - | - | > | `listSkills` | List reusable agent skills; optional `search`, `pageSize`, `page`. | `{ skills: [{ id, name, display_name }] }` | > | `createSkill` | Create a skill; `name`, `instructions`, optional `display_name`, `description`, `tools`. | `{ id, name, instructions }` | > | `getSkill` | Retrieve a skill by `skill_id`. | `{ id, name, instructions, tools }` | > | `updateSkill` | Update a skill's `name`, `display_name`, `description`, `instructions`, `tools`. | `{ id, … }` | > | `deleteSkill` | Delete a skill by `skill_id`. | Empty (HTTP 204) | > > ### Admin > > | Instruction | Description | Returns | > | - | - | - | > | `getStorageStats` | Aggregate stats over `scope` (`own`/`shared`/`all`); admin only. | `{ stores, files, chunks, … }` | > | `healthCheck` | End-to-end backend health check; admin only. | `{ status, checks: [...] }` | > > > [!NOTE] > > > > `Returns` shows the shape of the operation output. Calls run with the **caller's identity**; the Storage backend rejects anonymous calls. > > ## DSUL Examples > > **Add a file from a URL to a vector store:** > > ```yaml theme={null} > - Prisme.ai Storage.addFileToVectorStore: > vector_store_id: '{{knowledgeBaseId}}' > url: 'https://example.com/whitepapers/q2-results.pdf' > tags: > - quarterly-report > - q2 > metadata: > source: 'corporate-whitepapers' > year: 2026 > ``` > > **Create a vector store and grant access to a team:** > > ```yaml theme={null} > - Prisme.ai Storage.vectorStores: > action: create > name: 'Customer Support KB' > description: 'Searchable knowledge base for the support team' > embedding: > model: 'text-embedding-3-large' > dimensions: 3072 > chunking_strategy: > type: 'auto' > output: store > - Prisme.ai Storage.access: > action: grant > vector_store_id: '{{store.id}}' > principal_type: 'group' > principal_id: '{{supportTeamGroupId}}' > role: 'contributor' > ``` > > **Run a semantic search:** > > ```yaml theme={null} > - Prisme.ai Storage.vectorStores: > action: search > vector_store_id: '{{knowledgeBaseId}}' > query: '{{user.question}}' > max_num_results: 5 > filters: > key: 'year' > type: 'eq' > value: 2026 > output: hits > ``` > > **Trigger a recrawl after web sources changed:** > > ```yaml theme={null} > - Prisme.ai Storage.crawling: > action: recrawl > vector_store_id: '{{knowledgeBaseId}}' > websites: > - 'https://docs.example.com' > - 'https://blog.example.com' > ``` > > **Issue a per-store API key for an external client:** > > ```yaml theme={null} > - Prisme.ai Storage.apiKeys: > action: create > vector_store_id: '{{knowledgeBaseId}}' > name: 'integration-test-suite' > slug: 'qa-tests' > permissions: > - 'vector_store:read' > - 'vector_store:search' > expiresAt: '2026-12-31T23:59:59Z' > output: created > ``` *** ## Error Handling | HTTP code | Meaning | Typical cause | | - | - | - | | `400` | Bad Request | Missing required field (e.g. `embedding` on `createVectorStore`), invalid `principal_type`, malformed metadata filter. | | `401` | Unauthorized | The forward-auth chain did not propagate the caller's identity. The Storage backend rejects anonymous calls. | | `403` | Forbidden | The caller lacks the required role on the target store/file (e.g. `viewer` cannot add files; only `owner` can grant access). | | `404` | Not Found | Vector store / file / binding / skill does not exist. | | `409` | Conflict | Duplicate slug / unique-property collision (e.g. an API key with the same slug already exists). | | `429` | Rate Limited | Storage backend quota exceeded; back off and retry. | | `500` / `503` | Server Error | Transient backend failure; retry with exponential backoff. | ### Common Issues **"The calling agent could not be identified"**: The MCP capability *Scope* does not declare `agent_id` / `user_id`, so Agent Creator never injects the caller identity. Set the Scope to `context_id,agent_id,user_id` on the capability. **"Anonymous request rejected" (401)**: The caller's Prisme.ai identity did not make it through to the Storage backend. This usually means the call is being made from a tool client that does not propagate the workspace identity. Use the Agent Creator capability or call from a DSUL automation (both forward identity correctly), or pass an explicit `accessToken` override. **Forbidden on a store you can see (403)**: Listing a store does not imply write access. The operation requires a higher role (e.g. `contributor` to add files, `owner` to grant access or manage keys). Ask the store owner to grant the right binding via `access.grant`. **`addFileToVectorStore` ignored my `file_name` when using `url`**: URL-based ingestion of vector-store files drops the `file_name` argument. For filename control, upload the file to the platform first and then add it via `vectorStoreFiles.add` with its id as `file_id`. **`force_recrawl` had no effect**: Also pass the original `url` argument; the backend keys recrawl identity off the URL, not the `file_id`. **Empty list when listing vector stores**: By default `listVectorStores` returns only `scope: own`. Add `scope: shared` to include stores shared with you, or `scope: all` if you are a platform admin. ## External Resources > [card] [RAG & Vector Stores](/products/ai-knowledge/knowledge-bases) > > How vector stores, embeddings and the RAG crawling pipeline work in Prisme.ai. > [card] [Tool Agents](/products/agent-factory/capabilities) > > Learn how Agent Creator agents consume MCP tools and capabilities. # Tableau Source: https://docs.prisme.ai/apps-store/marketplace/connectors/tableau Let Agent Creator agents and Builder automations read and act on Tableau Cloud / Server (REST API 3.x, Metadata GraphQL, VizQL Data Service and Pulse), authenticated with a Personal Access Token. ![Tableau](https://mintcdn.com/prismeai/Oqq72tWGTtxufvRl/images/connectors/tableau.svg?fit=max\&auto=format\&n=Oqq72tWGTtxufvRl\&q=85\&s=a506c33f335437dc68a1c144f47a4a2a) The Tableau connector exposes the full Tableau platform (REST API 3.x, Metadata GraphQL, VizQL Data Service and Pulse) to your Prisme.ai workspaces. It can be consumed two ways: as a remote MCP server that **Agent Creator** agents call as tools, or as a Builder app whose instructions (`Tableau.`) you call directly from DSUL. Authentication is a Tableau **Personal Access Token** (PAT) you paste into the app configuration; the connector exchanges it server-side for a short-lived `X-Tableau-Auth` session token, so credentials are never exposed to the agent. > [card] Content & Permissions > > Browse, publish, download and govern projects, workbooks, views, datasources and Prep flows. Manage tags, permissions and revisions site-wide. > [card] Pulse & Subscriptions > > Manage Tableau Pulse metrics and definitions, retrieve BAN insights, and orchestrate email and Pulse subscriptions for end-users. > [card] Metadata & VizQL Queries > > Run arbitrary Metadata API GraphQL queries, search assets, walk workbook/datasource lineage and query published datasources via VizQL Data Service. ## Who is this for? This connector is used by three different roles. Jump to the section that matches yours; each one is self-contained. > [card] Agent builder > > You build agents in **Agent Creator** and want them to use Tableau. → *Agent builder* tab. > [card] Platform admin > > You run the platform and want to know what one-time setup Tableau needs. → *Platform admin setup* accordion below. > [card] Workspace builder > > You write Builder automations (DSUL) that call `Tableau.` directly. → *Workspace builder* tab. ## Prerequisites * A **Tableau Cloud** site or a **Tableau Server** installation reachable from Prisme.ai. * A **Personal Access Token** (PAT) created on the target site under **My Account Settings → Personal Access Tokens**. You need its **name** and its **secret** (the secret is shown only once, at creation). * The PAT belongs to a Tableau user; that user must exist on the site and own the rights you want to expose (the connector acts as that user). * The site `contentUrl` if you are not on the *Default* site (the segment after `/site/` in the browser URL). * Optionally, the **REST API version** to target (defaults to `3.21`; pin only if your Tableau Server release requires it). > [accordion] Platform admin (Governance): one-time platform setup > > > [!NOTE] > > > > **No platform-level credential is required.** Tableau uses the per-workspace credential model: each workspace pastes its own Personal Access Token in the app configuration, and the connector resolves it server-side. There is no shared platform key, no central OAuth client, and no per-user OAuth flow to register. > > ## Declare the capability in AI Governance (optional) > > To let agent builders pick Tableau from the capability catalog instead of pasting an MCP endpoint URL by hand, declare it once as a named capability. > > **1. Open AI Governance > Capabilities** > > Create (or edit) a **Tableau** capability. > > **2. Point it at the MCP endpoint** > > Set the capability's MCP server URL to a Tableau app instance's **MCP Endpoint**, and set its **Scope** to: > > ```text theme={null} > context_id,agent_id,user_id > ``` > > The `agent_id` in the scope lets the connector identify the calling agent. > > **3. Make it available to agent builders** > > Once created, the capability appears in the capability picker for agent builders in your organization. Access to the catalog follows your organization's existing roles; there is no per-capability role grant for this connector. > > > [!WARNING] > > > > Declaring the capability makes the connector **discoverable**; the Tableau credentials still live in the workspace that owns the app instance the capability points at. Each workspace that installs Tableau supplies its own PAT; there is no OAuth auth-config JSON to attach in Governance. *** > [tab] Agent builder (Agent Creator) > > ## Agent builder > > **Goal:** let an agent you build in Agent Creator query and act on Tableau through MCP tools. > > > [!NOTE] > > > > Before an agent can call the connector, a *Workspace builder* must have installed and configured the Tableau app in a workspace (see the *Workspace builder* tab) so a PAT and an **MCP Endpoint** exist. The *Platform admin setup* accordion above is optional (it only publishes a reusable capability). > > The Tableau credential is resolved server-side from the app configuration, never exposed to the agent. Your agent is identified by the `agent_id` that Agent Creator injects through the capability *Scope*. > > **1. Install and configure Tableau in a workspace** > > Follow the *Workspace builder* tab: install **Tableau** in a workspace and paste your Personal Access Token (`patName`, `patSecret`) plus `serverUrl` (and `siteContentUrl` if not the Default site). On install, an **MCP Endpoint** is generated automatically. > > **2. Add the MCP capability to your agent** > > In your agent in Agent Creator, add a capability pointing at that workspace's **MCP Endpoint** URL, and set its **Scope** to: > > ```text theme={null} > context_id,agent_id,user_id > ``` > > If a *Platform admin* has published a **Tableau** capability in the catalog (see the accordion above), pick it instead; the endpoint and Scope are already wired. > > **3. Use it** > > Ask the agent a Tableau question. It calls the relevant tool (`workbooks`, `views`, `vizqlData`, …) and grounds its answer on the result. > > ## Brief the agent in its system prompt > > Wiring the capability is not enough: the agent must know the tools exist and when to use them. Copy-pasteable starter: > > ```text theme={null} > You have access to the Tableau MCP server. Use it whenever the user asks about Tableau content (workbooks, views, datasources, projects, Prep flows, schedules, jobs, subscriptions, Pulse metrics or insights) or wants to query a published datasource via VizQL Data Service or run a Metadata API GraphQL query. Examples: "List the workbooks in the Marketing project", "Refresh the Sales datasource now", "Show the BAN insight for the Revenue metric", "What datasources feed the Quarterly Review workbook?". Prefer the vizqlData tool for analytical questions (aggregations, top N, filters). Prefer calling the tools directly over guessing, and confirm with the user before any destructive action (delete a workbook, cancel a job, remove a permission). > ``` > > Refine the trigger keywords (site names, project names, business domains, typical user phrasings) so the agent reliably picks up the right intent in your context. > > > [!NOTE] > > > > **Legacy AI Knowledge agents** (no native MCP picker): add the connector under **Advanced > Tools > MCP** and paste the **MCP Endpoint** URL of the Tableau app instance. > > ## Available Tools > > The Tableau MCP follows a dispatcher pattern: each tool exposes multiple operations selected by an `action` argument. The argument list per action is documented in the tool's own `description`. > > ### Sites & Users > > | Tool | Description | > | - | - | > | `sites` | Manage Tableau sites (Server-only ops; on Tableau Cloud most actions return 403). Actions: `list`, `create`, `get`, `update`, `delete`, `getRecentlyViewed`. | > | `users` | Manage users on a site. Actions: `list`, `get`, `addToSite`, `update`, `removeFromSite`, `getGroups`. | > | `groups` | Manage user groups. Actions: `list`, `create`, `update`, `delete`, `addUser`, `removeUser`, `getUsers`. | > > ### Content (Projects, Workbooks, Views) > > | Tool | Description | > | - | - | > | `projects` | Manage Tableau content projects (folders). Actions: `list`, `create`, `update`, `delete`. | > | `workbooks` | Manage workbooks: CRUD, downloads (twb/twbx, PDF, PowerPoint, preview), revisions, connections, permissions, tags. Binary downloads are not inline; call `get` and share `webpageUrl`. | > | `views` | Manage views: image/PDF/CSV/Excel exports, lookup by id or path, server-side data filters, permissions and tags. | > > ### Datasources & Flows > > | Tool | Description | > | - | - | > | `datasources` | Manage published datasources: CRUD, downloads, revisions, connections, permissions, tags, immediate extract refresh (`updateNow`). | > | `flows` | Manage Tableau Prep flows: CRUD, run, run history, downloads, connections, permissions. | > > ### Scheduling, Jobs & Refresh Tasks > > | Tool | Description | > | - | - | > | `schedules` | Server schedules + add workbook/datasource/flow tasks to them. | > | `jobs` | Inspect background jobs: `list`, `get` status, `cancel`. | > | `extractRefreshTasks` | Manage extract refresh tasks (one-shot or scheduled): `list`, `get`, `run`, `delete`. | > > ### Subscriptions, Webhooks & Favorites > > | Tool | Description | > | - | - | > | `subscriptions` | Email subscriptions to views/workbooks. Actions: `list`, `get`, `create`, `update`, `delete`. | > | `webhooks` | Tableau webhooks (event notifications). Actions: `list`, `get`, `create`, `update`, `delete`, `test`. | > | `favorites` | Per-user favorites. Actions: `list`, `add`, `delete`. | > > ### Tableau Pulse > > | Tool | Description | > | - | - | > | `metrics` | Pulse metrics (instances). Actions: `list`, `get`, `create`, `delete`. | > | `metricDefinitions` | Pulse metric definitions (templates). Actions: `list`, `get`, `create`, `update`, `delete`. | > | `pulseSubscriptions` | Pulse subscriptions to metrics. Actions: `list`, `create`, `delete`. | > | `insights` | Get a Pulse Basic Analytics Narrative (BAN) insight for a metric. Action: `get`. | > > ### Metadata & VizQL Data Service > > | Tool | Description | > | - | - | > | `metadata` | Tableau Metadata API (GraphQL). Actions: `query`, `search`, `workbookLineage`, `datasourceLineage`. | > | `vizqlData` | Query a published datasource via VizQL Data Service, the preferred tool for analytical questions. Actions: `readMetadata`, `queryDatasource`. | > > ## Output Formats > > Every tool accepts an `outputFormat` argument that controls the MCP response shape: > > * **`verbose`** (default): human-readable text for LLM consumption. > > * **`structured`**: machine-readable JSON in `structuredContent`. > > * **`both`**: both text and structured content. > > > [!NOTE] > > > > Binary outputs (workbook/view image, PDF, PowerPoint, crosstab Excel, file downloads) cannot be returned inline. The connector instead returns metadata; call `get` and share the `webpageUrl`, or use `views`/`getData` and `vizqlData` for the underlying data. > > ## Tool Details > > ### `workbooks` > > ```json theme={null} > { > "name": "workbooks", > "arguments": { > "action": "list", > "filter": "projectName:eq:Marketing", > "pageSize": 50 > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | One of `list`, `get`, `queryViews`, `getConnections`, `getRevisions`, `queryPermissions`, `publish`, `update`, `updateNow`, `updateConnection`, `delete`, `addPermissions`, `deletePermission`, `addTags`, `deleteTag`, plus the binary `download*` actions. | > | `workbookId` | Conditional | Required for any per-workbook action. | > | `request_payload` | Conditional | Required for `publish`. The workbook XML metadata. | > | `permissions` | Conditional | Required for `addPermissions`. Tableau capabilities granted to grantees. | > | `tags` | Conditional | Required for `addTags`. Tag set object. | > > ### `views` > > ```json theme={null} > { > "name": "views", > "arguments": { > "action": "getData", > "viewId": "{{viewId}}", > "viewFilters": { "Region": "EMEA" } > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | One of `list`, `get`, `getByPath`, `getData`, `getSummaryData`, `queryPermissions`, `addPermissions`, `deletePermission`, `addTags`, `deleteTag`, plus the binary `getImage` / `getPdf` / `getCrosstabExcel`. | > | `viewId` | Conditional | Required for any action targeting a view by id. | > | `viewUrl` | Conditional | Required for `getByPath` (`Workbook/sheets/Sheet`). | > | `viewFilters` | No | Server-side filters for `getData` / `getSummaryData`: `{"Field": "value"}` sent as `vf_=`. | > > ### `datasources` > > ```json theme={null} > { > "name": "datasources", > "arguments": { > "action": "updateNow", > "datasourceId": "{{datasourceId}}" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | One of `list`, `get`, `getConnections`, `getRevisions`, `queryPermissions`, `publish`, `update`, `updateNow` (triggers an extract refresh), `updateConnection`, `delete`, `addPermissions`, `deletePermission`, `addTags`, `deleteTag`, plus binary `download*`. | > | `datasourceId` | Conditional | Required for any per-datasource action. | > | `connectionId` | Conditional | Required for `updateConnection`. | > | `datasource` | Conditional | Required for `update`. Datasource settings object. | > > ### `metadata` > > ```json theme={null} > { > "name": "metadata", > "arguments": { > "action": "search", > "name": "Sales" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | One of `query`, `search`, `workbookLineage`, `datasourceLineage`. | > | `query` | Conditional | GraphQL document. Required for `query`. | > | `variables` | No | Variables map for the GraphQL query. | > | `name` | Conditional | Exact-name match used by `search` (the Metadata API has no fuzzy search). | > | `workbookLuid` | Conditional | Required for `workbookLineage`. | > | `datasourceLuid` | Conditional | Required for `datasourceLineage`. | > > ### `vizqlData` > > ```json theme={null} > { > "name": "vizqlData", > "arguments": { > "action": "queryDatasource", > "datasource": { "datasourceLuid": "{{datasourceLuid}}" }, > "query": { > "fields": [ > { "fieldCaption": "Region" }, > { "fieldCaption": "Sales", "function": "SUM" } > ] > } > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | `readMetadata` or `queryDatasource`. Always `readMetadata` first to discover exact field captions. | > | `datasource` | Yes | Object with `datasourceLuid` (from `workbooks`/`getConnections` or `datasources`/`list`). | > | `query` | Conditional | Required for `queryDatasource`. Must contain a `fields` array; supports `filters` (SET, QUANTITATIVE\_\*, MATCH, TOP) and aggregation `function` (SUM, AVG, COUNTD, …). | > | `options` | No | `returnFormat` (`OBJECTS` / `ARRAYS`), `debug`. | > > ### `pulseSubscriptions` > > ```json theme={null} > { > "name": "pulseSubscriptions", > "arguments": { > "action": "create", > "subscription": { > "metric_id": "{{metricId}}", > "user_id": "{{userId}}" > } > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | `list`, `create` or `delete`. | > | `subscription` | Conditional | Required for `create`. Must include `metric_id` and `user_id`. | > | `subscriptionId` | Conditional | Required for `delete`. | > | `metric_id` / `user_id` | No | Filters for `list`. | > [tab] Workspace builder (DSUL) > > ## Workspace builder > > ## Installation > > 1. Go to **Apps** in your workspace > 2. Search for **Tableau** and install it > 3. Open the app instance configuration and fill in the Personal Access Token fields (`patName`, `patSecret`, `serverUrl`, and `siteContentUrl` if you are not on the Default site) > > ## Configuration > > | Field | Type | Required | Description | > | - | - | - | - | > | `serverUrl` | string | Yes | Full URL of the Tableau pod / Server (e.g. `https://10ax.online.tableau.com`). No trailing slash. | > | `siteContentUrl` | string | No | Site identifier from the URL (after `/site/`). Leave empty for the *Default* site on Tableau Server. | > | `patName` | string | Yes | Personal Access Token **name** (My Account Settings → Personal Access Tokens). | > | `patSecret` | string (secret) | Yes | Personal Access Token **secret value**. Stored as a workspace secret. Shown only once at creation. | > | `apiVersion` | string | No | REST API version. Defaults to `3.21`. | > | `mcpEndpoint` | string | Auto-populated on install | Endpoint URL of this app instance's MCP server; give this to the *Agent builder* tab. | > > The connector exchanges the PAT for an `X-Tableau-Auth` session token via `POST /api/{apiVersion}/auth/signin` and caches it (\~3h). The auth mode is fixed: > > | Auth mode | What you provide | Best for | > | - | - | - | > | **Personal Access Token (PAT)** | `patName` + `patSecret` for a Tableau user | All Tableau Cloud and Server setups; no per-user OAuth flow needed | > > > [!NOTE] > > > > A Tableau PAT allows a single active session, so a concurrent sign-in elsewhere (a script, another tool, a parallel agent run) revokes the cached token. The connector handles this with a retry-on-401 that forces a fresh sign-in; occasional revocations are transparent. > > ## Available Instructions > > Every instruction resolves credentials from the workspace configuration and reuses the cached `X-Tableau-Auth` session token. > > ### Sites & Users > > | Instruction | Description | Returns | > | - | - | - | > | `Tableau.listSites` | List sites the current user can access. `pageNumber`, `pageSize` paginate. | `{ sites: [{ id, name, contentUrl }], pagination }` | > | `Tableau.createSite` | Create a site (Tableau Server only): `site` = `{ name, contentUrl, adminMode, state }`. | `{ site }` | > | `Tableau.getSite` | Get a site by `key`. | `{ site }` | > | `Tableau.updateSite` | Update site settings: `site`. | `{ site }` | > | `Tableau.deleteSite` | Delete a site by `siteId`. | Empty (HTTP 204) | > | `Tableau.getRecentlyViewed` | Recently viewed content for the current user. | `{ recentlyViewed: { recents } }` | > | `Tableau.listUsers` | List users on the site: `filter`, `sort`, `fields`, pagination. | `{ users: [{ id, name, siteRole }], pagination }` | > | `Tableau.getUser` | Get a user by `userId`. | `{ user }` | > | `Tableau.addUserToSite` | Add a user: `user` = `{ name, siteRole, authSetting }`. | `{ user }` | > | `Tableau.updateUser` | Update a user (`userId`, `user`). | `{ user }` | > | `Tableau.removeUserFromSite` | Remove a user (`userId`, optional `mapAssetsTo`). | Empty (HTTP 204) | > | `Tableau.getUserGroups` | List groups a user belongs to (`userId`). | `{ groups, pagination }` | > | `Tableau.listGroups` | List groups: `filter`, `sort`, pagination. | `{ groups, pagination }` | > | `Tableau.createGroup` | Create a local or AD/SCIM group: `group`, `asJob`. | `{ group }` | > | `Tableau.updateGroup` | Update a group (`groupId`, `group`, `asJob`). | `{ group }` | > | `Tableau.deleteGroup` | Delete a group (`groupId`). | Empty (HTTP 204) | > | `Tableau.addUserToGroup` | Add a user to a group (`groupId`, `user`). | `{ user }` | > | `Tableau.removeUserFromGroup` | Remove a user from a group (`groupId`, `userId`). | Empty (HTTP 204) | > | `Tableau.getGroupUsers` | List users in a group (`groupId`). | `{ users, pagination }` | > > ### Projects, Workbooks & Views > > | Instruction | Description | Returns | > | - | - | - | > | `Tableau.listProjects` | List projects: `filter`, `sort`, pagination. | `{ projects: [{ id, name, parentProjectId }], pagination }` | > | `Tableau.createProject` | Create a project: `project`, `publishSamples`. | `{ project }` | > | `Tableau.updateProject` | Update a project (`projectId`, `project`). | `{ project }` | > | `Tableau.deleteProject` | Delete a project (`projectId`). | Empty (HTTP 204) | > | `Tableau.listWorkbooks` | List workbooks: `filter`, `sort`, `fields`, pagination. | `{ workbooks: [{ id, name, projectId, webpageUrl }], pagination }` | > | `Tableau.getWorkbook` | Get a workbook by `workbookId`. | `{ workbook }` | > | `Tableau.publishWorkbook` | Publish a workbook: file payload + `request_payload` XML, `overwrite`, `asJob`. | `{ workbook }` | > | `Tableau.updateWorkbook` | Update a workbook (`workbookId`, `workbook`). | `{ workbook }` | > | `Tableau.updateWorkbookNow` | Trigger an immediate extract refresh (`workbookId`). | `{ job }` | > | `Tableau.deleteWorkbook` | Delete a workbook (`workbookId`). | Empty (HTTP 204) | > | `Tableau.downloadWorkbook` | Download `.twb` / `.twbx` (`workbookId`, `includeExtract`). | Binary (twb/twbx) | > | `Tableau.downloadWorkbookPdf` | Render workbook as PDF (`workbookId`, `type`, `orientation`, `maxAge`). | Binary (PDF) | > | `Tableau.downloadWorkbookPreviewImage` | Workbook preview image (`workbookId`). | Binary (image) | > | `Tableau.downloadWorkbookPowerPoint` | Export workbook to PowerPoint (`workbookId`, `maxAge`). | Binary (pptx) | > | `Tableau.downloadWorkbookRevision` | Download a specific revision (`workbookId`, `revisionNumber`). | Binary (twb/twbx) | > | `Tableau.getWorkbookRevisions` | List workbook revisions (`workbookId`). | `{ revisions, pagination }` | > | `Tableau.queryViewsForWorkbook` | Views in a workbook (`workbookId`, `includeUsageStatistics`). | `{ views: [{ id, name }] }` | > | `Tableau.getWorkbookConnections` | Data connections of a workbook (`workbookId`). | `{ connections: [{ id, datasource }] }` | > | `Tableau.updateWorkbookConnection` | Update a connection (`workbookId`, `connectionId`, `connection`). | `{ connection }` | > | `Tableau.queryWorkbookPermissions` | Permissions on a workbook (`workbookId`). | `{ permissions }` | > | `Tableau.addWorkbookPermissions` | Grant permissions (`workbookId`, `permissions`). | `{ permissions }` | > | `Tableau.deleteWorkbookPermission` | Revoke one capability (`workbookId`, `granteeType`, `granteeId`, `capabilityName`, `capabilityMode`). | Empty (HTTP 204) | > | `Tableau.addTagsToWorkbook` | Add tags (`workbookId`, `tags`). | `{ tags }` | > | `Tableau.deleteTagFromWorkbook` | Remove a tag (`workbookId`, `tagName`). | Empty (HTTP 204) | > | `Tableau.listViewsForSite` | List views site-wide: `filter`, `includeUsageStatistics`, pagination. | `{ views, pagination }` | > | `Tableau.getView` | Get a view by `viewId` (returns `webpageUrl`). | `{ view }` | > | `Tableau.getViewByPath` | Resolve a view by URL path (`viewUrl`). | `{ view }` | > | `Tableau.getViewImage` | Render a view as PNG (`viewId`, `resolution`, `maxAge`). | Binary (image) | > | `Tableau.getViewPdf` | Render a view as PDF (`viewId`, `type`, `orientation`, `maxAge`). | Binary (PDF) | > | `Tableau.getViewData` | View underlying data as CSV (`viewId`, server-side `viewFilters`). | CSV text | > | `Tableau.getViewCrosstabExcel` | View crosstab as Excel (`viewId`, `maxAge`). | Binary (xlsx) | > | `Tableau.getViewSummaryData` | View summary data as CSV (`viewId`). | CSV text | > | `Tableau.queryViewPermissions` | Permissions on a view (`viewId`). | `{ permissions }` | > | `Tableau.addViewPermissions` | Grant permissions (`viewId`, `permissions`). | `{ permissions }` | > | `Tableau.deleteViewPermission` | Revoke one capability (`viewId`, `granteeType`, `granteeId`, `capabilityName`, `capabilityMode`). | Empty (HTTP 204) | > | `Tableau.addTagsToView` | Add tags (`viewId`, `tags`). | `{ tags }` | > | `Tableau.deleteTagFromView` | Remove a tag (`viewId`, `tagName`). | Empty (HTTP 204) | > > ### Datasources & Flows > > | Instruction | Description | Returns | > | - | - | - | > | `Tableau.listDatasources` | List published datasources: `filter`, `sort`, pagination. | `{ datasources: [{ id, name, projectId }], pagination }` | > | `Tableau.getDatasource` | Get a datasource by `datasourceId`. | `{ datasource }` | > | `Tableau.publishDatasource` | Publish a datasource: file payload + `request_payload`, `overwrite`, `append`, `asJob`. | `{ datasource }` | > | `Tableau.updateDatasource` | Update a datasource (`datasourceId`, `datasource`). | `{ datasource }` | > | `Tableau.updateDatasourceNow` | Trigger an immediate extract refresh (`datasourceId`). | `{ job }` | > | `Tableau.deleteDatasource` | Delete a datasource (`datasourceId`). | Empty (HTTP 204) | > | `Tableau.downloadDatasource` | Download `.tds` / `.tdsx` (`datasourceId`, `includeExtract`). | Binary (tds/tdsx) | > | `Tableau.downloadDatasourceRevision` | Download a specific revision (`datasourceId`, `revisionNumber`). | Binary (tds/tdsx) | > | `Tableau.getDatasourceRevisions` | List revisions (`datasourceId`). | `{ revisions, pagination }` | > | `Tableau.getDatasourceConnections` | Data connections (`datasourceId`). | `{ connections }` | > | `Tableau.updateDatasourceConnection` | Update a connection (`datasourceId`, `connectionId`, `connection`). | `{ connection }` | > | `Tableau.queryDatasourcePermissions` | Permissions on a datasource (`datasourceId`). | `{ permissions }` | > | `Tableau.addDatasourcePermissions` | Grant permissions (`datasourceId`, `permissions`). | `{ permissions }` | > | `Tableau.deleteDatasourcePermission` | Revoke one capability (`datasourceId`, `granteeType`, `granteeId`, `capabilityName`, `capabilityMode`). | Empty (HTTP 204) | > | `Tableau.addTagsToDatasource` | Add tags (`datasourceId`, `tags`). | `{ tags }` | > | `Tableau.deleteTagFromDatasource` | Remove a tag (`datasourceId`, `tagName`). | Empty (HTTP 204) | > | `Tableau.listFlows` | List Prep flows: `filter`, `sort`, pagination. | `{ flows, pagination }` | > | `Tableau.getFlow` | Get a flow by `flowId`. | `{ flow }` | > | `Tableau.downloadFlow` | Download a flow file (`flowId`). | Binary (tfl/tflx) | > | `Tableau.deleteFlow` | Delete a flow (`flowId`). | Empty (HTTP 204) | > | `Tableau.runFlow` | Start a flow run (`flowId`, `flowRunSpec`). | `{ flowRun }` | > | `Tableau.getFlowRunStatus` | Status of a flow run (`flowRunId`). | `{ flowRun }` | > | `Tableau.listFlowRuns` | List flow runs: `filter`, pagination. | `{ flowRuns, pagination }` | > | `Tableau.getFlowConnections` | Connections of a flow (`flowId`). | `{ connections }` | > | `Tableau.queryFlowPermissions` | Permissions on a flow (`flowId`). | `{ permissions }` | > | `Tableau.addFlowPermissions` | Grant permissions (`flowId`, `permissions`). | `{ permissions }` | > | `Tableau.deleteFlowPermission` | Revoke one capability (`flowId`, `granteeType`, `granteeId`, `capabilityName`, `capabilityMode`). | Empty (HTTP 204) | > > ### Scheduling, Jobs & Refresh Tasks > > | Instruction | Description | Returns | > | - | - | - | > | `Tableau.listSchedules` | List server-wide schedules (pagination). | `{ schedules, pagination }` | > | `Tableau.getSchedule` | Get a schedule (`scheduleId`). | `{ schedule }` | > | `Tableau.createSchedule` | Create a server schedule: `schedule` = `{ name, priority, type, frequency, frequencyDetails }`. | `{ schedule }` | > | `Tableau.updateSchedule` | Update a schedule (`scheduleId`, `schedule`). | `{ schedule }` | > | `Tableau.deleteSchedule` | Delete a schedule (`scheduleId`). | Empty (HTTP 204) | > | `Tableau.addWorkbookToSchedule` | Add a workbook task to a schedule (`scheduleId`, `task`). | `{ task }` | > | `Tableau.addDatasourceToSchedule` | Add a datasource task to a schedule (`scheduleId`, `task`). | `{ task }` | > | `Tableau.addFlowTaskToSchedule` | Add a flow run task to a schedule (`scheduleId`, `task`). | `{ task }` | > | `Tableau.listJobs` | List background jobs: `filter`, pagination. | `{ backgroundJobs, pagination }` | > | `Tableau.getJob` | Get a job's status (`jobId`). | `{ job }` | > | `Tableau.cancelJob` | Cancel a running job (`jobId`). | Empty (HTTP 204) | > | `Tableau.listExtractRefreshTasks` | List extract refresh tasks (pagination). | `{ tasks, pagination }` | > | `Tableau.getExtractRefreshTask` | Get an extract refresh task (`taskId`). | `{ task }` | > | `Tableau.runExtractRefreshTask` | Run an extract refresh task now (`taskId`). | `{ job }` | > | `Tableau.deleteExtractRefreshTask` | Delete an extract refresh task (`taskId`). | Empty (HTTP 204) | > > ### Subscriptions, Webhooks & Favorites > > | Instruction | Description | Returns | > | - | - | - | > | `Tableau.listSubscriptions` | List subscriptions: `filter`, pagination. | `{ subscriptions, pagination }` | > | `Tableau.getSubscription` | Get a subscription (`subscriptionId`). | `{ subscription }` | > | `Tableau.createSubscription` | Create a subscription: `subscription` = `{ subject, content, schedule, user }`. | `{ subscription }` | > | `Tableau.updateSubscription` | Update a subscription (`subscriptionId`, `subscription`). | `{ subscription }` | > | `Tableau.deleteSubscription` | Delete a subscription (`subscriptionId`). | Empty (HTTP 204) | > | `Tableau.listWebhooks` | List webhooks (pagination). | `{ webhooks }` | > | `Tableau.getWebhook` | Get a webhook (`webhookId`). | `{ webhook }` | > | `Tableau.createWebhook` | Create a webhook: `webhook` = `{ name, event, destination }`. | `{ webhook }` | > | `Tableau.updateWebhook` | Update a webhook (`webhookId`, `webhook`). | `{ webhook }` | > | `Tableau.deleteWebhook` | Delete a webhook (`webhookId`). | Empty (HTTP 204) | > | `Tableau.testWebhook` | Fire a test event for a webhook (`webhookId`). | `{ webhookTestResult }` | > | `Tableau.listFavoritesForUser` | List a user's favorites (`userId`). | `{ favorites }` | > | `Tableau.addFavorite` | Add a favorite (`userId`, `favorite`). | `{ favorites }` | > | `Tableau.deleteFavorite` | Remove a favorite (`userId`, `contentType`, `contentId`). | Empty (HTTP 204) | > > ### Tableau Pulse > > | Instruction | Description | Returns | > | - | - | - | > | `Tableau.listMetrics` | List Pulse metrics: `definition_id`, `page_size`, `page_token`. | `{ metrics, next_page_token }` | > | `Tableau.getMetric` | Get a Pulse metric (`metricId`). | `{ metric }` | > | `Tableau.createMetric` | Create a Pulse metric: `metric` = `{ definition_id, specification }`. | `{ metric }` | > | `Tableau.deleteMetric` | Delete a Pulse metric (`metricId`). | Empty (HTTP 204) | > | `Tableau.listMetricDefinitions` | List Pulse metric definitions: `view`, `page_size`, `page_token`. | `{ definitions, next_page_token }` | > | `Tableau.getMetricDefinition` | Get a metric definition (`definitionId`, `view`). | `{ definition }` | > | `Tableau.createMetricDefinition` | Create a metric definition: `definition` = `{ name, specification }`. | `{ definition }` | > | `Tableau.updateMetricDefinition` | Update a metric definition (`definitionId`, `definition`). | `{ definition }` | > | `Tableau.deleteMetricDefinition` | Delete a metric definition (`definitionId`). | Empty (HTTP 204) | > | `Tableau.getInsight` | Get a Pulse BAN insight: `bundle_request`. | `{ bundle_response }` | > | `Tableau.listPulseSubscriptions` | List Pulse subscriptions: `metric_id`, `user_id`, paging. | `{ subscriptions, next_page_token }` | > | `Tableau.createPulseSubscription` | Create a Pulse subscription: `subscription` = `{ metric_id, user_id }`. | `{ subscription }` | > | `Tableau.deletePulseSubscription` | Delete a Pulse subscription (`subscriptionId`). | Empty (HTTP 204) | > > ### Metadata & VizQL Data Service > > | Instruction | Description | Returns | > | - | - | - | > | `Tableau.metadataQuery` | Execute an arbitrary Metadata API GraphQL query (`query`, `variables`). | `{ data }` (GraphQL response) | > | `Tableau.searchAssets` | Find workbooks/datasources by exact name (`name`, `first`). | `{ data: { … } }` | > | `Tableau.getWorkbookLineage` | Upstream lineage of a workbook (`workbookLuid`). | `{ data: { workbooks } }` | > | `Tableau.getDatasourceLineage` | Upstream/downstream lineage of a datasource (`datasourceLuid`). | `{ data: { publishedDatasources } }` | > | `Tableau.readMetadata` | VizQL: discover field captions of a datasource (`datasource`, `options`). | `{ data: [{ fieldCaption, dataType }] }` | > | `Tableau.queryDatasource` | VizQL: query a published datasource (`datasource`, `query`, `options`). | `{ data: [{ … }] }` | > > > [!NOTE] > > > > `Returns` shows the shape of the operation output. Binary instructions (`download*`, `getViewImage`, `getViewPdf`, `getViewCrosstabExcel`) return file content, not JSON. > > ## DSUL Examples > > ### List the workbooks in a project > > ```yaml theme={null} > - Tableau.listWorkbooks: > filter: 'projectName:eq:Marketing' > pageSize: 50 > output: workbooks > ``` > > ### Trigger an immediate extract refresh on a datasource > > ```yaml theme={null} > - Tableau.updateDatasourceNow: > datasourceId: '{{datasourceId}}' > output: refreshJob > > - Tableau.getJob: > jobId: '{{refreshJob.job.id}}' > output: jobStatus > ``` > > ### Search assets and walk the workbook lineage > > ```yaml theme={null} > - Tableau.searchAssets: > name: 'Sales Performance' > first: 10 > output: matches > > - Tableau.getWorkbookLineage: > workbookLuid: '{{matches.0.luid}}' > output: lineage > ``` > > ### Query a published datasource via VizQL Data Service > > ```yaml theme={null} > - Tableau.queryDatasource: > datasource: > datasourceLuid: '{{datasourceLuid}}' > query: > fields: > - fieldCaption: 'Region' > - fieldCaption: 'Sales' > function: 'SUM' > output: rows > ``` > > ### Create a Pulse subscription for a user > > ```yaml theme={null} > - Tableau.createPulseSubscription: > subscription: > metric_id: '{{metricId}}' > user_id: '{{userId}}' > output: subscription > ``` *** ## Security The answers that hold for every connector (agent access, shared knowledge bases, credentials, models, egress) are on [Connector security](/apps-store/marketplace/connectors/security). This section lists what is specific to Tableau. | Topic | Tableau | | - | - | | Authentication family | Technical account or API key: one Tableau personal access token (name and secret, the only mode), exchanged for a session token at sign-in. Tableau sees the owner of the token for every caller. | | Production modes | Personal access token | | Modes to avoid in production | None: the personal access token is the only mode. Create it on a dedicated account with a read-only role, keep it in the workspace secrets and rotate it. | | Read-only rights | The **Viewer** site role on the token's owner, on the site set in **Site Content URL**. Project, workbook and data source permissions still apply on top of it. | | Agent allowlist | No: access is controlled by installing the connector and by its signed API key. | | Per-reader access control on knowledge bases | Not applicable: this connector does not feed knowledge bases. | | Outbound hosts | The **Tableau Server URL** set at installation: your Tableau Cloud pod or your Tableau Server. | | Audit events | None specific to this connector | The connector exposes administrative operations (sites, users, groups, permissions, schedules, webhooks, deletions): with the **Viewer** site role, Tableau refuses them. A personal access token allows a single active session, so any other sign-in with the same token ends the connector's session: create a token used by the connector only. *** ## Error Handling | HTTP code | Meaning | Typical cause | | - | - | - | | 400 | Bad Request | Missing or malformed `action`, invalid filter, missing required parameter for the chosen action. | | 401 | Unauthorized | The PAT was rejected or the session token expired/was revoked. Check `patName` / `patSecret`; a concurrent sign-in with the same PAT revokes the session. | | 403 | Forbidden | The PAT's user lacks the right, or the action is Tableau Server-only and you are on Tableau Cloud (e.g. site CRUD). | | 404 | Not Found | The targeted resource does not exist on this site, or `siteContentUrl` is wrong. | | 409 | Conflict | Trying to `publish` over an existing asset without `overwrite: true`, or a name collision. | | 429 | Too Many Requests | Tableau API rate limit hit. Retry with exponential backoff. | | 500 | Internal Server Error | Transient Tableau Server error. Retry; if it persists, check the Tableau status page. | ### Common Issues **"Tableau auth not configured"**: The app instance has no PAT. Create a Personal Access Token on your Tableau site (My Account Settings → Personal Access Tokens) and paste `patName`, `patSecret` and `serverUrl` in the app configuration. **"Tableau signin failed (401)"**: The provided PAT was rejected by Tableau, or the cached session was revoked. A Tableau PAT allows only one active session, so a parallel sign-in (a script, another tool) invalidates it. Re-copy the secret, or retry; the connector forces a fresh sign-in on a 401. **"Site not found" / wrong site**: Check `siteContentUrl`. On Tableau Cloud it is the segment after `/site/` in the browser URL; on Tableau Server's *Default* site, leave it empty. **Tableau Server-only operation on Tableau Cloud**: Several site- and schedule-management actions (`sites.create`, `sites.update`, `schedules.create`, …) are only available on Tableau Server and return `403` on Tableau Cloud. Check the Tableau REST API reference for the current allow-list. **VizQL `queryDatasource` returns `403 "API access permission"`**: A Tableau administrator must grant **API Access** on the published datasource before the VizQL Data Service can query it. ## External Resources > [card] [Tableau REST API Reference](https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api.htm) > > Official documentation for the Tableau REST API 3.x, Metadata API, VizQL Data Service and Pulse. > [card] [Tool Agents](/products/agent-factory/capabilities) > > Learn how Agent Creator agents consume MCP tools and capabilities in Prisme.ai. # WebDAV Source: https://docs.prisme.ai/apps-store/marketplace/connectors/webdav Browse, read and write files on any WebDAV server (Nextcloud, ownCloud, generic HTTPS WebDAV) from Agent Creator agents and Builder workflows ![WebDAV](https://mintcdn.com/prismeai/wAgJDx_RXqITi8An/images/connectors/webdav.jpg?fit=max\&auto=format\&n=wAgJDx_RXqITi8An\&q=85\&s=643bffa972b173a0eeb655244c0684a2) The WebDAV app provides read/write access to any [WebDAV](https://datatracker.ietf.org/doc/html/rfc4918)-compatible file server: Nextcloud, ownCloud, a generic Apache `mod_dav` instance or any vendor-specific WebDAV endpoint. It can be consumed two ways: as a remote MCP server that **Agent Creator** agents call as tools, or as a Builder app whose instructions you call directly from DSUL. Authentication is a **per-workspace credential** (HTTP Basic username + password, or a Bearer token) pasted into the app instance and resolved server-side; agents never see it. An optional `allowedPath` restricts every operation to a subtree of the server. The connector exposes a single `files` tool that dispatches across 10 file/directory operations: listing, reading, writing, copying, moving, deleting, recursive search, full directory trees and directory creation. > [card] Browse > > List directories, fetch metadata, walk full nested trees, search by name and modification date. > [card] Read & Write > > Download file content, upload or overwrite files with a custom MIME type, create directories. > [card] Organize > > Move, rename, copy or delete files and directories, with optional overwrite-on-target. ## Who is this for? This connector is used by four different roles. Jump to the section that matches yours; each one is self-contained. > [card] Agent builder > > You build agents in **Agent Creator** and want them to read and write files on a WebDAV server. → *Agent builder* tab. > [card] Knowledge base owner > > You want the files on a WebDAV server indexed and searchable semantically, kept up to date. → *Knowledge base (sync)* tab. > [card] Platform admin > > You run the platform and want to publish WebDAV as a reusable capability. → *Platform admin setup* accordion below. > [card] Workspace builder > > You write Builder automations (DSUL) that call WebDAV operations directly. → *Workspace builder* tab. ## Prerequisites * A reachable **WebDAV server** with a stable base URL. Examples: * **Nextcloud / ownCloud**: `https://cloud.example.com/remote.php/dav/files/` * **Generic Apache `mod_dav`**: `https://files.example.com/dav` * **Vendor-specific**: refer to the provider's documentation for the WebDAV endpoint. * Credentials matching the chosen authentication mode: * **Basic**: a username + password (often an *app password* if the provider supports 2FA, e.g. Nextcloud). * **Token**: a Bearer token issued by the provider. * (Optional) An **allowed path** to restrict every operation to a single subtree, useful when the WebDAV user has access to more than you want to expose. > [!WARNING] > > When using `basic` auth against a Nextcloud or ownCloud instance with two-factor authentication enabled, create a dedicated **app password** in the user settings (*Security → Devices & sessions → Create new app password*) and use it as the password. The main account password will be rejected. > [accordion] Platform admin (Governance): one-time platform setup > > **Goal:** WebDAV is a **per-workspace** connector: each workspace pastes its own WebDAV base URL and Basic / Bearer credential into the app config (see the *Workspace builder* tab), so there is **no platform-wide credential to provision** and **no central OAuth client**. The only optional platform task is to publish WebDAV as a reusable **capability** in AI Governance so agent builders can enable it from the catalog instead of pasting a raw MCP endpoint. > > > [!NOTE] > > > > There is no shared WebDAV credential for this connector. The base URL, the Basic / Bearer credentials and the optional `allowedPath` always live in the consuming workspace's app configuration. A Governance capability you publish here points at a specific workspace's MCP endpoint; that workspace still owns the credential. > > ## Declare the capability in AI Governance (optional) > > **1. Open AI Governance > Capabilities** > > Create (or edit) the **WebDAV** capability. > > **2. Point it at the MCP endpoint** > > Set the capability's MCP server URL to the connector's **MCP Endpoint** (the workspace running the connector), and set its **Scope** to: > > ```text theme={null} > context_id,agent_id,user_id > ``` > > The `agent_id` in the scope is what lets Agent Creator identify the calling agent. > > **3. Make it available to agent builders** > > Once created, the capability appears in the capability picker for agent builders in your organization, who enable it on their agents. Access to the catalog follows your organization's existing roles; there is no per-capability role grant for this connector. > > > [!WARNING] > > > > Declaring the capability makes the connector **available**; it does not by itself authorize a specific agent. The WebDAV credential is resolved per-workspace from the app configuration; there is **no OAuth auth-config JSON** to attach in Governance, since authentication is a server-side Basic / Bearer credential, not a per-user OAuth flow. *** > [tab] Agent builder (Agent Creator) > > ## Agent builder > > **Goal:** let an agent you build in Agent Creator read and write files on a WebDAV server through MCP tools. > > > [!NOTE] > > > > Before an agent can call the connector, a *Workspace builder* must have installed and configured the WebDAV app in a workspace (see the *Workspace builder* tab). Optionally, a *Platform admin* may have published a WebDAV capability in AI Governance (see the *Platform admin setup* accordion above). > > The WebDAV credential is resolved server-side from the app configuration of the workspace running the connector; it is never exposed to the agent. Your agent is identified by the `agent_id` that Agent Creator injects through the capability *Scope*. > > **1. Install and configure the connector in your workspace** > > Follow the *Workspace builder* tab: install **WebDAV** in your workspace, then fill in the base URL, authentication type and Basic / Bearer credentials in the app instance config. > > **2. Add the MCP capability to your agent** > > In your agent, add a capability pointing at your workspace's **MCP Endpoint** URL (auto-populated on install), and set its **Scope** to: > > ```text theme={null} > context_id,agent_id,user_id > ``` > > The `agent_id` lets Agent Creator identify the calling agent. The WebDAV credential is resolved server-side from the app config; no credential is pasted into the agent. > > **3. Brief the agent in its system prompt** > > Wiring the capability is not enough: the agent also needs to know the MCP exists and when to reach for it. Add a short paragraph to the agent's system prompt. Copy-pasteable starter: > > ```text theme={null} > You have access to the WebDAV MCP server (mapped to ) through the `files` tool, which takes an `action` argument. Use it whenever the user asks to browse files, read a document, write or overwrite a file, move/copy/rename files, walk a directory tree, or search by name or modification date. Prefer `list` for one level of children and `getTree` only when the user explicitly asks for a recursive view (it can be expensive). Always confirm with the user before destructive actions (`delete`, `move`/`upload` with overwrite of an existing file). > ``` > > Refine the trigger keywords (resource names, business domains, typical user phrasings) so the agent reliably picks up the right intent in your context. > > > [!NOTE] > > > > **Legacy AI Knowledge agents** (no native MCP picker): add the connector under **Advanced > Tools > MCP** and paste the **MCP Endpoint** URL. The WebDAV credential is still resolved server-side from the workspace's app configuration. > > ## Available Tools > > The MCP server exposes a single entity-level tool, `files`, which dispatches across 10 actions through its `action` argument. > > ### `files` > > | Action | Description | > | - | - | > | `list` | List files / directories at a given path (depth 0 or 1). | > | `get` | Download file content. | > | `getProperties` | Get metadata of a file or directory without its content. | > | `upload` | Upload or overwrite a file with a given MIME type. | > | `delete` | Delete a file or a directory (recursive). | > | `move` | Move or rename a file or directory. | > | `copy` | Copy a file or directory. | > | `getTree` | Walk the full nested directory tree under a path. | > | `search` | Search files recursively by name and modification date, with pagination. | > | `createDir` | Create a new directory (parent must exist). | > > ## Output Formats > > The `files` tool accepts an `outputFormat` argument that controls the MCP response shape: > > * **`verbose`** (default): human-readable text for LLM consumption. > * **`structured`**: machine-readable JSON in `structuredContent`. > * **`both`**: both text and structured content. > > ## Tool Details > > ### `files` (action: `list`) > > ```json theme={null} > { > "name": "files", > "arguments": { > "action": "list", > "path": "/Documents", > "depth": 1 > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | Must be `list`. | > | `path` | No | Directory to list. Defaults to `/`. | > | `depth` | No | `1` (default) for immediate children; `0` to return only the path's own info (akin to a stat). | > > ### `files` (action: `upload`) > > ```json theme={null} > { > "name": "files", > "arguments": { > "action": "upload", > "path": "/Generated/2026-05-26-summary.md", > "content": "# Daily summary\n\n…", > "contentType": "text/markdown" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | Must be `upload`. | > | `path` | Yes | Target file path. Existing files at the same path are overwritten. | > | `content` | Yes | The file content (text). For binary uploads, prefer copying from an existing file via `copy` after staging the content elsewhere. | > | `contentType` | No | MIME type of the content. Defaults to `text/plain`. Common values: `text/markdown`, `application/json`, `text/csv`. | > > ### `files` (action: `move`) > > ```json theme={null} > { > "name": "files", > "arguments": { > "action": "move", > "sourcePath": "/Exports/2026-05-25.csv", > "destinationPath": "/Archive/2026-05-25.csv", > "overwrite": false > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | Must be `move`. | > | `sourcePath` | Yes | Current path of the file or directory. | > | `destinationPath` | Yes | New path (must be inside `allowedPath` if configured). | > | `overwrite` | No | Whether to overwrite if the destination exists. Defaults to `true`. | > > ### `files` (action: `search`) > > ```json theme={null} > { > "name": "files", > "arguments": { > "action": "search", > "path": "/Reports", > "query": "q2", > "dateFrom": "2026-04-01T00:00:00Z", > "dateTo": "2026-07-01T00:00:00Z", > "sortOrder": "desc", > "page": 1, > "pageSize": 25 > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | Must be `search`. | > | `path` | No | Search root (defaults to `/`). The search is always recursive. | > | `query` | No | Case-insensitive substring match on file names. | > | `dateFrom` | No | ISO 8601: only files modified on or after this date. | > | `dateTo` | No | ISO 8601: only files modified on or before this date. | > | `sortOrder` | No | `desc` (default, newest first) or `asc`. | > | `page` | No | Page number, 1-indexed. Default `1`. | > | `pageSize` | No | Items per page. Default `50`. | > > ### `files` (action: `getTree`) > > ```json theme={null} > { > "name": "files", > "arguments": { > "action": "getTree", > "path": "/Projects/Acme" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `action` | Yes | Must be `getTree`. | > | `path` | Yes | Root of the tree to walk. | > > > [!WARNING] > > > > `getTree` can return very large responses on deep directories. When the tree is large, prefer `list` with `depth: 1` and recurse client-side, or call `search` with a path filter. > [tab] Workspace builder (DSUL) > > ## Workspace builder > > **Goal:** install the connector in a workspace, configure the WebDAV credential, and call WebDAV operations from your automations. > > ## Installation > > 1. Go to **Apps** in your workspace > 2. Search for **WebDAV** and install it > 3. Open the app instance configuration and fill in the base URL, authentication type and Basic / Bearer credentials > > ## Configuration > > | Field | Description | > | - | - | > | **WebDAV Base URL** | WebDAV server base URL, e.g. `https://cloud.example.com/remote.php/dav/files/user`. All paths in tool calls are resolved relative to this URL. | > | **Authentication Type** | `basic` for username/password, `token` for Bearer token. | > | **Username** | Username for Basic Auth (ignored in token mode). | > | **Password** | Password (or app password) for Basic Auth (stored as a workspace secret). | > | **Bearer Token** | Bearer token for token mode (stored as a workspace secret). | > | **Allowed path (optional)** | If set, every file operation is rejected when the resolved path falls outside this subtree. Leave empty to expose the full base URL. | > | **MCP Endpoint** | Auto-populated on install: URL of the MCP endpoint for this instance. | > > Pick one of the two authentication modes: > > | Auth mode | What you provide | Best for | > | - | - | - | > | `basic` | A **username** + **password** (or app password) | Nextcloud / ownCloud / generic `mod_dav` with HTTP Basic auth | > | `token` | A **Bearer token** issued by the provider | Providers that issue API tokens instead of passwords | > > > [!NOTE] > > > > The Basic / Bearer credentials are stored as workspace secrets and resolved server-side. The **MCP Endpoint** is generated automatically by the `onInstall` flow. > > ## Available Instructions > > Every instruction resolves credentials from the workspace configuration. All paths are interpreted relative to the `baseUrl`; a leading `/` is allowed but optional. > > ### Files & Directories > > | Instruction | Description | Returns | > | - | - | - | > | `listFiles` | List a directory by `path` (default `/`); `depth` = `1` for immediate children (default) or `0` for path info only. | `{ files: [{ name, path, isDirectory, size, lastModified, contentType }] }` | > | `getFile` | Download file content by `path`. | `{ path, content, size, contentType }` | > | `getFileProperties` | Fetch metadata of a file or directory by `path` without its content. | `{ path, isDirectory, size, lastModified, contentType, etag }` | > | `uploadFile` | Create or overwrite a file at `path` with `content`; optional `contentType` (default `text/plain`). | `{ path, size }` | > | `deleteFile` | Delete a file or directory by `path` (directories are deleted recursively). | Empty (HTTP 204) | > | `moveFile` | Move/rename from `sourcePath` to `destinationPath`; `overwrite` (default `true`) controls overwrite-on-target. | `{ sourcePath, destinationPath }` | > | `copyFile` | Copy from `sourcePath` to `destinationPath`; `overwrite` (default `true`) controls overwrite-on-target. | `{ sourcePath, destinationPath }` | > | `getDirectoryTree` | Walk the full nested directory tree under `path`. | `{ path, tree: [{ name, path, isDirectory, children }] }` | > | `searchFiles` | Recursive search under `path` filtered by `query` (name substring), `dateFrom`/`dateTo`, with `page`/`pageSize`/`sortOrder`. | `{ matches: [{ name, path, lastModified, size }], page, pageSize, total }` | > | `createDirectory` | Create a directory at `path` (parent must exist). | `{ path }` | > > > [!NOTE] > > > > `Returns` shows the shape of the operation output. `depth` accepts `0` (path info only) or `1` (immediate children, default). `deleteFile` deletes directories recursively. > > ## DSUL Examples > > ### List the contents of a folder > > ```yaml theme={null} > - WebDAV.listFiles: > path: '/Documents' > depth: 1 > output: listing > ``` > > ### Download a file and emit an excerpt > > ```yaml theme={null} > - WebDAV.getFile: > path: '/Reports/2026/q1-results.md' > output: report > - emit: > event: report.fetched > payload: > size: '{{report.size}}' > excerpt: '{% slice({{report.content}}, 0, 500) %}' > ``` > > ### Upload a generated markdown file > > ```yaml theme={null} > - WebDAV.uploadFile: > path: '/Generated/{{run.date}}-summary.md' > content: | > # Daily summary > > {{summary.body}} > contentType: 'text/markdown' > ``` > > ### Move yesterday's exports to an archive folder > > ```yaml theme={null} > - WebDAV.moveFile: > sourcePath: '/Exports/{{yesterday}}.csv' > destinationPath: '/Archive/{{yesterday}}.csv' > overwrite: false > ``` > > ### Search for recent reports by name > > ```yaml theme={null} > - WebDAV.searchFiles: > path: '/Reports' > query: 'q2' > dateFrom: '2026-04-01T00:00:00Z' > dateTo: '2026-07-01T00:00:00Z' > sortOrder: desc > pageSize: 25 > output: matches > ``` > [tab] Knowledge base (sync) > > ## Knowledge base > > **Goal:** index the files of a WebDAV server into a knowledge base so an agent can search their **content**, and keep that base up to date. > > > [!NOTE] > > > > Before a base can be attached, a *Workspace builder* must have installed the WebDAV app in a workspace and saved its credentials (see the *Workspace builder* tab). Nothing else is needed: the same app instance serves both the agent tools and the sync surface. The **Authorized agents** allowlist does **not** apply here — it gates the connector as an agent *tool*, and has no effect on synchronization. > > WebDAV is the reference case for a source nobody published for you: it is attached **by URL**, never from the catalog, and the base is fed by the workspace's own credential rather than by a person signing in. [Knowledges → Connectors](/products/ai-knowledge/connectors) carries the complete walkthrough — install the app, fill the credentials, test, copy the endpoint, attach it. This tab covers what is specific to the connector. > > ## How it fits together > > ```mermaid theme={null} > flowchart LR > Server["WebDAV server
Nextcloud · ownCloud · …"] > Conn["WebDAV connector
MCP resources"] > Sync["Knowledge Sync
browse · diff · index"] > KB["Knowledge base
vector store"] > Agent["Agent"] > > Sync -->|"resources/list · resources/read"| Conn > Conn -->|"PROPFIND · GET"| Server > Sync -->|"documents"| KB > Agent -->|"search"| KB > Agent -.->|"freshness · perimeter check"| Sync > ``` > > The resource tree is two levels deep — **folders**, then **files** — and any folder can be picked as a sync root: > > ```text theme={null} > webdav://files/{path} > ``` > > ## Attach the connector to a base > > **1. Copy the MCP endpoint** > > Open the connector's **Configuration app**; the **MCP endpoint** card holds the URL that identifies this workspace's connector: > > ```text theme={null} > /workspaces//webhooks/.mcp > ``` > > **2. Create the connection in Knowledges** > > Go to **Knowledges → Connectors → New Connection → Your own MCP server**, paste the endpoint and click **Check**. On success the dialog reads *Compatible connector — webdav*, with the levels `folder › file`. > > **3. Browse to the folder you want** > > Walk down from the account root — or from the allowed path, when one is set — and confirm with **Use this location**. Everything below the selected folder is synced, subfolders included. > > **4. Pick the destination and sync** > > Choose an existing knowledge base or create one from the same step, then click **Sync Now**. The schedule (*Hourly* to *Daily*, under **Auto-sync**) keeps it current. > > ## Who may sync, and who may read > > | Moment | Acts as | Authorized by | > | - | - | - | > | Attaching the connection, browsing the tree | You | Your **role on the workspace** holding the connector's configuration — the right to read that workspace is the right to read this server through it | > | A scheduled sync run | No user at all | The calling workspace must be listed in `knowledgeSync.trustedCallers`; the Knowledge Sync workspace ships there by default | > | Answering a reader's question | Everyone alike | The connector's single service credential — the verdict is the same for every reader | > > > [!WARNING] > > > > **Per-user access control is offered, but it does not tell readers apart.** WebDAV exposes no portable per-user ACL, so the connector holds one account for the whole workspace. Keeping the setting on is still worth it — every query re-checks that the document is still there and still inside the allowed path, so a file deleted or moved out of scope stops appearing without waiting for the next sync. But what it protects is **freshness and perimeter, not identity**. If a folder should not be readable by everyone who can query the agent, do not sync it: narrow the **allowed path** instead, which the connector enforces on every single call. > > ## What gets indexed > > | Aspect | Behavior | > | - | - | > | Document unit | One **file** = one document. Folders are containers, never indexed themselves. | > | Content | Inlined as a bounded data URL — every byte needs an `Authorization` header, so there is no link a third party could fetch. Default ceiling about **1.4 MB** per file, adjustable in the workspace configuration; 200 000 characters of inline text. | > | Above the ceiling | Reported as unfetchable with a reason, and listed in the connection's synchronization errors. A file is never half-indexed. | > | File types | Inferred from the **extension**: many servers omit the content type or return `application/octet-stream` for everything, and the platform filters on the type. Give files their real extensions. | > | Revision marker | `getetag`, falling back to `getlastmodified`. Unchanged files are never re-read and never re-indexed. | > | Identity | The **path** on the server. Renaming or moving a file changes its identity: the old document leaves the base and the new one is ingested and re-embedded from scratch — on a folder, that applies to the whole subtree. | > | Deletions | Each run is a **full traversal**: a file absent from a complete listing is removed from the base. A listing that failed halfway deletes nothing. | > > > [!NOTE] > > > > **The Knowledge profile this connector declares** — the descriptor Knowledges probes at `webdav://profile/knowledge`: > > > > | Field | Value | > > | - | - | > > | `provider` | `webdav` | > > | `hierarchy` | `folder` › `file` | > > | `canonical_uri` | `webdav://files/{path}` | > > | `revision` | `getetag`, fallback `getlastmodified` | > > | `read` | Inline data URL, \~1.4 MB by default; 200 000 characters of inline text | > > | `list` | 200 resources per page by default, 1000 max; `delta_on_drive: false` | > > | `access` | Tool `files`, action `checkAccess`, up to 200 URIs per call | > > | `authentication` | `serviceAccount` — one credential held by the workspace, no per-user identity | > > ## Troubleshooting the sync > > **The URL check says "You are not allowed to read it"**: you have no role on the workspace holding the connector's configuration. Ask its administrator for one — this is not about your rights on the WebDAV server. > > **The URL check says "It answered, but could not serve its content"**: the credentials are missing or wrong. Open the configuration app and click **Test connection**, which reaches the server with the values actually saved. > > **A browsing column says the source could not be listed**: that is a failure, not an empty folder — the server refused. Most often the credential is wrong, or the allowed path does not exist. Test the connection in the configuration app. > > **A whole library is ignored**: check the extensions. The type is inferred from the file name, and a library of extension-less files is filtered out before indexing. > > **Reorganizing folders re-indexes everything**: expected — the path *is* the document's identity. Plan reorganizations accordingly. > > **A scheduled sync keeps running after a right was revoked**: the role check runs on the interactive paths only. A scheduled run is authorized as the platform's synchronization workspace — delete the connection to stop it for certain. *** ## Security The answers that hold for every connector (agent access, shared knowledge bases, credentials, models, egress) are on [Connector security](/apps-store/marketplace/connectors/security). This section lists what is specific to WebDAV. | Topic | WebDAV | | - | - | | Authentication family | Technical account or API key: one WebDAV account, with HTTP Basic (`basic`: username and password) or a bearer token (`token`). The server sees that account for every caller. | | Production modes | `basic` (with an app password when the server offers them) or `token` | | Modes to avoid in production | None: the shared credential is the only mode. Give the account read-only rights, keep its credential in the workspace secrets and rotate it. | | Read-only rights | Granted on the WebDAV server, not by the connector: give the account read access to the folders you expose only, and set **Allowed path** to that subtree. | | Agent allowlist | Yes, on the tenant endpoint (empty at installation). **Allow all agents** accepts every agent. The connector has no global endpoint. | | Per-reader access control on knowledge bases | No per-reader check: WebDAV exposes no per-user permission the connector can query, so every reader of a shared base gets the same documents. The access check only leaves out documents deleted, moved or outside the **Allowed path**. Every document the account can read inside the allowed path is indexed. | | Outbound hosts | The **Base URL** set at installation. | | Audit events | None specific to this connector | The **Allowed path** applies to browsing, reading and knowledge base synchronization alike: everything outside it is refused, even when the account can read it. Share a knowledge base fed by this connector only with people entitled to the whole allowed path. The connector also exposes upload, move, copy and delete: with a read-only account, the server refuses them. *** ## Error Handling WebDAV uses standard HTTP status codes plus a handful of WebDAV-specific ones (RFC 4918). | HTTP Status | Meaning | Typical Cause | | - | - | - | | `400` | Bad Request | Malformed path, invalid `depth`, missing required parameter. | | `401` | Unauthorized | Wrong username / password, expired or revoked Bearer token. | | `403` | Forbidden | The configured user lacks the WebDAV permission for the operation, or the path falls outside `allowedPath`. | | `404` | Not Found | The path does not exist on the server. | | `405` | Method Not Allowed | Calling a method (e.g. `MKCOL`) on a path that already exists. | | `409` | Conflict | `createDirectory` called on a path whose parent does not exist (`MKCOL` parent missing). | | `412` | Precondition Failed | `move`/`copy` with `overwrite: false` but the destination already exists. | | `423` | Locked | Another client holds a WebDAV lock on the resource; retry later. | | `429` | Rate Limited | Provider throttling (Nextcloud rate limits, reverse-proxy WAF). | | `507` | Insufficient Storage | The user is over quota on the provider. | | `500` / `502` / `503` | Server Error | Transient error from the upstream server or proxy. Retry with exponential backoff. | ### Common Issues **"WebDAV not configured"**: The app instance is missing either `baseUrl` or the credentials for the chosen `type` (Basic or token). Open the app configuration and fill in the base URL, authentication type and credentials. **"Basic Auth requires username and password"**: `type` is `basic` but the username or password is empty. Provide both in the app config (use an app password on 2FA-enabled accounts). **"Token auth requires a Bearer token"**: `type` is `token` but no Bearer token is set. Paste a valid token in the app config. **Nextcloud / ownCloud 401 with the right password**: Two-factor authentication on the account requires an **app password**. Create one in *Security → Devices & sessions* and use it as the `password`. **"Access denied - path outside allowed scope" (403)**: The resolved path is not under the configured `allowedPath`. Either widen the allowed path or rewrite the call to a path within it. **`getTree` times out on a large folder**: Prefer `listFiles` with `depth: 1` and recurse from the client, or use `searchFiles` with `dateFrom`/`dateTo` to scope the request. **`upload` with binary content fails**: The `content` parameter is a string. For binary payloads, stage the file elsewhere (a previously uploaded file in WebDAV, a public URL, etc.) and use `copy` or an out-of-band upload. The connector does not currently accept base64-encoded `content`. **Trailing slashes**: Some WebDAV servers are strict about trailing slashes on directories. If a directory listing returns 404, retry with a trailing `/`. ## External Resources > [card] [WebDAV (RFC 4918)](https://datatracker.ietf.org/doc/html/rfc4918) > > Official WebDAV protocol specification. > [card] [Tool Agents](/products/agent-factory/capabilities) > > Learn how Agent Creator agents consume MCP tools in Prisme.ai. # Word Source: https://docs.prisme.ai/apps-store/marketplace/connectors/word Build, upload, parse, convert, version, and manage Microsoft Word documents stored in OneDrive or SharePoint ![Word](https://mintcdn.com/prismeai/WjDT59WIWxvSlSk1/images/connectors/word.jpg?fit=max\&auto=format\&n=WjDT59WIWxvSlSk1\&q=85\&s=4303f17934ebe55c9e55f1f996ebc2e8) The Word connector provides Microsoft Word document operations through the Microsoft Graph API. It can be used as a Builder app for deterministic document workflows or as an MCP server for AI agents that need to create, inspect, convert, update, version, and manage `.docx` files stored in OneDrive or SharePoint. > [card] Document Operations > > Read metadata, download content, upload DOCX bytes, convert files, and delete documents > [card] Structured Authoring > > Build valid Word documents from a JSON specification with headings, paragraphs, tables, lists, images, and formatting > [card] Governance & Lifecycle > > Search files, inspect document structure, manage versions, checkout locks, following, and analytics ## Prerequisites * A **Microsoft Entra ID / Azure AD application** registered in your tenant * A **client secret** for that application * Microsoft Graph permissions granted with admin consent: * `Files.Read.All` for read-only document access * `Files.ReadWrite.All` for upload, update, delete, checkout, check-in, restore, and follow operations * `Sites.Read.All` or `Sites.ReadWrite.All` when accessing SharePoint-hosted documents * Your **Directory (tenant) ID** and **Application (client) ID** * Optional **SharePoint Site ID** when the default target is a SharePoint site instead of the user's OneDrive *** > [tab] Usage as App > > ## Usage as App > > ## Installation > > 1. Go to **Apps** in your workspace > 2. Search for **Word** and install it > 3. Open the app instance configuration and fill in the required Microsoft Graph credentials > > ## Configuration > > | Field | Description | > | - | - | > | **Azure Client ID** | Microsoft Entra application (client) ID used to call Microsoft Graph | > | **Azure Client Secret** | Microsoft Entra application client secret, stored as a workspace secret | > | **Azure Tenant ID** | Microsoft Entra directory (tenant) ID | > | **SharePoint Site ID** | Optional default SharePoint site ID for SharePoint-based document operations | > > ## File Access > > Word operations target Microsoft Graph drive items. For OneDrive files, pass an `itemId` or `path` and optionally a `driveId`. For SharePoint files, also pass `siteId` or configure a default SharePoint Site ID on the app instance. > > ```yaml theme={null} > - Word.getDocument: > itemId: '{{documentItemId}}' > driveId: '{{driveId}}' > output: document > ``` > > ```yaml theme={null} > - Word.getDocumentByPath: > path: Documents/Quarterly Report.docx > siteId: '{{sharePointSiteId}}' > driveId: '{{driveId}}' > output: document > ``` > > ## Available Instructions > > Every instruction resolves Microsoft Graph credentials through the workspace configuration. Most operations accept `driveId` and `siteId` to override the configured default target. > > ### Document Lookup & Search > > | Instruction | Arguments | > | - | - | > | `getDocument` | `itemId`\*, `select`, `expand`, `driveId`, `siteId` | > | `getDocumentByPath` | `path`\*, `select`, `expand`, `driveId`, `siteId` | > | `searchDocuments` | `query`\*, `top`, `driveId`, `siteId` | > | `getDocumentStructure` | `itemId`\*, `includeContent`, `maxContentLength`, `driveId`, `siteId` | > > ### Content Transfer & Creation > > | Instruction | Arguments | > | - | - | > | `downloadDocument` | `itemId`\*, `driveId`, `siteId` | > | `downloadDocumentByPath` | `path`\*, `driveId`, `siteId` | > | `uploadDocument` | `itemId`*, `content`*, `contentType`, `driveId`, `siteId` | > | `uploadDocumentByPath` | `path`*, `content`*, `contentType`, `driveId`, `siteId` | > | `buildDocument` | `itemId` or `path`, `spec`\*, `driveId`, `siteId` | > | `convertDocument` | `itemId`*, `format`*, `driveId`, `siteId` | > > ### Metadata & Lifecycle > > | Instruction | Arguments | > | - | - | > | `updateDocument` | `itemId`\*, `name`, `description`, `driveId`, `siteId` | > | `deleteDocument` | `itemId`\*, `driveId`, `siteId` | > > ### Versions > > | Instruction | Arguments | > | - | - | > | `listVersions` | `itemId`\*, `driveId`, `siteId` | > | `getVersion` | `itemId`*, `versionId`*, `driveId`, `siteId` | > | `downloadVersionContent` | `itemId`*, `versionId`*, `driveId`, `siteId` | > | `restoreVersion` | `itemId`*, `versionId`*, `driveId`, `siteId` | > > ### Checkout > > | Instruction | Arguments | > | - | - | > | `checkoutDocument` | `itemId`\*, `driveId`, `siteId` | > | `checkinDocument` | `itemId`\*, `comment`, `driveId`, `siteId` | > | `discardCheckout` | `itemId`\*, `driveId`, `siteId` | > > ### Collaboration & Analytics > > | Instruction | Arguments | > | - | - | > | `followDocument` | `itemId`\*, `driveId`, `siteId` | > | `unfollowDocument` | `itemId`\*, `driveId`, `siteId` | > | `getAnalytics` | `itemId`\*, `driveId`, `siteId` | > > > [!NOTE] > > > > Arguments flagged with `*` are required. `buildDocument` requires `spec` and either `itemId` for rewrite mode or `path` for create mode. > > ## DSUL Examples > > ### Search for Word Documents > > ```yaml theme={null} > - Word.searchDocuments: > query: contract > top: 10 > driveId: '{{driveId}}' > output: documents > ``` > > ### Build a New Word Document > > ```yaml theme={null} > - Word.buildDocument: > path: Reports/generated-summary.docx > driveId: '{{driveId}}' > spec: > properties: > title: Generated Summary > author: Prisme.ai > sections: > - content: > - type: heading > level: 1 > text: Quarterly Summary > - type: paragraph > text: This document was generated from a Prisme.ai workflow. > - type: table > headers: > - Metric > - Value > rows: > - - Revenue > - '{{revenue}}' > - - Active customers > - '{{customerCount}}' > output: builtDocument > ``` > > ### Inspect and Convert a Document > > ```yaml theme={null} > - Word.getDocumentStructure: > itemId: '{{documentItemId}}' > includeContent: true > output: structure > - Word.convertDocument: > itemId: '{{documentItemId}}' > format: pdf > output: pdfContent > ``` > > ### Restore a Previous Version > > ```yaml theme={null} > - Word.listVersions: > itemId: '{{documentItemId}}' > output: versions > - Word.restoreVersion: > itemId: '{{documentItemId}}' > versionId: '{{versions.value[0].id}}' > output: restored > ``` > [tab] Usage as MCP > > ## Usage as MCP > > The Word MCP workspace exposes the same document operations as JSON-RPC tools. The MCP endpoint receives the `mcp-api-key` header, routes `tools/call` requests through `routeToolCall`, and delegates each operation to the Word app workspace, where Microsoft Graph authentication and Graph URL construction are handled. > > ## MCP Configuration > > | Field | Description | > | - | - | > | **MCP API Key** | Configured on the Word MCP workspace and sent through the `mcp-api-key` header for MCP endpoint calls | > > ## Plug into an Agent Creator capability > > Agents consume MCP servers directly through **Agent Creator** capabilities. This is the preferred way to expose Word tools to an agent. > > **1. Create or open a workspace** > > From the Prisme.ai console, create a new workspace or open the workspace that will host the connector. > > **2. Install and configure the Word app** > > Install **Word** and configure the Microsoft Graph credentials from the *Usage as App* tab. > > **3. Copy the MCP endpoint and API key** > > Open the Word MCP app instance configuration and copy the **MCP Endpoint** and **MCP API Key** values. > > **4. Open Agent Creator** > > Open the agent you want to extend and add a capability. > > **5. Add the MCP capability** > > Select a dedicated Word capability if one exists. Otherwise, use the generic `custom_mcp` capability, paste the MCP endpoint as the server URL, then add this header: > > ```json theme={null} > { > "mcp-api-key": "your-mcp-api-key" > } > ``` > > **6. Brief the agent** > > Tell the agent when to use Word tools, which document locations it may access, and when to ask for confirmation before destructive actions such as deleting files, overwriting content, restoring versions, or discarding checkout changes. > > ## Legacy MCP Install (Advanced > Tools) > > Use this flow to plug the Word MCP into an AI Knowledge agent that does not yet support the native Agent Creator capability picker. > > **1. Install the Word app** > > Install and configure the Word app in the same workspace as your agent. > > **2. Copy the MCP credentials** > > Open the MCP app instance configuration and copy the **MCP Endpoint** and **MCP API Key**. > > **3. Open your AI Knowledge project** > > Navigate to **Advanced > Tools**. > > **4. Add an MCP tool** > > Click **Add**, select the **MCP** tab, and paste the MCP endpoint URL. > > **5. Add the auth header** > > Add the signed API key in the headers field: > > ```json theme={null} > { > "mcp-api-key": "your-mcp-api-key" > } > ``` > > **6. Save** > > The agent can now list and call the Word MCP tools. > > ## Output Formats > > Every tool accepts an `outputFormat` parameter that controls the MCP response shape: > > * **`verbose`** (default) - human-readable text for LLM consumption > * **`structured`** - machine-readable JSON returned as text and in `structuredContent` > * **`both`** - currently returns JSON text and `structuredContent`, matching `structured` output > > ## Available Tools > > ### Document Lookup & Search > > | Tool | Description | > | - | - | > | `getDocument` | Get Word document metadata by ID | > | `getDocumentByPath` | Get Word document metadata by path | > | `searchDocuments` | Search for Word documents in a drive | > | `getDocumentStructure` | Parse Word document and return element tree | > > ### Content Transfer & Creation > > | Tool | Description | > | - | - | > | `downloadDocument` | Download Word document content by ID | > | `downloadDocumentByPath` | Download Word document content by path | > | `uploadDocument` | Upload or replace a Word document from base64-encoded DOCX bytes, up to 4 MB | > | `uploadDocumentByPath` | Upload a Word document to a path from base64-encoded DOCX bytes | > | `buildDocument` | Create a valid Word `.docx` from a JSON spec and upload it | > | `convertDocument` | Convert a Word document to PDF or HTML format | > > ### Metadata & Lifecycle > > | Tool | Description | > | - | - | > | `updateDocument` | Update document metadata such as name or description | > | `deleteDocument` | Delete a document by moving it to the recycle bin | > > ### Versions > > | Tool | Description | > | - | - | > | `listVersions` | List all versions of a Word document | > | `getVersion` | Get metadata for a specific document version | > | `downloadVersionContent` | Download content of a specific document version | > | `restoreVersion` | Restore a document to a previous version | > > ### Checkout > > | Tool | Description | > | - | - | > | `checkoutDocument` | Check out a document to lock it for exclusive editing | > | `checkinDocument` | Check in a document to release the lock and save changes | > | `discardCheckout` | Discard checkout and revert to the last checked-in version | > > ### Collaboration & Analytics > > | Tool | Description | > | - | - | > | `followDocument` | Follow a document to receive notifications | > | `unfollowDocument` | Stop following a document | > | `getAnalytics` | Get document analytics such as views and viewers when available from Microsoft Graph | > > ## Tool Details > > ### `buildDocument` > > Creates or rewrites a Word document from a JSON document specification. > > > [!WARNING] > > > > Rewrite mode (`itemId`) replaces the whole document with what the spec describes: it does not edit the existing file in place. Comments and tracked changes of the original are always lost; styles and images survive only if the spec reproduces them. To change a few lines, read the document first (`getDocumentStructure`), and confirm with the user before rewriting. > > ```json theme={null} > { > "name": "buildDocument", > "arguments": { > "path": "Reports/generated-summary.docx", > "driveId": "b!drive-id", > "spec": { > "properties": { > "title": "Generated Summary", > "author": "Prisme.ai" > }, > "sections": [ > { > "content": [ > { "type": "heading", "level": 1, "text": "Quarterly Summary" }, > { "type": "paragraph", "text": "Generated by an AI agent." }, > { > "type": "table", > "headers": ["Metric", "Value"], > "rows": [["Revenue", "$120k"], ["Customers", "42"]] > } > ] > } > ] > }, > "outputFormat": "structured" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `spec` | Yes | JSON specification with `sections` and document content elements | > | `itemId` | No | Existing document item ID for rewrite mode | > | `path` | No | File path for create mode; required when `itemId` is omitted | > | `driveId` | No | Drive ID; defaults to the configured OneDrive or SharePoint drive context | > | `siteId` | No | SharePoint site ID override | > > ### `getDocumentStructure` > > Downloads a DOCX file and parses it into a structured element tree that agents can inspect before rewriting or summarizing content. > > ```json theme={null} > { > "name": "getDocumentStructure", > "arguments": { > "itemId": "01ABCDEF2345", > "includeContent": true, > "maxContentLength": 2000, > "outputFormat": "structured" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `itemId` | Yes | Document drive item ID | > | `includeContent` | No | Include text content in parsed elements | > | `maxContentLength` | No | Maximum content length returned per element | > | `driveId` | No | Drive ID override | > | `siteId` | No | SharePoint site ID override | > > ### `uploadDocumentByPath` > > Uploads a base64-encoded DOCX file to a drive path. > > ```json theme={null} > { > "name": "uploadDocumentByPath", > "arguments": { > "path": "Templates/template.docx", > "content": "UEsDBBQAAAA...", > "contentType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `path` | Yes | Target path in the drive | > | `content` | Yes | Base64-encoded DOCX bytes, up to 4 MB | > | `contentType` | No | MIME type; defaults to Word `.docx` | > | `driveId` | No | Drive ID override | > | `siteId` | No | SharePoint site ID override | > > ### `searchDocuments` > > Searches for Word documents in the configured drive context. > > ```json theme={null} > { > "name": "searchDocuments", > "arguments": { > "query": "contract", > "top": 10, > "outputFormat": "both" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `query` | Yes | Search query text | > | `top` | No | Maximum number of results to return | > | `driveId` | No | Drive ID override | > | `siteId` | No | SharePoint site ID override | > > ### `convertDocument` > > Converts a Word document to another format supported by Microsoft Graph download conversion. > > ```json theme={null} > { > "name": "convertDocument", > "arguments": { > "itemId": "01ABCDEF2345", > "format": "pdf", > "outputFormat": "structured" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `itemId` | Yes | Document drive item ID | > | `format` | Yes | Target format, typically `pdf` or `html` | > | `driveId` | No | Drive ID override | > | `siteId` | No | SharePoint site ID override | > > ### `restoreVersion` > > Restores a document to a previous version. > > ```json theme={null} > { > "name": "restoreVersion", > "arguments": { > "itemId": "01ABCDEF2345", > "versionId": "2.0", > "outputFormat": "verbose" > } > } > ``` > > | Parameter | Required | Description | > | - | - | - | > | `itemId` | Yes | Document drive item ID | > | `versionId` | Yes | Version ID returned by `listVersions` | > | `driveId` | No | Drive ID override | > | `siteId` | No | SharePoint site ID override | *** ## Security The answers that hold for every connector (agent access, shared knowledge bases, credentials, models, egress) are on [Connector security](/apps-store/marketplace/connectors/security). This section lists what is specific to Word. | Topic | Word | | - | - | | Authentication family | Application (Microsoft Entra client credentials): every call acts as the application registered by the administrator, not as the user. No delegated mode is implemented. | | Production modes | Client credentials configured in the workspace (the only mode) | | Modes to avoid in production | No mode is delegated: avoid this connector when per-user permissions are required. | | Read-only scopes | Set on the Entra application registration, not in the connector: the token requests `https://graph.microsoft.com/.default`. For read-only use, consent only `Files.Read.All`, plus `Sites.Read.All` for SharePoint documents. | | Agent allowlist | No: access is controlled by installing the connector and by its API key. | | Per-reader access control on knowledge bases | Not applicable: this connector does not feed knowledge bases. | | Outbound hosts | `graph.microsoft.com`, `login.microsoftonline.com` | | Audit events | None specific to this connector | Application permissions such as `Files.Read.All` reach every OneDrive and SharePoint document of the tenant, whoever uses the agent. Keep the API key in the workspace secrets, share it only with the agents that need Word, and rotate it together with the client secret. *** ## Error Handling | HTTP Status | Error | Solution | | - | - | - | | `400` | Invalid request, path, format, or document spec | Check required arguments, Graph path syntax, and `spec.sections` for `buildDocument` | | `401` | Authentication failed | Verify Azure Client ID, Client Secret, Tenant ID, and token permissions | | `403` | Insufficient Microsoft Graph permissions | Grant admin consent for the required Files and Sites permissions | | `404` | Document, drive, site, or version not found | Verify `itemId`, `path`, `driveId`, `siteId`, and `versionId` | | `409` | Conflict or checkout state prevents the operation | Check the document checkout status or retry after releasing the lock | | `413` | Generated or uploaded content is too large | Keep base64 DOCX uploads under the 4 MB connector limit | | `429` | Microsoft Graph throttling | Retry later or reduce request volume | | `500` | Microsoft Graph or connector runtime error | Inspect the tool response and workspace execution logs | ### Common Issues **"API key not configured. Generate one from the API Key page."** - The Word MCP configuration has no **MCP API Key**, so the MCP endpoint refuses every tool call. Set the key in the Word MCP configuration, add it as the `mcp-api-key` header of the agent's capability, then retry. **"Missing mcp-api-key header"** or **"Invalid mcp-api-key"** - A key is configured, but the agent's capability does not send it, or sends a different value. Set the `mcp-api-key` header of the capability to the exact **MCP API Key** value and retry. **"Authentication failed"** - The Microsoft Graph credentials are missing, expired, or lack admin consent. Confirm the configured Azure app can acquire a token for Microsoft Graph. **"Either itemId or path must be provided"** - `buildDocument` supports rewrite mode with `itemId` or create mode with `path`. Provide one of them with a valid `spec`. **Upload exceeds 4 MB** - `uploadDocument`, `uploadDocumentByPath`, and generated `buildDocument` uploads use the small-file Microsoft Graph upload path. Reduce the document size before retrying. **SharePoint document not found** - SharePoint operations usually need the correct `siteId` and `driveId`. Configure a default SharePoint Site ID or pass these arguments per call. ## External Resources > [card] [Microsoft Graph DriveItem API](https://learn.microsoft.com/en-us/graph/api/resources/driveitem) > > Reference for OneDrive and SharePoint file metadata, content, versions, and lifecycle operations. > [card] [Tool Agents](/products/agent-factory/capabilities) > > Learn how to expose connector tools to AI agents through Prisme.ai capabilities. # Crawler Source: https://docs.prisme.ai/apps-store/marketplace/crawler Extract and process web content for AI knowledge bases and automations The Crawler app is a powerful infrastructure component in the Prisme.ai ecosystem that enables you to extract, process, and utilize content from websites. It transforms web content and documents (pdf, ppt...) into structured data that can be used in your AI solutions, knowledge bases, and automations. ## Overview The Crawler is a specialized microservice provided by Prisme.ai that handles the complex process of web content extraction: > [card] Web Content Extraction > > Automatically extract content from websites and web pages > [card] Content Processing > > Transform web content and documents into structured, usable data > [card] Selective Crawling > > Target specific content through URL patterns and CSS selectors > [card] Scheduling > > Set up regular crawling jobs to keep information current This infrastructure app is particularly valuable for creating AI knowledge bases, maintaining up-to-date information, and automating content-based workflows. ## Key Features > [tab] Content Extraction > > Extract various types of content from websites: > > * **Text Content**: Articles, documentation, product information > * **Structured Data**: Tables, lists, and other formatted content > * **Metadata**: Page titles, descriptions, authors, dates > * **Navigation Structure**: Site hierarchies and relationships > * **Links and References**: Internal and external connections > > The Crawler uses advanced techniques to identify and extract meaningful content while filtering out navigation elements, advertisements, and other non-essential components. > [tab] Targeting Options > > Control exactly what content gets crawled: > > * **URL Patterns**: Include or exclude content based on URL patterns > * **CSS Selectors**: Target specific page elements by CSS selectors > * **Content Types**: Filter by content type (text, images, etc.) > * **Depth Control**: Limit crawling to a specific number of levels > * **Rate Limiting**: Control crawl speed to be respectful of websites > * \*\*Periodicity \*\*: Control the periodicity of crawling > > These targeting options allow you to focus on the most relevant content for your needs. > [tab] Processing Capabilities > > Transform extracted content for better usability: > > * **Content Cleaning**: Remove boilerplate text and formatting > * **Text Extraction**: Convert HTML to clean, usable text > * **Structure Preservation**: Maintain headings, lists, and tables > * **Metadata Extraction**: Capture page properties and attributes > * **Page Transformation**: transform web to markdown (LLM freindly format) > > These processing capabilities ensure that the extracted content is ready for use in your AI solutions. > [tab] Document Metadata > > Extract rich metadata from Office documents: > > * **Standard Properties**: Title, author, creation date, keywords > * **Custom Properties**: Organization-specific metadata fields > * **MIP Sensitivity Labels**: Microsoft Information Protection labels for data classification > > MIP labels are automatically extracted from documents protected with Microsoft Purview or Azure Information Protection, enabling you to: > > * Filter documents by classification level (Confidential, Internal, Public, etc.) > * Enforce data handling policies in your AI workflows > * Track sensitivity across your knowledge base > > All metadata is stored in the `custom_metadata` field and indexed for search and filtering. Labels are exposed as `mip:label:*` keys (`mip:label:id`, `mip:label:name`, …): the same keys the [client-side file gate](/products/agent-factory/hooks#microsoft-purview--mip-sensitivity-labels) evaluates before upload, so one classification policy can be enforced at both ends. > [tab] Scheduling and Automation > > Keep your content current with scheduling options: > > * **Recurring Crawls**: Schedule regular updates > * **Incremental Crawling**: Focus on new or changed content > * **Event-Triggered Crawls**: Start crawls based on specific events > * **Notification System**: Get alerts about crawl status > > These scheduling features help maintain the freshness of your knowledge base. ## How the Crawler Works The Crawler follows a systematic process to extract and process web content: **1. Configuration** Define what to crawl and how to process it: * Specify starting URLs * Set URL patterns for inclusion/exclusion * Define content selectors for authentication * Define periodicity **2. Discovery** Start with initial URLs and discover additional content: * Visit starting pages * Identify links to follow * Filter links based on patterns * Build a crawl frontier **3. Extraction** Visit pages and extract content: * Render pages (including JavaScript content) * Apply CSS selectors to target specific content * Extract text, structured data, and metadata * Process and clean the extracted content **4. Processing** Transform extracted content into usable formats: * Clean and normalize text * Identify and preserve structure (headings, lists, etc.) * Extract metadata and attributes * Categorize and classify content **5. Storage** Store processed content for use in your applications: * Save to structured storage * Index for search and retrieval * Associate with metadata and source information * Make available for knowledge bases and automations This process transforms web content into structured, searchable information that can power your AI applications. ## Configuration Options The Crawler app provides an extensive configuration to tailor its behavior to your specific needs, domain by domain.\\ > [!NOTE] > > Do not include [www](http://www). prefix in websites\_config domains > [accordion] Target websites > > Control which websites are crawled: > > ```yaml theme={null} > slug: Crawler > config: > websiteURL: > - https://www.issy.com/ > - https://www.issy-tourisme-international.com > - https://quotes.toscrape.com/tag/love/ > crawlerId: issy.com > ``` > > This configuration start crawling the 3 configured domains and **follows every discovered URL belonging to these domains + path**.\ > For [https://quotes.toscrape.com/tag/love/](https://quotes.toscrape.com/tag/love/), it will only follow urls under `/tag/love/` path : in that case, only [https://quotes.toscrape.com/tag/love/page/2/](https://quotes.toscrape.com/tag/love/page/2/) will be discovered and other found url will be ignored. > [accordion] URL blacklist > > Blacklist specific URL patterns : > > ```yaml theme={null} > slug: Crawler > config: > mode: auto > paused_crawl: false > websites_config: > issy.com: > blacklisted_patterns: > - /publications.*?id=.* > issy-tourisme-international.com: > blacklisted_patterns: > - /recherche.* > websiteURL: > - https://www.issy.com/ > - https://www.issy-tourisme-international.com > - https://quotes.toscrape.com/ > crawlerId: issy.com > ``` > > This configuration : > > * **excludes** all URLs paths beginning with `/recherche` for [www.issy-tourisme-international.com](http://www.issy-tourisme-international.com) > * **excludes** all URLs paths beginning with `/publications` for issy.com and with a `id=` query string parameter > * crawls **every discovered URL** for quotes.toscrape.com > [accordion] Content xpath filter > > Configure what text content is extracted with xpath filters : > > ```yaml theme={null} > slug: Crawler > config: > websiteURL: > - https://www.mywebsite.fr/ > websites_config: > mywebsite.fr: > xpath_filter: ancestor::main > ``` > > This configuration only extracts text under any `
` HTML tags. > > > [!NOTE] > > > > xpath\_filter is always included inside this parent xpath : `/html/body/descendant::text()[not(ancestor::style) and not(ancestor::script) and not(ancestor::header) and not(ancestor::footer) and {xpath_filter}]` > > Useful xpath examples : > > ```yaml theme={null} > ancestor::div[contains(@id, 'cal_page-article-fiche')]/header/div > > not(ancestor::*[contains(@id, 'ref-bottom') or contains(@id, 'ref-header')]) > > not(ancestor::*[contains(@class, 'navbar')]) and ancestor::p > ``` > [accordion] Custom HTTP headers > > Configure HTTP headers per domain : > > ```yaml theme={null} > slug: Crawler > config: > websiteURL: > - https://www.mywebsite.fr/ > websites_config: > mywebsite.fr: > headers: > someCustom: header > ``` > [accordion] Sitemap crawling > > Provide a `websiteURL` ending with **sitemap.xml** to only crawl the URLs listed in that sitemap : > > ```yaml theme={null} > slug: Crawler > config: > websiteURL: > - https://www.example.com/sitemap.xml > crawlerId: example.com > ``` > [accordion] Scheduling Configuration > > Set up recurring crawl schedules: > > ```yaml theme={null} > slug: Crawler > config: > periodicity: 259200 > ``` > > This configuration schedules a crawl to be run every 3 days. > [accordion] Content extraction methods > > You can choose different content extraction strategies, separately for HTML or Documents. > > ```yaml theme={null} > slug: Crawler > config: > websites_config: > docs.prisme.ai: > parsers: > documents: tika > html: xpath > ``` > > This configuration will use docling to parse the documents and html from the domain `docs.prisme.ai`. > > Possible values are: > > * Documents: `unstructured` (default) or `tika` > * html: `xpath` (default) > > You can send additional arguments specific to Tika/Unstructured by creating a dedicated Alias for them. Here is an example showing the available options: > > ```yaml theme={null} > slug: Crawler > config: > parsers: > tikaOCR: > type: tika > skip_ocr: false # Default value is true (no OCR) > tikaOCRFull: > type: tika > skip_ocr: false > pdf_ocr_strategy: 'ocr_and_text_extraction' # Default value is auto (no OCR if any raw text is detected) > unstructuredOCR: > type: unstructured > strategy: auto # Default strategy is fast (= no OCR) > websites_config: > docs.prisme.ai: > parsers: > documents: tikaOCR > html: xpath > ``` ## Common Use Cases The Crawler app enables a wide range of use cases: > [card] Knowledge Base Creation > > Build comprehensive AI knowledge bases from website content: > > * Documentation portals > * Product information sites > * Support knowledge bases > * Internal wikis > [card] Content Monitoring > > Keep track of changes and updates on important websites: > > * Competitor websites > * Industry news sources > * Regulatory publications > * Product documentation > [card] Data Collection > > Gather structured data from web sources: > > * Product catalogs > * Price information > * Company directories > * Research publications > [card] Website to RAG Agent > > Transform websites into conversational AI agents: > > * Company websites > * Documentation portals > * Educational resources > * Knowledge repositories ## Integration with Other Prisme.ai Products The Crawler app works seamlessly with other Prisme.ai products: > [tab] Knowledges > > The Crawler is a primary data source for Knowledges: > > * Extract web content for knowledge bases > * Keep information current through scheduled crawls > * Process and structure content for optimal retrieval > * Preserve source attribution for transparency > > This integration enables the creation of AI agents that can answer questions based on website content. > [tab] Builder > > Use the Crawler in your automation workflows: > > * Trigger automations based on website changes > * Process and transform web content > * Extract specific data for decision-making > * Integrate web content with other data sources > > This enables sophisticated automations that leverage web data. > [tab] Custom Code > > Combine the Crawler with Custom Code for advanced processing: > > * Apply custom transformations to extracted content > * Implement specialized parsing logic > * Analyze content with custom algorithms > * Generate derived insights from crawled data > > This combination provides maximum flexibility for handling web content. > [tab] Collection > > Store crawled content in Collection for persistence and querying: > > * Save structured content for later use > * Build queryable repositories of web information > * Track changes over time > * Combine with other data sources > > This integration provides persistent storage and retrieval capabilities for crawled content. ## Example: Creating a Website RAG Agent One of the most popular use cases for the Crawler is creating a Retrieval-Augmented Generation (RAG) agent based on website content: **1. Configure the Crawler** Set up the Crawler to extract content from the target website: ```yaml theme={null} slug: Crawler config: websiteURL: - https://www.example.com/ websites_config: mywebsite.fr: xpath_filter: '(ancestor:article or ancestor::*[contains(@class, 'main-content')])' ``` **2. Create an Knowledges Project** Set up a new project in Knowledges to house the crawled content: * Create a new project * Configure embedding and chunk settings * Set up appropriate processing options **3. Connect the Crawler to Knowledges** Configure the connection between the Crawler and Knowledges: * Select the crawler as a data source * Map crawled content to knowledge base structure * Configure metadata and attribute mapping **4. Run the Initial Crawl** Execute the first crawl to populate your knowledge base: * Monitor the crawl progress * Verify content extraction quality * Address any issues or adjustments needed **5. Configure the RAG Agent** Set up an AI agent that uses the crawled content: * Configure prompt templates * Set retrieval parameters * Define response formatting * Test with sample questions **6. Deploy and Monitor** Make the agent available and keep it current: * Publish the agent to Agent Creator * Set up scheduled crawls for updates * Monitor usage and performance * Refine based on feedback The result is an AI agent that can answer questions based on the content of the website, providing accurate and up-to-date information. ## Best Practices Follow these recommendations to get the most from the Crawler app: > [accordion] Respectful Crawling > > Be a good web citizen: > > * Respect robots.txt directives > * Implement appropriate rate limiting > * Identify your crawler with a meaningful user agent > * Crawl during off-peak hours when possible > * Only extract content you have permission to use > > These practices help maintain good relationships with the websites you crawl. > [accordion] Content Selection > > Be selective about what you crawl: > > * Focus on the most valuable content > * Use specific CSS selectors for precision > * Exclude boilerplate and repetitive content > * Be mindful of content that changes frequently > * Consider the information architecture of the site > > Targeted crawling improves efficiency and content quality. > [accordion] Incremental Updates > > Optimize ongoing crawling: > > * Use incremental updates when possible > * Schedule crawls based on content update frequency > * Focus on changed content rather than recrawling everything > * Implement change detection mechanisms > * Archive historical versions when appropriate > > These approaches minimize resource usage while keeping content current. > [accordion] Error Handling > > Prepare for crawling challenges: > > * Monitor for crawl failures > * Implement retries for transient errors. > * Have fallback mechanisms for critical content > * Set up notifications for persistent issues > * Regularly review crawl logs > > Robust error handling ensures reliable content extraction. ## Limitations and Considerations When using the Crawler app, be aware of these considerations: * **JavaScript-Heavy Sites**: Some websites rely heavily on JavaScript for content rendering. The Crawler includes JavaScript processing capabilities, but complex single-page applications might present challenges. * **Authentication Requirements**: Websites requiring login can be crawled, but require additional configuration for authentication handling. * **Legal and Terms of Service**: Always ensure you have the right to crawl and use the content from websites, respecting their terms of service. * **Dynamic Content**: Content that changes based on user interaction or personalization may not be fully captured. * **Resource Intensity**: Comprehensive crawling can be resource-intensive. Consider scope and frequency based on your needs and available resources. ## Next Steps > [card] [API Integrations](/apps-store/marketplace/api) > > Learn about connecting to external APIs > [card] [Custom Code](/apps-store/marketplace/custom-code) > > Execute custom logic within your workflows > [card] [Collection](/apps-store/marketplace/collection) > > Manage data with simplified database access > [card] [Website to RAG Tutorial](/resources/tutorials/website-to-rag-agent) > > Follow a detailed tutorial on creating a website RAG agent # Custom Code Source: https://docs.prisme.ai/apps-store/marketplace/custom-code Execute custom JavaScript and Python code within your Prisme.ai workflows The Custom Code app is a powerful infrastructure component in the Prisme.ai ecosystem that allows you to execute custom logic within your automations and workflows. It provides a secure, managed environment for running JavaScript and Python code, enabling complex data transformations, integrations, and calculations that go beyond what's possible with standard automation steps. ## Overview Custom Code serves as a flexible extension point for your Prisme.ai solutions: > [card] Code Execution > > Run custom JavaScript and Python code in a secure environment > [card] Data Transformation > > Transform data with complex logic and algorithms > [card] Integration Bridge > > Connect to systems without pre-built integrations > [card] Advanced Processing > > Implement sophisticated data processing and analytics This infrastructure app is particularly valuable for handling unique business logic, specialized calculations, and custom data processing requirements. In Builder, the custom code you write can be declared as a **capability** scoped platform-level (the whole platform) or tenant-level (a single organization), so it is built once, reviewed once, and reused as a governed building block. This pools security and quality: credentials are managed once, access is governed by role and scope, and every call is traced. This matters as agents increasingly generate their own code, so you avoid a sprawl of unreviewed, inconsistently-secured logic. ## Key Features > [tab] Code Execution Environment > > A secure, controlled environment for running code: > > * **JavaScript Runtime**: Execute JavaScript/TypeScript > * **Python Runtime**: Run Python 3.x code > * **Isolation**: Code runs in a containerized environment > * **Resource Limits**: CPU, memory, and execution time controls > * **Version Management**: Control runtime versions > > This execution environment balances flexibility with security and stability. > [tab] Function Management > > Organize and manage custom functions: > > * **Function Library**: Central repository of reusable functions > * **Version Control**: Track changes to functions over time > * **Parameter Definition**: Define and validate input parameters > * **Default Values**: Set fallback values for optional parameters > * **Documentation**: Document function purpose and usage > > These management features promote code reuse and maintainability. > [tab] Integration Capabilities > > Connect code with the broader Prisme.ai ecosystem: > > * **Workflow Integration**: Call functions from automations > * **Data Passing**: Exchange data between functions and workflows > * **Context Access**: Access runtime context information > * **Error Handling**: Robust error management > * **Logging**: Capture execution details for monitoring > > These integration capabilities create a seamless experience within your workflows. > [tab] Development Tools > > Tools to support code development and testing: > > * **Code Editor**: Syntax highlighting and assistance > * **Testing Framework**: Validate function behavior > * **Debugging Tools**: Identify and resolve issues > * **Execution History**: Review past runs and outputs > * **Performance Metrics**: Monitor execution efficiency > > These development tools improve productivity and code quality. ## How Custom Code Works Custom Code functions are defined, managed, and executed through a structured process: **1. Function Definition** Create a function with code, parameters, and metadata: * Write the function code * Define input parameters with types and validation * Specify output format * Add documentation **2. Storage and Management** Store functions in the Custom Code repository: * Save to the function library * Version and track changes * Organize by category or purpose * Control access permissions **3. Execution from Workflows** Call functions from automations: * Reference the function by name * Provide required parameters * Map workflow data to parameters * Capture the function output **4. Runtime Execution** Execute the function in a secure environment: * Validate input parameters * Run the code in an isolated container * Monitor execution and resource usage * Handle errors and exceptions **5. Result Processing** Return the result to the calling workflow: * Format the output according to specifications * Pass the result back to the workflow * Log execution details * Track performance metrics This process provides a controlled yet flexible way to include custom logic in your automations. ## JavaScript Functions JavaScript functions in Custom Code allow you to implement a wide range of data processing and transformation tasks: > [accordion] Function Structure > > The basic structure of a JavaScript function: > > ```javascript theme={null} > // Function to transform data > function processData(data) { > // Data processing logic > const result = data.map(item => { > return { > id: item.id, > name: item.name.toUpperCase(), > value: item.amount * 1.1 > }; > }); > > return result; > } > > // Export the function result > return processData(data); > ``` > > This function takes a data parameter, transforms it, and returns the result. > [accordion] Parameter Configuration > > Configure function parameters for validation and documentation: > > ```yaml theme={null} > functions: > processData: > code: | > // Function code here > parameters: > data: > type: array > description: Array of items to process > default: [] > ``` > > This configuration defines a `data` parameter of type `array` with a description and default value. > [accordion] Advanced Example > > A more sophisticated JavaScript function: > > ```javascript theme={null} > // Function to classify text > function classifyText(text, categories) { > // Simple classification logic > const lowerText = text.toLowerCase(); > > // Check each category for matches > for (const category of categories) { > for (const keyword of category.keywords) { > if (lowerText.includes(keyword.toLowerCase())) { > return { > category: category.name, > confidence: 0.8, > keyword: keyword > }; > } > } > } > > // Default classification > return { > category: 'unclassified', > confidence: 0.5, > keyword: null > }; > } > > // Export the function result > return classifyText(text, categories); > ``` > > This function classifies text based on keyword matching against categories. > [accordion] Available Libraries > > JavaScript functions have access to built-in libraries whitelisted by your orgnization registry. > > These libraries help you accomplish common tasks without reinventing the wheel. > > ```javascript theme={null} > // Example using libraries > const _ = require('lodash'); > const moment = require('moment'); > const axios = require('axios'); > > async function processData(data) { > // Group data by date > const grouped = _.groupBy(data, item => > moment(item.timestamp).format('YYYY-MM-DD') > ); > > // Enrich with external data > for (const date in grouped) { > try { > const response = await axios.get(`https://api.example.com/data/${date}`); > grouped[date].externalData = response.data; > } catch (error) { > console.error(`Error fetching data for ${date}:`, error.message); > } > } > > return grouped; > } > > // Export the function result > return processData(data); > ``` ## Python Functions Python functions in Custom Code provide access to Python's rich ecosystem for data analysis, machine learning, and scientific computing: > [accordion] Function Structure > > The basic structure of a Python function: > > ```python theme={null} > # Function to analyze numeric data > def analyze_data(data): > # Data analysis logic > result = { > 'count': len(data), > 'sum': sum(data), > 'average': sum(data) / len(data) if data else 0, > 'min': min(data) if data else None, > 'max': max(data) if data else None > } > > return result > > # Execute the function and return result > result = analyze_data(data) > ``` > > This function takes a list of numeric values and returns basic statistical measures. > [accordion] Parameter Configuration > > Configure Python function parameters: > > ```yaml theme={null} > functions: > analyze_data: > code: | > # Python code here > parameters: > data: > type: array > description: Array of numeric values to analyze > default: [] > ``` > > This configuration is similar to JavaScript function parameters, providing type information, description, and default values. > [accordion] Advanced Example > > A more sophisticated Python function: > > ```python theme={null} > import pandas as pd > from sklearn.cluster import KMeans > import numpy as np > > def cluster_data(data, num_clusters=3): > # Convert to DataFrame if not already > if not isinstance(data, pd.DataFrame): > df = pd.DataFrame(data) > else: > df = data > > # Select numeric columns > numeric_cols = df.select_dtypes(include=[np.number]).columns > features = df[numeric_cols].fillna(0) > > # Perform clustering > kmeans = KMeans(n_clusters=num_clusters, random_state=42) > df['cluster'] = kmeans.fit_predict(features) > > # Compute cluster statistics > cluster_stats = df.groupby('cluster').agg({ > col: ['mean', 'min', 'max', 'count'] for col in numeric_cols > }) > > return { > 'clustered_data': df.to_dict(orient='records'), > 'cluster_centers': kmeans.cluster_centers_.tolist(), > 'cluster_stats': cluster_stats.to_dict() > } > > # Execute and return result > result = cluster_data(data, num_clusters) > ``` > > This function performs K-means clustering on numeric data and returns the clustered data, cluster centers, and statistics. > [accordion] Available Libraries > > Python functions have access to popular data science and utility libraries whitelisted by your DevSecOps Teams. > > These libraries enable sophisticated data analysis and machine learning within your workflows. > > ```python theme={null} > import pandas as pd > import numpy as np > from nltk.sentiment import SentimentIntensityAnalyzer > import requests > > def analyze_sentiment(texts): > # Initialize sentiment analyzer > sia = SentimentIntensityAnalyzer() > > # Analyze each text > results = [] > for text in texts: > sentiment = sia.polarity_scores(text) > results.append({ > 'text': text, > 'sentiment': sentiment, > 'classification': 'positive' if sentiment['compound'] > 0.05 > else 'negative' if sentiment['compound'] < -0.05 > else 'neutral' > }) > > # Get overall statistics > df = pd.DataFrame(results) > stats = { > 'positive_count': sum(df['classification'] == 'positive'), > 'negative_count': sum(df['classification'] == 'negative'), > 'neutral_count': sum(df['classification'] == 'neutral'), > 'average_compound': np.mean(df['sentiment'].apply(lambda x: x['compound'])) > } > > return { > 'detailed_results': results, > 'statistics': stats > } > > # Execute the function > result = analyze_sentiment(texts) > ``` ## Integration with Prisme.ai Workflows Custom Code is designed to integrate seamlessly with Prisme.ai automations: **1. Calling Functions from Automations** Reference Custom Code functions in your automation YAML: ```yaml theme={null} slug: process-data-workflow name: Process Data Workflow do: - Custom Code.run function: function: processData parameters: data: '{{payload.items}}' output: processedData - emit: event: data-processed payload: result: '{{processedData}}' ``` This automation calls the `processData` function with input from the payload and emits the result as an event. **2. Handling Function Results** Process the output from Custom Code functions: ```yaml theme={null} - conditions: '{{processedData.success}}': - Collection.insert: data: '{{processedData.items}}' default: - emit: event: processing-error payload: error: '{{processedData.error}}' ``` This example shows conditional logic based on the function's output. **3. Error Handling** Implement robust error handling for Custom Code execution: ```yaml theme={null} - Custom Code.run function: function: riskAnalysis parameters: data: '{{payload.clientData}}' output: riskResult - conditions: '{{riskResult.error}}': - set: name: errorDetails value: message: "Error in risk analysis" details: '{{riskResult.error}}' timestamp: '{% now() %}' - Collection.insert: data: '{{errorDetails}}' collection: errors - break: {} default: [] ``` This approach captures and logs errors from function execution. ## Common Use Cases Custom Code enables a wide range of use cases: > [card] Data Transformation > > Implement complex data transformations: > > * Format conversion > * Schema mapping > * Data normalization > * Content extraction > [card] Advanced Analysis > > Perform sophisticated data analysis: > > * Statistical calculations > * Pattern recognition > * Trend identification > * Risk assessment > [card] Integration Logic > > Create custom integration components: > > * API request formatting > * Response processing > * Protocol implementations > * Legacy system connections > [card] Business Logic > > Implement specialized business rules: > > * Pricing calculations > * Eligibility determinations > * Approval workflows > * Validation logic ## Example: Data Classification A common use case for Custom Code is classifying data based on content. Here's an example that classifies documents: ```javascript theme={null} // Function to classify documents function classifyDocument(document) { // Extract text content const text = document.content.toLowerCase(); // Define classification patterns const classifications = [ { category: "invoice", patterns: ["invoice", "bill to", "payment due", "invoice number", "total amount"] }, { category: "contract", patterns: ["agreement", "terms and conditions", "parties", "hereby agree", "signature"] }, { category: "resume", patterns: ["experience", "education", "skills", "employment", "qualification"] }, { category: "report", patterns: ["analysis", "findings", "conclusion", "summary", "recommendations"] } ]; // Score each category const scores = classifications.map(classification => { let score = 0; // Count pattern matches for (const pattern of classification.patterns) { if (text.includes(pattern)) { score += 1; } } return { category: classification.category, score: score / classification.patterns.length }; }); // Find the highest scoring category const bestMatch = scores.reduce((best, current) => current.score > best.score ? current : best, { category: "other", score: 0 } ); // Only classify if score is above threshold if (bestMatch.score >= 0.3) { return { category: bestMatch.category, confidence: bestMatch.score, document_id: document.id }; } else { return { category: "unknown", confidence: 0, document_id: document.id }; } } // Execute the function and return result return classifyDocument(document); ``` This function analyzes document content, scoring it against different category patterns, and assigns the most likely classification if it meets a minimum confidence threshold. ## Example: Advanced Data Analysis with Python When you need sophisticated data analysis, Python's ecosystem provides powerful capabilities: ```python theme={null} import pandas as pd import numpy as np from sklearn.ensemble import IsolationForest def detect_anomalies(transactions): # Convert to DataFrame df = pd.DataFrame(transactions) # Select numeric features features = df[['amount', 'transaction_count', 'average_value']] # Fit isolation forest model model = IsolationForest(contamination=0.05, random_state=42) df['anomaly'] = model.fit_predict(features) # Anomaly is -1, normal is 1, convert to boolean df['is_anomaly'] = df['anomaly'] == -1 # Calculate anomaly score (higher means more anomalous) df['anomaly_score'] = model.score_samples(features) df['anomaly_score'] = 1 - (df['anomaly_score'] - df['anomaly_score'].min()) / (df['anomaly_score'].max() - df['anomaly_score'].min()) # Identify anomalous transactions anomalies = df[df['is_anomaly']].sort_values('anomaly_score', ascending=False) # Prepare results result = { 'anomaly_count': len(anomalies), 'anomaly_percentage': (len(anomalies) / len(df)) * 100, 'anomalies': anomalies.to_dict(orient='records'), 'anomaly_statistics': { 'amount': { 'mean': anomalies['amount'].mean(), 'min': anomalies['amount'].min(), 'max': anomalies['amount'].max() }, 'transaction_count': { 'mean': anomalies['transaction_count'].mean(), 'min': anomalies['transaction_count'].min(), 'max': anomalies['transaction_count'].max() } } } return result # Execute the function result = detect_anomalies(transactions) ``` This Python function uses the Isolation Forest algorithm to detect anomalous transactions based on multiple features, providing detailed information about the detected anomalies. ## Best Practices Follow these recommendations to get the most from Custom Code: > [accordion] Code Quality > > Maintain high standards of code quality: > > * Write clean, readable code with proper indentation > * Include comments to explain complex logic > * Use meaningful variable and function names > * Break complex functions into smaller, focused ones > * Add error handling for robustness > * Validate inputs and handle edge cases > > Quality code is easier to maintain and less prone to errors. > [accordion] Performance Optimization > > Optimize code for efficient execution: > > * Minimize external API calls > * Use efficient data structures and algorithms > * Avoid unnecessary loops and iterations > * Process only the data you need > * Use built-in functions and libraries when available > * Consider the impact of large datasets > > Efficient code runs faster and uses fewer resources. > [accordion] Security Considerations > > Implement secure coding practices: > > * Validate and sanitize all inputs > * Avoid hardcoded credentials > * Use platform security features > * Be cautious with external libraries > * Implement proper error handling > * Follow the principle of least privilege > > Security should be a fundamental consideration in all custom code. > [accordion] Testing and Debugging > > Thoroughly test your functions: > > * Test with various input scenarios > * Check edge cases (empty data, large data, etc.) > * Verify error handling > * Use logging for debugging > * Validate outputs against expected results > * Update tests when functions change > > Comprehensive testing ensures reliability and correctness. ## Limitations and Considerations When using Custom Code, be aware of these considerations: * **Execution Environment**: Code runs in a controlled environment with resource limits. Very compute-intensive operations may not be suitable. * **External Access**: For security reasons, network access is restricted. External API calls and file system access follow platform security policies. * **Runtime Duration**: Functions have maximum execution times. Long-running operations should be designed with this in mind. * **Library Availability**: While many common libraries are available, some specialized packages may not be pre-installed. Check documentation for the current list. * **State Management**: Functions are stateless by default. Persistent state should be stored using platform services like Collection. ## Integration with Other Prisme.ai Products Custom Code works seamlessly with other Prisme.ai products: > [tab] Knowledges > > Enhance Knowledges with custom processing: > > * Pre-process documents before ingestion > * Create custom embedding algorithms > * Implement specialized reranking logic > * Generate synthetic training data > * Analyze query patterns and performance > > This integration improves retrieval accuracy and knowledge base utility. > [tab] Builder > > Extend automation capabilities with custom logic: > > * Implement complex workflow decisions > * Create custom integration points > * Build specialized data transformations > * Generate dynamic content > * Process and analyze event data > > This combination enables sophisticated automation scenarios. > [tab] Crawler > > Enhance web content extraction with custom processing: > > * Implement specialized content extraction > * Clean and normalize crawled data > * Filter and categorize content > * Extract structured data from HTML > * Transform content into specific formats > > This integration improves the quality and usability of extracted web content. > [tab] Collection > > Add sophisticated data operations for Collection: > > * Implement custom querying logic > * Create specialized aggregations > * Build data migration tools > * Generate data quality reports > * Perform batch processing operations > > This combination enhances data management capabilities. ## Next Steps > [card] [API Integrations](/apps-store/marketplace/api) > > Learn about connecting to external APIs > [card] [Crawler](/apps-store/marketplace/crawler) > > Discover web content extraction capabilities > [card] [Collection](/apps-store/marketplace/collection) > > Manage data with simplified database access > [card] [Extending Apps](/apps-store/marketplace/extending-apps) > > Create your own custom integrations # Extending Apps Source: https://docs.prisme.ai/apps-store/marketplace/extending-apps Create custom integrations and extensions for your Prisme.ai environment The Prisme.ai App Store is designed to be extensible, allowing organizations to create custom integrations, tools, and components that address their specific needs. This page explains how to build, deploy, and share your own apps, expanding the platform's capabilities while maintaining governance and standardization. In Builder you build your own connectors, MCP servers, and custom code, then declare them as **capabilities**, scoped either **platform-level** (available to the whole platform and every organization) or **tenant-level** (a single organization). This is the **build-once, reuse-everywhere** model: instead of each team, or, increasingly, each agent, re-implementing and re-securing the same integration, a capability is built once, reviewed once, and reused as a governed building block. It pools security and quality across your enterprise: credentials are managed once, access is governed by role and scope, and every call is traced. You get fast integration without a sprawl of unreviewed, inconsistently-secured connectors. ## Why Build Custom Apps? Custom apps provide several significant advantages for organizations: > [card] Legacy System Integration > > Connect Prisme.ai to your organization's existing systems and infrastructure > [card] Specialized Workflows > > Create purpose-built apps for your industry or domain-specific processes > [card] Centralized Security > > Manage credentials and access controls in one secure location > [card] Standardization > > Establish consistent integration patterns across your organization By building your own apps, you create an internal App Store that maximizes reuse, ensures security, and enables AI agents to leverage all your organizational tools and systems. ## Types of Custom Apps You can create several types of custom apps for the App Store: > [tab] API Integrations > > Connect to external services and APIs: > > * Legacy internal systems > * Specialized SaaS products > * Industry-specific platforms > * Custom services and microservices > > API integrations standardize how your automations and agents interact with external systems. > [tab] UI Components > > Build specialized interface elements: > > * Industry-specific visualizations > * Custom form components > * Specialized interface widgets > * Corporate design system components > > UI components enhance user interfaces with specialized functionality and consistent branding. > [tab] Tool Extensions > > Create specialized tools for AI agents: > > * Domain-specific calculations > * Industry data processing > * Specialized document handling > * Custom validation rules > > Tool extensions expand what AI agents can do, making them more capable in your specific context. > [tab] Hybrid Apps > > Build comprehensive solutions combining multiple aspects: > > * Backend services with frontend components > * Data processing with visualization > * API integration with specialized UI > > Hybrid apps provide end-to-end solutions for complex use cases. ## App Development Process Creating a custom app for Prisme.ai follows a structured process: **1. Planning and Design** Define your app's purpose and architecture: * Identify the need or gap to address * Define the app's functionality and interfaces * Plan the user experience and integration points * Design security and access control **2. Development Setup** Create a dedicated workspace for your app: * Start with a clean workspace in Prisme.ai Builder * Name it according to your app's purpose * Set appropriate visibility and access controls * Configure initial settings **3. Implementation** Build the core functionality of your app: * Create automations for backend logic * Develop UI components if needed * Configure integration points and parameters * Implement security and credential management **4. Documentation** Create comprehensive documentation for your app: * Usage instructions and examples * Configuration options * Parameter descriptions * Troubleshooting information **5. Testing** Validate your app's functionality and reliability: * Test with various inputs and scenarios * Verify error handling * Check performance under load * Validate security controls **6. Publication** Make your app available to users: * Create a version for deployment * Declare it as a capability at the right scope, platform-level for the whole enterprise, or tenant-level for a single organization * Define access controls and visibility * Communicate availability to users This systematic approach ensures that your apps are well-designed, reliable, and easy to use. ## Next Steps > [card] [Custom Apps Development](/resources/tutorials/ai-builder-custom-apps) > > Learn to build more complex applications with Builder > [card] [API Integrations](/apps-store/marketplace/api) > > Learn about connecting to external APIs > [card] [Custom Code](/apps-store/marketplace/custom-code) > > Execute custom logic within your workflows > [card] [Collection](/apps-store/marketplace/collection) > > Manage data with simplified database access # App Store Overview Source: https://docs.prisme.ai/apps-store/overview Build and reuse capabilities: connectors, MCP servers, and custom code, published as versioned apps across the platform. ![Builder App Store demo](https://mintcdn.com/prismeai/aeoZotWUElytZatb/gifs/app-store-demo.gif?s=0573721d1bdd7eb4ba687f49eba3b495) Prisme.ai provides a powerful and flexible App Store that enables you to extend the platform with various integration points, connect to external data sources, and create reusable components across your organization. Alongside ready-made apps, **you build your own** connectors, **MCP servers**, and custom code in [Builder](/products/ai-builder/overview), then declare them as **capabilities** available across the platform. In the current Builder UI, open any workspace and click **+** beside **Imports** to browse the App Store. ## What is the App Store? The App Store is Prisme.ai's central hub for discovering, installing, and managing integrations and extensions. It provides a standardized way to incorporate external services, data sources, and specialized capabilities into your AI projects. > [card] Centralized Integration Hub > > A single location for all your integration needs, simplifying discovery and management > [card] Enterprise Security Controls > > Secure app management with centralized credential handling and access permissions > [card] Reusable Components > > Share capabilities across teams and projects to maximize development efficiency > [card] Standardized Interface > > Consistent interaction patterns that reduce learning curve and integration complexity ## Build once, govern everywhere: your own capabilities Ready-made apps are only half the story. The real power for an enterprise is that **you build your own capabilities in [Builder](/products/ai-builder/overview)**, custom **connectors**, **MCP servers**, and custom code, and expose them the same way the built-in apps are exposed. Once built, a capability is **declared at one of two scopes**: > [card] Platform-level > > Publish the capability for the **whole platform**. Every organization can install and reuse it, the shared, curated catalog for your enterprise. > [card] Tenant-level > > Scope the capability to a **single organization** (tenant). Only that org sees it, perfect for team-specific or sensitive integrations. This is the **build-once, reuse-everywhere** model: a connector or MCP server developed once becomes a governed building block that any authorized agent or workspace can call, instead of being re-implemented (and re-secured) in every project. > [!NOTE] > > **Why this matters as agents start generating code.** When many teams, and increasingly agents themselves, generate integration code, you risk a sprawl of unreviewed, inconsistently-secured connectors: the exact chaos Prisme.ai exists to prevent. Declaring capabilities centrally lets you **pool security and quality**: credentials are managed once, access is governed by role and scope, and every call is traced. You get the agility of fast integration **without** each new connector becoming a new attack surface or a new silo. ## Types of Apps The App Store includes various types of integrations to address different needs: > [tab] API Connectors > > Connect to external services and APIs: > > * Email services (SendMail, Mailjet, etc.) > * CRM platforms (Salesforce, Dynamics, etc.) > * Collaboration tools (Slack, Teams, etc.) > * Document management systems (SharePoint, Google Drive, etc.) > * Payment processors > * And many more > > API connectors handle authentication, data transformation, and communication protocols, allowing you to seamlessly integrate external systems with your AI solutions. > [tab] Infrastructure Apps > > Access Prisme.ai platform microservices and infrastructure components: > > * Crawler for web content extraction > * Custom Code for complex data processing > * Collection for simplified database access > * Authentication services > * Vector stores > * Storage solutions > > These apps leverage the underlying infrastructure of Prisme.ai, providing managed services that eliminate the need for separate deployments. > [tab] UI Components > > Enhance your interfaces with specialized UI components: > > * Dialog boxes and modals > * Advanced charts and visualizations > * Form components > * Navigation elements > * Data tables > * Media players > > UI components help you build rich, interactive interfaces without developing everything from scratch. > [tab] Hybrid Solutions > > Comprehensive apps that combine multiple aspects: > > * Backend services with frontend components > * Data processing with visualization > * Integration with specialized UI > > These unified solutions address complex use cases through a single app installation. ## Key Benefits of the App Store > [card] Reduced Development Time > > Leverage pre-built integrations instead of developing from scratch > [card] Enhanced Security > > Centralized credential management and access controls > [card] Standardization > > Consistent patterns across integrations > [card] Scalability > > Enterprise-grade performance for high-demand scenarios > [card] Governance > > Visibility and control over app usage > [card] Reusability > > Share capabilities across projects and teams ## Integration Architecture The App Store is built on a modular architecture that enables seamless integration with both the Prisme.ai platform and external systems: **1. App Discovery and Installation** Users browse the App Store, review available apps, and install them to their workspace **2. Configuration and Authentication** Apps are configured with necessary credentials and settings, which are securely stored **3. Usage in Automations and Interfaces** Installed apps expose actions, data sources, or components that can be used in workflows and interfaces **4. Runtime Integration** When invoked, apps connect to their respective services or provide functionality according to their design **5. Monitoring and Management** Usage, performance, and security are monitored through the platform's governance features ## Common Use Cases > [accordion] AI Agent Augmentation > > Extend AI agents with capabilities beyond conversation: > > * Enable agents to send emails or notifications > * Allow agents to retrieve data from enterprise systems > * Give agents the ability to update records in external databases > * Provide agents with real-time data from APIs > > This transforms AI agents from purely conversational interfaces into active participants in business processes, capable of taking actions and accessing up-to-date information. > [accordion] Data Integration for RAG > > Enhance Retrieval-Augmented Generation with diverse data sources: > > * Crawl websites for current information > * Connect to document management systems > * Access enterprise databases > * Integrate with knowledge management platforms > > This ensures that your AI systems have access to the most relevant and current information, improving response accuracy and usefulness. > [accordion] Workflow Automation > > Create end-to-end business processes with integrated apps: > > * Trigger workflows from external events > * Process and transform data > * Make decisions based on AI analysis > * Update systems of record > * Send notifications and alerts > > This combines the intelligence of AI with practical business actions, automating complete processes rather than isolated tasks. > [accordion] Custom Interfaces > > Build specialized user experiences with UI components: > > * Interactive dashboards for data visualization > * Domain-specific input forms > * Custom chat interfaces > * Embedded AI assistants in applications > > This allows you to create tailored user experiences that match your brand and workflows while leveraging Prisme.ai's underlying capabilities. ## Internal App Store for Enterprise One of the most powerful aspects of the App Store is the ability to create your own internal App Store with custom integrations: > [card] Legacy System Integration > > Create connectors for your organization's existing systems, making them accessible to AI solutions > [card] Centralized Security > > Manage API keys, credentials, and access controls in one secure location > [card] Cross-Team Sharing > > Share specialized integrations across departments and projects > [card] Standardized Practices > > Establish consistent integration patterns across your organization This internal App Store approach maximizes reuse and allows AI agents to leverage organizational tools and systems, enabling automation at scale while maintaining security and governance. ## Getting Started To begin using the App Store: **1. Open Imports** In Builder, open any workspace and click **+** next to **Imports** in the sidebar. **2. Explore Available Apps** Browse the App Store to discover pre-built integrations and components **3. Install Relevant Apps** Add apps to your workspace based on your integration needs **4. Configure Connections** Set up authentication and other required parameters **5. Use in Workflows** Incorporate app capabilities into your automations and interfaces **6. Consider Custom Apps** For specialized needs, develop custom apps to extend the App Store ## Next Steps > [card] [Security Considerations](/apps-store/security) > > Learn about the security aspects of app integrations > [card] [App Categories](/apps-store/marketplace/categories) > > Discover the different types of available integrations > [card] [Building Custom Apps](/apps-store/marketplace/extending-apps) > > Create your own apps to extend the App Store # App Store Security Source: https://docs.prisme.ai/apps-store/security Security considerations and best practices for Prisme.ai app integrations Security is a critical consideration when integrating external services and data sources with your Prisme.ai environment. This page outlines the security architecture of the App Store, explains how credentials and data are protected, and provides best practices for secure integration management. ## Security Architecture Overview Prisme.ai's App Store is built with a security-first approach that protects sensitive information while enabling powerful integrations: > [card] Isolated Execution > > Apps run in isolated environments with controlled access to resources > [card] Encrypted Credentials > > Authentication details are encrypted at rest and in transit > [card] Granular Permissions > > Fine-grained access controls determine who can use which apps > [card] Audit Logging > > Comprehensive logging of all app installation, configuration, and usage ## Credential Management The App Store includes a secure credential management system that protects authentication information: **1. Encrypted Storage** All credentials (API keys, passwords, tokens, etc.) are encrypted using industry-standard algorithms before being stored **2. Secure Access** Credentials are only accessible to authorized services and users with appropriate permissions **3. No Plain Text Display** Credentials are never displayed in plain text after initial entry, even to administrators **4. Automatic Rotation** Support for automatic credential rotation based on policies or schedules (for compatible services) **5. Centralized Management** Unified interface for managing all integration credentials across the organization ## Data Protection When apps process and transfer data, several protective measures ensure security: > [accordion] Data in Transit > > All communication between Prisme.ai and integrated services is protected: > > * TLS encryption for all data in transit > * Certificate validation to prevent man-in-the-middle attacks > * Modern cipher suites and security protocols > * HTTP security headers for web-based integrations > > These measures ensure that data cannot be intercepted or tampered with during transmission. > [accordion] Data at Rest > > Information stored within the platform is protected through: > > * Encryption of all sensitive data > * Secure key management > * Regular security assessments and penetration testing > * Data minimization practices > > The platform applies the principle of least privilege, storing only necessary information and protecting it with appropriate controls. > [accordion] Data Processing > > During processing, data is protected through: > > * Isolated execution environments > * Memory protection > * Controlled access to resources > * Input validation and output sanitization > > These controls prevent unauthorized access to data during processing and protect against injection attacks and other vulnerabilities. ## Access Control Model The App Store implements a comprehensive access control model: > [tab] App Installation Control > > Organizations can control which apps can be installed: > > * Allow or block specific apps > * Require approval for installation requests > * Limit installation capabilities to specific roles > * Create allowlists of approved apps > > This ensures that only authorized and approved apps are introduced into the environment. > [tab] Usage Permissions > > Once installed, app usage is controlled through: > > * Role-based access controls > * Workspace-level permissions > * Function-level authorization > * Context-based restrictions > > These controls determine who can use which aspects of installed apps and under what circumstances. > [tab] Configuration Management > > Access to app configuration is restricted: > > * Separate permissions for viewing vs. editing configurations > * Credential management restricted to authorized administrators > * Configuration change approval workflows > * Version control and change tracking > > This prevents unauthorized changes to integration settings that could compromise security. ## Integration Risk Assessment When adding new integrations, Prisme.ai helps organizations assess and mitigate risks: **1. Initial Assessment** Evaluate the security posture of the service being integrated: * Review security certifications and compliance * Assess data handling practices * Consider the sensitivity of data being exchanged **2. Permission Scoping** Define the minimum permissions required: * Use the principle of least privilege * Request only necessary access scopes * Limit data access to what's essential **3. Implementation Review** Validate the security of the implementation: * Review authentication mechanisms * Verify data handling practices * Check for appropriate error handling **4. Ongoing Monitoring** Continuously assess integration security: * Monitor for unusual activity * Regularly review access and usage * Update configurations as needs change ## Security Best Practices Follow these recommendations to maintain the security of your app integrations: > [accordion] Credential Management > > * Use dedicated API keys for each integration when possible > * Rotate credentials regularly > * Implement the most secure authentication method available > * Use service accounts with minimum necessary permissions > * Consider using OAuth flows rather than static credentials > * Store sensitive configuration outside source control > * Implement API key expiration and rotation policies > [accordion] Data Handling > > * Limit the data exchanged to what's necessary > * Implement data classification to identify sensitive information > * Apply appropriate controls based on data sensitivity > * Use field-level security to protect specific attributes > * Consider data anonymization or pseudonymization when appropriate > * Validate and sanitize all data inputs and outputs > * Apply encryption for highly sensitive data > [accordion] Monitoring and Incident Response > > * Enable audit logging for all integration activities > * Set up alerts for unusual access patterns > * Regularly review integration usage > * Establish procedures for responding to suspicious activities > * Create a process for emergency credential revocation > * Conduct periodic security reviews of integrations > * Test security incident response plans > [accordion] Compliance Considerations > > * Identify regulatory requirements applicable to your integrations > * Document compliance controls for each integration > * Include integrations in security assessments and audits > * Consider data residency and sovereignty requirements > * Review vendor contracts and terms of service > * Maintain data processing agreements when required > * Update security controls as regulations evolve ## App Approval Workflow For organizations requiring strict control over app usage, Prisme.ai provides a configurable approval workflow: **1. Request Submission** Users request access to specific apps, providing business justification **2. Security Review** Security teams assess the risks and appropriate controls **3. Approval Decision** Designated approvers review and decide on the request **4. Implementation** Upon approval, the app is installed with appropriate controls **5. Documentation** The approval, including justification and controls, is documented This process ensures that new integrations are evaluated from a security perspective before being implemented. ## Internal App Store Security For organizations maintaining their own internal App Store: > [card] App Review Process > > Establish a formal process for reviewing and approving custom apps > [card] Security Requirements > > Define security standards that all custom apps must meet > [card] Secure Development > > Implement secure development practices for custom integrations > [card] Regular Assessment > > Periodically review and update internal apps for security ## Security Features for Common Integration Types > [tab] API Connectors > > * Support for modern authentication protocols (OAuth 2.0, JWT, etc.) > * Automatic handling of token refresh and expiration > * Secure storage of API credentials > * Rate limiting and throttling protection > * Request and response validation > [tab] Infrastructure Apps > > * Isolation between tenant data > * Resource usage quotas and limitations > * Access controls aligned with platform permissions > * Audit logging of all operations > * Secure configuration management > [tab] UI Components > > * Client-side security controls > * Input validation and sanitization > * Protection against common web vulnerabilities > * Secure handling of client-side data > * Controlled access to browser APIs ## Conclusion Security is a shared responsibility between Prisme.ai, app providers, and your organization. By following the best practices outlined in this guide and leveraging the platform's security features, you can safely integrate external services and data sources while maintaining a strong security posture. ## Next Steps > [card] [App Store](/apps-store/overview) > > Explore the App Store structure and features > [card] [API Integrations](/apps-store/marketplace/api) > > Learn about connecting to external APIs securely > [card] [Extending Apps](/apps-store/marketplace/extending-apps) > > Develop secure custom integrations > [card] [Compliance](/resources/security/compliance) > > Broader compliance considerations for Prisme.ai # Overview Source: https://docs.prisme.ai/dsul/overview How Prisme.ai workspaces are built: React only when you need a UI, YAML automations you version in Git, open and reversible. A Prisme.ai workspace is built the way your developers already work, not locked into a proprietary language. When a use case needs a **UI**, it is a standard **React** application. The **backend logic** (automations and agentic workflows) is described in **YAML**, for one practical reason: it versions cleanly in Git and stays reproducible. Together they form the workspace's declarative, versionable definition, what we call **DSUL**: the [Infrastructure-as-Code](/get-started/platform-overview#the-development-lifecycle) layer that keeps agents and applications reproducible instead of scattered across silos. ## A workspace fits the use case A workspace is not always a front-end. You use only the parts your use case needs. > [card] Endpoint or MCP server > > Expose an API endpoint or an MCP server from your automations. No UI required. > [card] Scheduled agentic workflow > > An automation that runs on a schedule, for background and agentic jobs. No UI required. > [card] Single-page app > > A standard **React** front-end on its own, for a focused user experience. > [card] Full-stack > > A React front-end plus endpoints and agentic workflows, fully integrated in one workspace. > [!NOTE] > > A workspace can also be simply **agent-as-code**: a tool used only to provision agents and version everything in Git, with no UI at all. ## Open, not locked in Declarative platforms often raise the same fear: getting trapped in a proprietary language you cannot leave. Prisme.ai is built the opposite way. > [card] A framework your devs know > > When there is a UI, it is a normal **React** single-page application. No proprietary UI language to learn. > [card] YAML only where it earns its keep > > Automations are YAML for one reason: they **version and review in Git**. A practical choice for reproducibility, not a cage. > [card] Open and reversible > > Open-source, exportable, and portable. Your code lives in **your** Git repository, so you can always take it with you. > [card] Scoped code access by design > > Writing raw code is deliberately limited to reduce the risk of **security issues and data leaks**. Most builders stay in safe, governed building blocks; code is opened only where it is needed. ## Everything is a workspace The unit DSUL describes is a **workspace**: a self-contained application that runs on the platform. Every product (Chat, Agent Creator, Knowledges, and the others) is itself a workspace. [Builder](/products/ai-builder/overview) is the tool that creates workspaces and opens them to edit. ![A workspace bundles Pages (React UI), Automations (agentic workflows), Imports (apps and SDKs, pinned), Files, and Activity. Products are workspaces too, opened and edited in Builder.](https://mintcdn.com/prismeai/hEwPRmD2A8x9L3qW/images/concept-workspace.svg?fit=max\&auto=format\&n=hEwPRmD2A8x9L3qW\&q=85\&s=0cba889724417ccfd4c71de9c86f614e) ## Apps are SDKs Publish a workspace and it becomes a versioned **App** in the [App Store](/apps-store/overview), behaving like an SDK. Import that App into another workspace and its instructions become available inside your automations. It is workspaces composing workspaces. ![Publish a workspace as a versioned App in the App Store, then import it into another workspace so its instructions enrich that workspace's automations. Agent Creator is the product; Agent Factory App is the importable SDK.](https://mintcdn.com/prismeai/hEwPRmD2A8x9L3qW/images/concept-sdk.svg?fit=max\&auto=format\&n=hEwPRmD2A8x9L3qW\&q=85\&s=109f9b07dd2f1c7e6a57e93864003569) ## Build it all from VS Code, over MCP The whole platform, whether **self-hosted or cloud**, is reachable from **VS Code over [MCP](/products/ai-securechat/mcp-connections)**, authenticated with your own access tokens. From your editor you build any of the shapes above, with or without a UI. **1. Connect VS Code to the platform** Use the MCP connection so your editor can read and write workspaces with your access tokens. **2. Build what the use case needs** An endpoint or MCP server, a scheduled workflow, a React SPA, a full-stack app, or agent provisioning. For SPA and full-stack, start from the [starter SPA](https://github.com/prismeai/starter-spa). **3. Version with Git** Commit to your own repository. Every change is reviewable through a merge request. See [versioning](/products/ai-builder/versioning). **4. Push to a workspace** Deploy to a sandbox for fast iteration, or promote through Git for a structured, auditable release. See [deployment](/products/ai-builder/deployment). ## Core components * **Pages**: the front-end, a standard **React** SPA. Optional, only when the use case has a UI (start from the [starter SPA](https://github.com/prismeai/starter-spa)) * **Automations**: backend logic and agentic workflows, described in **YAML** so they version in Git. Can expose an endpoint, an MCP server, or run on a schedule * **Imports**: connectors, apps, MCP servers, and custom code installed into the workspace * **Files**: documents and assets used by the workspace * **Activity**: the workspace's execution events, for observability * **RBAC**: fine-grained access control over all of the above ## Why this model for the enterprise * **A framework devs already know**: React for the front-end, YAML only for automations, no proprietary stack to adopt. * **Reproducible by default**: everything lives in Git, with merge requests and environment promotion. See [versioning](/products/ai-builder/versioning) and [deployment](/products/ai-builder/deployment). * **Shared, standardized infrastructure**: many workspaces run on the same multi-tenant platform with logical isolation, instead of dedicated infrastructure per agent. See [Platform Overview](/get-started/platform-overview). * **Cloud and LLM agnostic**: the same workspace runs on any major cloud or on-premises, with no vendor lock-in. * **Native observability and traceability**: every action is a normalized event with a correlation ID, so monitoring and audit are built in. * **Governed by design**: RBAC, audit trails, and central policy across every workspace, with code access scoped to limit security and leak risk. See [Governe](/products/ai-governance/overview). ## Next steps > [card] [Starter SPA](https://github.com/prismeai/starter-spa) > > The React starter for SPA and full-stack workspaces, in VS Code > [card] [Builder](/products/ai-builder/overview) > > Create and edit workspaces: pages, automations, imports, and activity > [card] [App Store](/apps-store/overview) > > Publish and import Apps and MCP servers as reusable capabilities > [card] [Platform Overview](/get-started/platform-overview) > > Architecture, development lifecycle, and governance # Account Setup and Configuration Source: https://docs.prisme.ai/get-started/account-setup Configure your Prisme.ai account and environment Setting up your Prisme.ai account correctly ensures you can make the most of the platform's capabilities. This guide walks you through the essential configuration steps and options. ## User Account Setup The onboarding process varies depending on the type of subscription you or your organization has. > [tab] Enterprise Users > > **1. SSO Authentication** > > For Enterprise customers, simply log in with your company's SSO. Your account will be automatically created and configured with the appropriate access rights based on your role in the organization. > > ![Prisme.ai sign-in screen with SSO options](https://mintcdn.com/prismeai/GnmZ7SyyCbjmVFba/images/get-started-sso-login.png?fit=max\&auto=format\&n=GnmZ7SyyCbjmVFba\&q=85\&s=655ce008636bfab2d6ab28e8e481715c) > > > [!NOTE] > > > > All authentication and authorization parameters are managed by your IT department in accordance with your company's security policies. > > **2. Interface Customization** > > After your first login, you can customize your user experience: > > ![Settings page with the Language tab selected](https://mintcdn.com/prismeai/GnmZ7SyyCbjmVFba/images/get-started-settings-language.png?fit=max\&auto=format\&n=GnmZ7SyyCbjmVFba\&q=85\&s=f63908501ca9127905de0c158092c4cd) > > The platform automatically adopts: > > * Your browser's language (can be changed manually) > * Display mode (light/dark/system) > > These preferences can be modified at any time from your profile. > > **3. LLM Model Access** > > In the Enterprise offering, access to LLM models and secure chat features is automatically configured according to: > > ![Chat conversation with the model selector open](https://mintcdn.com/prismeai/GnmZ7SyyCbjmVFba/images/get-started-chat-model-selection.png?fit=max\&auto=format\&n=GnmZ7SyyCbjmVFba\&q=85\&s=c1b17a66db0b06c79ae3fda53b98aa24) > > * Whitelists defined by your company > * Security and compliance policies > * Your organization's scaling strategy > > Administrators in your organization can adjust these settings based on the specific needs of different teams. > > **4. API Configuration (if needed)** > > If you need to use the Prisme.ai API, you can generate and manage your API keys based on the permissions defined for your profile. > > > [!WARNING] > > > > API usage limits are automatically configured according to your organization's Enterprise subscription. > [tab] Standard Users > > **1. Account Creation** > > For the Standard offering, you need to create an account and wait for its validation: > > ![Prisme.ai account creation form](https://mintcdn.com/prismeai/GnmZ7SyyCbjmVFba/images/get-started-account-creation.png?fit=max\&auto=format\&n=GnmZ7SyyCbjmVFba\&q=85\&s=3d4122dd3ac546f89e6d66e720cae8ac) > > 1. Fill out the registration form > > 2. Verify your email to confirm your address > > 3. Wait for your account approval (typically within 48 hours) > > > [!NOTE] > > > > The validation process may vary depending on your region and use case. > > **2. Set Your Preferences** > > Configure your user preferences: > > ![Settings page with language preferences](https://mintcdn.com/prismeai/GnmZ7SyyCbjmVFba/images/get-started-settings-language.png?fit=max\&auto=format\&n=GnmZ7SyyCbjmVFba\&q=85\&s=f63908501ca9127905de0c158092c4cd) > > * Interface language (defaults to your browser language) > * Theme (light/dark/system) > > **3. LLM Model Access** > > In the Standard offering, access to LLM models is based on your subscription tier: > > ![Chat conversation with available LLM models open](https://mintcdn.com/prismeai/GnmZ7SyyCbjmVFba/images/get-started-chat-model-selection.png?fit=max\&auto=format\&n=GnmZ7SyyCbjmVFba\&q=85\&s=c1b17a66db0b06c79ae3fda53b98aa24) > > * Available models are determined by your subscription level > > * Usage quotas apply based on your plan > > * You can upgrade your subscription for access to additional models or increased usage limits > > > [!NOTE] > > > > Some advanced models and features may only be available in higher-tier plans. ## Role-Specific Settings Different user roles may need specific configurations: > [tab] End Users > > As an end user, focus on: > > * Setting up your preferences > * Personalizing your AI interaction settings > > You generally won't need to worry about advanced settings like API keys or workspace configuration. > [tab] No-code Builder > > As a power user who builds without code: > > * Access to the create products: Agent Creator, Knowledges, Collections > * Build agents, assistants, and simple apps, then share them > * Set up instructions, starters, and capabilities > [tab] Developers > > As a developer, pay attention to: > > * Access to Builder > * API key configuration with appropriate scopes > * Webhook settings for integrations > * Development environment connections > * CI/CD integration settings > [tab] Administrators > > As an administrator, you'll need to configure all aspects of the workspace: > > * Access to Governe > * User management and permissions > * LLM provider settings and API keys > * Security policies and compliance settings > * Usage quotas and monitoring ## Next Steps Once you've completed your account setup, you're ready to start using Prisme.ai: > [card] [Platform Navigation](/get-started/platform-navigation) > > Learn how to navigate the Prisme.ai interface > [card] [First Steps Guide](/get-started/first-steps) > > Begin your journey with practical first steps > [card] [Explore use cases](/resources/use-cases/overview) > > Agents, agentic workflows, and full-stack portals # Breaking Changes Source: https://docs.prisme.ai/get-started/breaking-changes Every upgrade action and breaking change, release by release, to check before upgrading Prisme.ai This page gathers, release by release, what to check before upgrading Prisme.ai. Each release lists first the **actions to take** — permissions to grant, configuration to update, charts to upgrade — then the **breaking changes**, behaviours that change for your users or your integrations and why. The full release notes stay in [What's New](/get-started/whats-new). > [!TIP] > > **Upgrading across several releases?** Read every section between your current version and the target one, and apply the actions **from the oldest to the newest**. For the upgrade procedure itself, see [Updates](/self-hosting/operations/updates). | Version | What to check | | - | - | | [v27.9.0](#v27-9-0) | **Actions:** Grant `account:access-tokens:use` and `account:demo-mode:use` to custom and edited roles; Add `agent-evaluations` to the LLM Gateway `trusted_source_workspaces`; Run *Update from catalogue* on the Models page; Decide whether to keep the browser dictation fallback, on by default; Add `data-lang="en"` to embedded chats that must stay in English **Breaking:** Personal access tokens and demo mode are gated by role permissions; The legacy `/v1/files` and `/v1/vector_stores` storage routes are removed; Without a transcription model, dictated audio goes to the browser's speech service; The embedded chat follows the visitor's language | | [v27.8.0](#v27-8-0) | **Actions:** Grant the `apikeys` permissions to custom and edited roles; Create the Agent Evaluations organization API key (`AGENT_FACTORY_API_KEY`); Make refusal-reason clients read `public_rejection_reason`; Split documents over 10,000 chunks, or tune `max_chunks_per_document` **Breaking:** Managing API keys moved to dedicated `apikeys` permissions; A document over 10,000 chunks fails to index; `rejection_reason` is empty for most readers; Stalled or nightly evaluation runs need an organization API key; Access to knowledge bases and canvases is tighter | | [v27.7.3](#v27-7-3) | **Actions:** Set `supports_forced_tool_choice: false` on the models that reject it; Reconfigure the Tableau, ServiceNow and SonarQube instances; Grant Use Audio Transcriptions to custom roles; Add your Git server to `NO_PROXY` if needed; Upgrade Redis to 6.2+, or set `?protocol=2` on the crawler **Breaking:** Tableau, ServiceNow and SonarQube agents stop working until reconfigured; Dictation needs a role permission; Git goes through `HTTPS_PROXY`; The crawler refuses Redis older than 6.0 | | [v27.7.1](#v27-7-1) | **Actions:** Upgrade Helm `prismeai-apps` `0.7.2` and `prismeai-core` `1.12.2`; Enable `authentication.allowApiKeyOnly` for Code Interpreter download links; Set `WEBAUTHN_RP_ID` on a multi-DNS console **Breaking:** Some monday.com, Outlook, Power BI and GitLab users reconnect once; Indexing embeddings count against the monthly LLM budget | | [v27.6.3-hotfix](#v27-6-3-hotfix) | **Actions:** Set the `prismeai-workspaces` image to `v27.6.3-hotfix`; Re-run the platform pull of the `base2` group | | [v27.6.2](#v27-6-2) | **Actions:** Move embedded chat styling to `customCss` and `cssVariables`; Self-hosted: exempt `/embed/*` from `X-Frame-Options` and `frame-ancestors`; Read `run.sourceWorkspaceId` instead of the `x-prismeai-workspace-id` header **Breaking:** Host page CSS no longer styles the embedded chat; `x-prismeai-` headers are removed before webhook automations run | | [v27.4.3](#v27-4-3) | **Actions:** Rewrite the Azure OCR configuration as flat keys **Breaking:** Azure OCR secrets are flat keys | | [v27.3.1](#v27-3-1) | **Actions:** Send `target_agent_id` to update an agent through the import API **Breaking:** Without `target_agent_id`, the import API creates a new agent | | [v27.2.4](#v27-2-4) | **Actions:** Add `image-generation` to the LLM Gateway trusted sources and set the default image model | | [v27.2.2](#v27-2-2) | **Actions:** Check that the LLM Gateway trusts the `storage` workspace | | [v26.03.101144](#v26-03-101144) | **Actions:** Add the `slug:` prefix to webhook and WebSocket calls by slug **Breaking:** Calls by slug without `slug:` fail | | [v26.03.021352](#v26-03-021352) | **Actions:** Allow the Python modules you need with `PYTHON_BUILTIN_MODULES` **Breaking:** Python functions can no longer import `os`, `sys`, `subprocess` and other modules by default | | [v25.11.171950](#v25-11-171950) | **Breaking:** The `${date}` prompt variable only holds the date | | [v25.11.061024](#v25-11-061024) | **Actions:** Update AI Knowledge agents to the new recommended default prompt | | [v25.10.161126](#v25-10-161126) | **Breaking:** Collections run on the new ORM; some behaviours change | **v27.9.0** Actions and breaking changes > [!NOTE] > > **Actions to take** > > 1. **Grant the access token and demo mode permissions.** Add `account:access-tokens:use` and `account:demo-mode:use` (under **Account (Settings)**) to your custom roles, to the default roles your organization has edited, and, on self-hosted deployments, to the roles declared in `ORG_ADDITIONAL_SYSTEM_ROLES`. See [Identity & Access → Permission Format](/products/ai-governance/identity-access#permission-format). > 2. **Trust `agent-evaluations` in the LLM Gateway.** On each environment, add `agent-evaluations` to `trusted_source_workspaces` in the LLM Gateway workspace config, and check that `agent-evaluations` has `registerWorkspace: true`. Without it, evaluations run by non-admin users stay unjudged. > 3. **Run *Update from catalogue*** on the Models page after the upgrade. Strongly recommended: it flags the Claude models that do not accept the instructions an agent gives itself mid-answer. See [Model Governance → Prompt caching](/products/ai-governance/model-governance#prompt-caching). > 4. **Decide on browser dictation.** To keep dictated audio within your providers, make a transcription model available to every user who dictates, or turn off **Allow browser dictation fallback** in Agents Controls › Models, or **Browser dictation fallback** in Govern › Models › Providers › Defaults — in particular on self-hosted installations without a transcription model. See [Dictation](/products/ai-securechat/dictation#for-administrators). > 5. **Keep embedded chats in English if needed** by adding `data-lang="en"` (or `lang: 'en'` in `mount()`) to the integration. See [Embed your agent → Language](/products/agent-factory/embed#language). **Breaking changes** * **Personal access tokens and demo mode now need a role permission.** Personal access tokens — also used by the Builder MCP, the SDK and the browser extension — and demo mode are controlled by two permissions, `account:access-tokens:use` and `account:demo-mode:use`, under **Account (Settings)**. The default roles keep them, but **if your organization uses custom roles or has edited a default role, add these permissions to the roles that need them**, otherwise their members can no longer create or use access tokens in your organization. Self-hosted deployments using `ORG_ADDITIONAL_SYSTEM_ROLES` must add them to those roles. A token is checked in the organization each request runs in, not the organization a workspace belongs to: members of several organizations should send the `x-prismeai-org-slug` header, otherwise their first organization applies, and a refusal there blocks the token everywhere, DSUL `fetch` calls and scheduled automations included. See [Identity & Access → Permission Format](/products/ai-governance/identity-access#permission-format). * **The legacy `/v1/files` and `/v1/vector_stores` storage routes are removed.** `DELETE /v1/files/{id}` stays. Use `/v1/knowledge_bases` and the Storage workspace file upload instead. Only the user who uploaded a file can now add it to a knowledge base, and only platform administrators can delete another user's file. * **Dictation falls back to the browser's speech service on desktop Chrome and Edge when there is no transcription model.** If your organization has no transcription model, or its allowed models leave it out, users can dictate again in desktop Chrome and Edge. Visitors not signed in to an embedded chat get this too, but only when the organization has no model. Their audio goes to Google (Chrome) or Microsoft (Edge), not to Prisme.ai, outside your providers, governance and data residency. Roles without **Use Audio Transcriptions** still cannot dictate when a transcription model exists. **The fallback is on by default.** To keep dictated audio within your providers, make a transcription model available to every user who dictates, or turn off **Allow browser dictation fallback** in Agents Controls › Models for your organization, or **Browser dictation fallback** in Govern › Models › Providers › Defaults for the whole platform — in particular on self-hosted installations without a transcription model. Changes apply when users reload the chat. See [Dictation](/products/ai-securechat/dictation#for-administrators). * **The embedded chat now follows the visitor's language.** It no longer always shows in English. Existing integrations switch without any action: add `data-lang="en"` (or `lang: 'en'` in `mount()`) to keep English, or set another language with the same option. See [Embed your agent → Language](/products/agent-factory/embed#language). **Deprecation** * `PUT /v2/user/active-org` is deprecated and will be removed in a later release. Send the `x-prismeai-org-slug` header with each request instead. See [Authentication → Active Organization](/api-reference/authentication#active-organization). **v27.8.0** Actions and breaking changes > [!NOTE] > > **Actions to take** > > 1. **Grant the API key permissions.** Add `:apikeys:read`, `:create` and `:delete` (for `agent-factory`, `storage`, `ai-collection-v3`) to your custom roles, to the default roles your organization has edited, and to `ORG_ADDITIONAL_SYSTEM_ROLES`. Give the `:apikeys:*` scope and permissions to the organization API keys and service accounts that manage keys. See [Identity & Access → API Keys](/products/ai-governance/identity-access#api-keys). > 2. **Create the Agent Evaluations API key.** In the organization that owns the evaluated agents, create an organization API key with permissions `agent-factory:agents:read` and `llm-gateway:models:chat-completions` and scopes `agent-factory:agents:*` and `llm-gateway:models:*`, store it in the `agent-evaluations` workspace secret `AGENT_FACTORY_API_KEY`, and restrict the nightly batch to that organization before re-enabling it. > 3. **Update the clients that display a refusal reason** to read `public_rejection_reason`. > 4. **Split documents over 10,000 chunks**, or raise `max_chunks_per_document` (10,000 at most) and `embedding_batch_size` in the Storage workspace config. **Breaking changes** * **Managing API keys now needs its own permissions.** Listing, creating, rotating and revoking the API keys of an agent, a knowledge base or a collection moved out of the sharing permissions into `:apikeys:read`, `:create` and `:delete`, for `agent-factory`, `storage` and `ai-collection-v3`. They are enforced even on resources the user owns. The default roles keep them, but **custom roles, default roles your organization has edited, and roles defined through `ORG_ADDITIONAL_SYSTEM_ROLES` lose access until an administrator grants the new permissions**. Organization API keys scoped to agents, knowledge bases or collections can no longer create, rotate or revoke keys without the matching `apikeys` scope and permissions. See [Identity & Access → API Keys](/products/ai-governance/identity-access#api-keys). * **A document over 10,000 chunks now fails to index.** Large documents are indexed batch by batch instead of staying stuck *in progress* when the worker runs out of memory, and anything above the cap fails with `DocumentTooLarge` — **including a document indexed before, the next time it is indexed or refreshed**. Split the file, or move the cap with `max_chunks_per_document` (10,000 at most) and `embedding_batch_size` in the Storage workspace config. * **`rejection_reason` is now empty for most readers.** The raw reason an ingestion hook gave for refusing a document is served only to the knowledge base's owners and to storage or platform administrators. Everyone else reads the new `public_rejection_reason` field, so a client that displays a refusal reason must be updated. The refusal stays recorded when the document is reindexed. * **Agent Evaluations need an organization API key.** Runs started by the nightly cron, or resumed after a stall, now authenticate with one. Create it in the organization that owns the evaluated agents, with permissions `agent-factory:agents:read` and `llm-gateway:models:chat-completions` and scopes `agent-factory:agents:*` and `llm-gateway:models:*`, then store it in the `agent-evaluations` workspace secret `AGENT_FACTORY_API_KEY`. Without it a stalled run fails with `EVAL_AUTH_NOT_CONFIGURED` and the nightly batch stops. The key only reaches agents of its own organization, so restrict the nightly batch to that organization before re-enabling it. * **Access to knowledge bases and canvases is tighter.** A knowledge base no longer serves read access to users who hold no right on it. An agent now only reaches the canvases of the user it is talking to. A knowledge base can only be attached to an agent by someone who can read it, and only when it belongs to the agent's organization — on import, the bases that fail those conditions are removed from the agent's tools and reported. **v27.7.3** Actions and breaking changes > [!NOTE] > > **Actions to take** > > 1. **Declare the models that reject a forced tool choice.** Set `provider_config.supports_forced_tool_choice: false` on Claude Opus 5.5, Fable 5.1, Mythos 5.1 and DeepSeek reasoner, from **Govern › Models** or by aligning the environment with the catalogue. See [Model Governance → Aligning an environment with the catalogue](/products/ai-governance/model-governance#aligning-an-environment-with-the-catalogue). > 2. **Reconfigure Tableau, ServiceNow and SonarQube.** For each installed instance, check the **Authentication** tab of its configuration page, then in the **Agents** tab tick the authorized agents and click **Install the capability** on each. > 3. **Grant Use Audio Transcriptions** (`llm-gateway:models:audio-transcriptions`) to your custom roles and edited system roles. See [Dictation](/products/ai-securechat/dictation). > 4. **Add your Git server to `NO_PROXY`** if it has to stay reachable directly. > 5. **Upgrade Redis to 6.2 or later**, or append `?protocol=2` to the crawler's `REDIS_URL` meanwhile. See [Redis → Version compatibility](/self-hosting/databases/redis#version-compatibility). **Breaking changes** * **Declare the models that reject a forced tool choice.** The upgrade does not set it for you: in the model catalog, set `provider_config.supports_forced_tool_choice: false` on Claude Opus 5.5, Fable 5.1, Mythos 5.1 and DeepSeek reasoner. Without it, every message with a selected tool fails once on those models, and fails for good on streamed Vertex and Bedrock SDK requests. You can set it from **Govern › Models** (**Provider Config › Accepts forced tool choice**), let the model **Test** button detect it, or align the whole environment with the reference catalogue. See [Model Governance → Aligning an environment with the catalogue](/products/ai-governance/model-governance#aligning-an-environment-with-the-catalogue). * **Tableau, ServiceNow and SonarQube agents stop working until you reconfigure them.** These three connectors are now configured from the connector configuration page and only accept the agents you authorize there. For each installed instance: open its configuration page, check the credentials carried over in the **Authentication** tab, then in the **Agents** tab tick the authorized agents and click **Install the capability** on each, which replaces the old address and API key — both now refused. Automations that call these connectors without going through an agent keep working untouched. * **Grant the dictation permission to your custom roles.** Chat dictation requires **Use Audio Transcriptions** (`llm-gateway:models:audio-transcriptions`). The system **Member**, **Agent Maker** and **Builder** roles hold it by default, but custom roles — and system roles your organization has already edited — do not. Add it in Governance → Roles, otherwise their holders never see the microphone. See [Dictation](/products/ai-securechat/dictation). *This still holds when a transcription model exists. Since then, when there is no transcription model at all, desktop Chrome and Edge fall back to the browser's own speech service: see [Dictation → For administrators](/products/ai-securechat/dictation#for-administrators).* * **Git now goes through `HTTPS_PROXY`.** If your Git server has to stay reachable directly, add it to `NO_PROXY`. * **The crawler needs Redis 6.0 or later.** `prismeai-crawler` now opens its Redis connections with the RESP3 protocol, which an older Redis rejects: the crawler then stops at startup with `unknown command HELLO`. Redis 6.2 is the supported minimum, see [Redis → Version compatibility](/self-hosting/databases/redis#version-compatibility). Until your Redis is upgraded, append `?protocol=2` to the crawler's `REDIS_URL`, for example `redis://redis:6379/0?protocol=2`. The parameter is ignored when `REDIS_TLS_CA_FILE` is set: unset that variable and pass the certificate in the URL instead, `rediss://redis:6380/0?protocol=2&ssl_ca_certs=/path/to/ca.pem`. **v27.7.1** Actions and breaking changes > [!NOTE] > > **Actions to take** > > 1. **Upgrade Helm `prismeai-apps` to `0.7.2`.** The `prismeai-functions` liveness probe now writes to the volume, and its former 1 second timeout puts the functions API in a restart loop on a slow NFS. If you are not upgrading the chart, set `prismeai-functions.livenessProbe.timeoutSeconds: 3` yourself. See [Upgrade the platform services](/self-hosting/operations/updates#1-upgrade-the-platform-services). > 2. **Upgrade Helm `prismeai-core` to `1.12.2`** and enable `authentication.allowApiKeyOnly` in the `upload` block of the api-gateway ConfigMap, for Code Interpreter download links. > 3. **Multi-DNS console: set `WEBAUTHN_RP_ID`** to the common parent domain of your console domains, before users register passkeys. See [Authentication → Configure passkeys](/self-hosting/entreprise/authentication#configure-passkeys). **Breaking changes** * **Some users have to reconnect their account once.** The OAuth token change below invalidates the existing connections of monday.com users, and of part of the Outlook, Power BI and GitLab users. They are prompted to reconnect, and nothing else is lost. * **Passkeys need no configuration on a single-domain console.** A console served over `https` on one domain — the usual case, sandbox and staging included — enables them by itself, with no environment variable to set. **A multi-DNS infrastructure does need one:** when the console answers on several domains, say `studio.prisme.example.com` and `admin.prisme.example.com`, set `WEBAUTHN_RP_ID` to their common parent domain, here `prisme.example.com`. Without it the gateway starts with passkeys off and merely logs a warning — the same happens on a console not served over `https`. Set the RP ID early either way: changing it later makes every passkey already registered unusable. See [Authentication → Configure passkeys](/self-hosting/entreprise/authentication#configure-passkeys). * **Indexing embeddings now count against the organization's monthly LLM budget.** They were not counted at all before, so an organization with a capped budget can reach it earlier than it used to. Periods before the fix are not recalculated. **v27.6.3-hotfix** Actions and breaking changes > [!NOTE] > > **Actions to take** > > 1. **Set the `prismeai-workspaces` image tag to `v27.6.3-hotfix`**, and keep every other service on `v27.6.3`. See [Updates → Hotfix images](/self-hosting/operations/updates#hotfix-images). > 2. **Re-run the platform pull of the `base2` group.** The four fixed workspaces (Conversations Service, Conversations Service App, Teams Service, Teams Service App) are reported as `imported`, everything else as `skipped`. Without it, every conversation fails to start since v27.6. **v27.6.2** Actions and breaking changes > [!NOTE] > > **Actions to take** > > 1. **Move embedded chat styling** from the host page CSS to the `customCss` option and `cssVariables`. See [Embed](/products/agent-factory/embed). > 2. **Self-hosted: exempt `/embed/*`** from any `X-Frame-Options` or `Content-Security-Policy` `frame-ancestors` rule your reverse proxy, WAF or ingress adds. > 3. **Update the automations reading `{{headers['x-prismeai-workspace-id']}}`** to read `{{run.sourceWorkspaceId}}`. See [Automations → Triggers](/products/ai-builder/automations#triggers). **Breaking changes** * **Host page CSS no longer styles the embedded chat.** The widget now runs as an isolated iframe. * **The embedded chat is served from the console's `/embed/*` pages inside an iframe.** A rule adding `X-Frame-Options` or `frame-ancestors` to every response blocks it, and the browser shows a "can't open this page" error instead of the chat. * **Headers starting with `x-prismeai-` are removed before a webhook automation runs**, `x-prismeai-workspace-id` included. **v27.4.3** Actions and breaking changes > [!NOTE] > > **Actions to take** > > 1. **Rewrite the Azure OCR connector configuration as flat keys** if it is still JSON-shaped. **Breaking changes** * **Azure OCR connector secrets moved from a JSON structure to flat keys**, so they can be sourced from Azure Key Vault. **v27.3.1** Actions and breaking changes > [!NOTE] > > **Actions to take** > > 1. **Send `target_agent_id`** when updating an existing agent from a `.md` file through the Agent Creator import API. **Breaking changes** * **The import API creates a new agent unless `target_agent_id` is provided.** **v27.2.4** Actions and breaking changes > [!NOTE] > > **Actions to take** > > 1. **Set up image generation again.** Add `image-generation` to `trusted_source_workspaces` in the LLM Gateway workspace config (`index.yml`): > > ```yaml theme={null} > config: > value: > trusted_source_workspaces: > - storage > - image-generation > - agent-factory > ``` > > Then, in **AI Governance › Agents Controls**, set `default_image_generation_model` and add the new default-image-model field where required. **v27.2.2** Actions and breaking changes > [!NOTE] > > **Actions to take** > > 1. **Make the LLM Gateway trust the Storage workspace.** If the LLM Gateway workspace config was preserved during the upgrade (not overwritten, which some setups do on purpose to keep custom values), make sure its `index.yml` contains: > > ```yaml theme={null} > config: > value: > trusted_source_workspaces: > - storage > ``` > > Without it, Storage-related features can break. **v26.03.101144** Actions and breaking changes > [!NOTE] > > **Actions to take** > > 1. **Add the `slug:` prefix** to the webhooks and WebSockets you call by slug, for example `/v2/workspaces/slug:ops-manager/webhooks/user`. **Breaking changes** * **Calling webhooks and WebSockets by slug requires the `slug:` prefix.** **v26.03.021352** Actions and breaking changes > [!NOTE] > > **Actions to take** > > 1. **Allow the modules your Python functions need** with the `PYTHON_BUILTIN_MODULES` [environment variable](/self-hosting/entreprise/functions#environment-variables). **Breaking changes** * **Python functions can no longer import some standard library modules by default:** `subprocess`, `os`, `sys`, `shutil`, `socket`, `ctypes`, `multiprocessing`, `_thread`, `signal`, `resource`, `importlib`, `runpy`, `code`, `ast`, `dis`, `pickle`, `marshal`, `pty`, `fcntl`, `mmap`, `gc`, `inspect`, `webbrowser`, `ensurepip`, `venv`. **v25.11.171950** Actions and breaking changes **Breaking changes** * **AI Knowledge: the `${date}` prompt variable only holds the date**, `YYYY-MM-DD`, without the hour, minutes, seconds and microseconds. **v25.11.061024** Actions and breaking changes > [!NOTE] > > **Actions to take** > > 1. **Update your AI Knowledge agents' prompt** to the new recommended default: > > ```yaml theme={null} > prompt: > keyword: ${context} > default: |- > You are a helpful and knowledgeable assistant. > > Use the available tools to answer the user's query as accurately as possible. > The documents_rag tool is very important as it allows you to search through a knowledge base built for you. > > If the context contains relevant information, base your answer on it and make clear references to it. > If the context is incomplete or missing, answer to the best of your knowledge but clearly state that the information is not in the provided context. > Never invent or fabricate details that cannot be supported by either the context or your prior knowledge. > > Keep answers clear, concise, and directly relevant to the query. > > The current date is : ${date} > ``` **v25.10.161126** Actions and breaking changes **Breaking changes** * **Collections run on the new ORM, compatible with MongoDB and PostgreSQL.** Some behaviours change, see [Collection → Release note: Collection with PostgreSQL](https://docs.prisme.ai/apps-store/marketplace/collection#release-note%3A-collection-with-postgresql). # Change your password Source: https://docs.prisme.ai/get-started/change-password Change or set the password of your Prisme.ai account, and sign out every other session at the same time You can change the password of your Prisme.ai account at any time from your security settings. Changing it also signs you out on every other browser and phone, so that whoever may know your old password loses access. > [!NOTE] > > This page applies to accounts that sign in with an email and a password. If you sign in through your company's single sign-on (SSO), your password is managed by your identity provider: change it there. ## Before you start * You are signed in to the Prisme.ai console with an email and password account, or with a passkey. * You can confirm your identity: with a passkey, with your current password, or with your current password and a code from your authenticator app if you set one up. * Choose a new password of at least 8 characters. A phrase of several words is easier to remember and harder to guess. Your administrator may require a different length: the form tells you the rule that applies. ## Change your password **1. Open your security settings** Open `/settings/security` on your console's address, for example `https://console.example.com/settings/security`. The **Settings** page opens on **Security**, on the **Sign-in methods** tab. The **Password** section is the first one. **2. Start the change** Click **Change password**. If you signed in with a passkey only and never had a password, the button reads **Set a password**: the steps are the same. **3. Confirm it's you** If you have not confirmed your identity in the last 5 minutes, the **Confirm it's you** dialog opens. Use one of the methods it offers: * Click **Use a passkey** and follow your browser's prompt. * Or enter your **Current password**, and the **6-digit code** from your authenticator app if one is set up, then click **Confirm**. **4. Enter your new password** Type your new password in **New password**. Click the eye icon (**Show password**) to check what you typed. The hint under the field turns green once the length is right. The dialog tells you how many other sessions will be signed out. **5. Save** Click **Save**. ## What happens after the change * A **Password changed** notification confirms the change and says how many sessions were signed out. Click **See my devices** to review the browsers and phones still connected. * Every other browser and phone connected to your account is signed out and must sign in again with the new password. The session you used to make the change stays open. * Your personal access tokens are kept, so your scripts and integrations keep working. If you suspect someone else used your account, review them in **Settings** > **Security** > **Access tokens** and delete those you did not create. * You receive an email titled "Your password was changed". If you did not make the change, follow its **Reset my password** link immediately, then tell the administrator of your organization. > [!WARNING] > > If the notification says that some sessions could not be signed out, open the **Devices** tab and sign out those you do not recognise yourself. ## Verify the change 1. Sign out of the console. 2. Sign in again with your email and your new password. The sign-in succeeds with the new password, and the **Password** section of your security settings shows the date of the change. ## Why a password is refused The form explains why a password cannot be used. Fix it and click **Save** again. | Message | What to do | | - | - | | `The password must be between 8 and 128 characters long.` | Use a longer or shorter password. The bounds shown are the ones your administrator configured. | | `This password appears in known data breaches: it would be guessed quickly. Choose another one.` | Choose a password that you have not used elsewhere. Prisme.ai compares it with lists of passwords known from data breaches. | | `The password must not contain your email address or your name.` | Remove your email address, its first part, your first name and your last name from the password. | | `Choose a password different from your current one.` | Choose a new password. | | `This password does not meet the password policy of this instance. Ask your administrator for its rules.` | Your organization adds its own rule. Ask your administrator what it requires. | ## If you forgot your password On the sign-in page, click **Forgot password?**, enter your email and click **Send Reset Link**. Follow the link you receive within one hour, enter your **New password** twice and click **Reset Password**. A reset signs you out everywhere and sends you the same confirmation email. Your personal access tokens are kept. Accounts that sign in through SSO receive no reset link. ## Use a password manager Password managers that support the standard change-password address open the right screen for you: `/.well-known/change-password` on your console's address leads to your security settings. # Desktop app Source: https://docs.prisme.ai/get-started/desktop-app Run Prisme.ai in a native macOS and Windows app: native sign-in (SSO + MFA), downloads, session reuse, and automatic updates. > [!WARNING] > > **Preview.** The desktop app is an early preview. Expect rough edges. Please > report anything odd on [GitHub](https://github.com/prismeai/desktop/issues). The Prisme.ai desktop app runs the platform in a dedicated native window on **macOS and Windows**. It connects to your own Prisme.ai server, so the interface always matches your server's version, with native sign-in and automatic updates. ## Download > [card] [Download for macOS](https://github.com/prismeai/desktop/releases/latest/download/Prisme.ai-macOS.dmg) > > Apple silicon + Intel (`.dmg`). Requires macOS 10.15 or later. > [card] [Download for Windows](https://github.com/prismeai/desktop/releases/latest/download/Prisme.ai-Windows-setup.exe) > > 64-bit (`.exe`). Requires Windows 10 or later. Each button downloads the latest version directly. Older builds and the `.msi` installer are on the [Releases page](https://github.com/prismeai/desktop/releases/latest). ## Install > [tab] macOS > > 1. Open the downloaded `.dmg`. > 2. Drag **Prisme.ai** into **Applications**. > 3. Launch it. The app is signed and notarized by Apple, so it opens directly. > [tab] Windows > > 1. Run the downloaded installer. > 2. During the preview the installer is not yet code-signed, so Windows > SmartScreen may show an "unknown publisher" notice: click > **More info → Run anyway**. ## First launch **1. Enter your server** Type your Prisme.ai **API URL** (for example `https://api.your-company.com`). It's remembered for next time. You'll find it in the platform under **Settings → Connections**, in the **Connection endpoints** box — copy the **API URL** (the one ending in `/v2`). ![The Connection endpoints box in Settings, showing the Platform URL and API URL to use in the desktop app](https://mintcdn.com/prismeai/fTJIblr5C_-1SQ9Q/images/desktop-app-connection-endpoints.png?fit=max\&auto=format\&n=fTJIblr5C_-1SQ9Q\&q=85\&s=d585782fe6696719f8e526f057488185) Settings → Connections → Connection endpoints **2. Sign in** Sign in with your usual method (SSO, MFA) in the native sign-in window. No password or token is stored by the app. **3. You're in** The app reuses your session across launches and updates itself automatically when a new version ships. # First Steps Guide Source: https://docs.prisme.ai/get-started/first-steps Log in and build your first agent or app on Prisme.ai. Welcome to Prisme.ai! This guide will help you navigate your initial experience with the platform and set you on the path to success. We've tailored these steps to ensure you can quickly start leveraging the power of generative AI for your organization. ## Before You Begin Before diving in, make sure you have: * A Prisme.ai account with appropriate access permissions * A basic understanding of your organization's AI goals and use cases * Familiarity with the data sources you might want to connect to your AI agents ## Starting Your Journey **1. Log in to your Prisme.ai account** Access your Prisme.ai instance using the credentials provided by your administrator. If you're using a self-hosted version, you'll need the specific URL for your deployment. ![Prisme.ai sign-in screen](https://mintcdn.com/prismeai/GnmZ7SyyCbjmVFba/images/get-started-login.png?fit=max\&auto=format\&n=GnmZ7SyyCbjmVFba\&q=85\&s=4c2f20bb05a9af616b14a683ad93e280) **2. Explore the home screen** Upon logging in, you'll land on the Prisme.ai home screen. It gives you quick access to Chat, available agents, recent canvas, and the product navigation in the sidebar. ![Prisme.ai home screen with product navigation](https://mintcdn.com/prismeai/GnmZ7SyyCbjmVFba/images/get-started-dashboard.png?fit=max\&auto=format\&n=GnmZ7SyyCbjmVFba\&q=85\&s=3f0c4b9fa373766290fdd8ee7172699d) The home screen gives you an overview of: * Available agents * Recent canvas * Quick actions for common prompts * Product access grouped by Use, Create, Monitor, and Run **3. Try Chat** Start with Chat to experience conversational AI in a secure environment. This is the simplest way to begin interacting with Prisme.ai. ![Chat conversation interface with an assistant ready for a message](https://mintcdn.com/prismeai/GnmZ7SyyCbjmVFba/images/get-started-chat-conversation.png?fit=max\&auto=format\&n=GnmZ7SyyCbjmVFba\&q=85\&s=3628307223e94002bef997ae8b2f5fd3) Try asking some questions to understand the capabilities of the underlying language models. **4. Explore Agent Creator** Visit Agent Creator to discover pre-built agents that might address your needs. You can use these as-is or as starting points for your own custom agents. ![Agent Creator dashboard with agent cards](https://mintcdn.com/prismeai/GnmZ7SyyCbjmVFba/images/get-started-agent-creator.png?fit=max\&auto=format\&n=GnmZ7SyyCbjmVFba\&q=85\&s=e815e6e7fec490dc0fbe46b1ba1219f2) **5. Build your first thing** An agent is just one option. Business users can build a no-code agent in [Agent Creator](/products/agent-factory/creating-agents); developers can build a full application, a workflow, or even a custom CRM in [Builder](/products/ai-builder/overview). Browse [use cases](/resources/use-cases/overview) to see the three shapes: agents, agentic workflows, and full-stack portals. ## Next Steps Based on Your Role Choose your path based on your role in the organization: > [tab] End User > > As an end user, focus on: > > * Mastering Chat for daily tasks > * Discovering useful agents in Agent Creator > * Learning how to effectively prompt AI for best results > > Recommended next page: [Chat Guide](../products/ai-securechat/overview) > [tab] Business User > > As a business user, focus on: > > * Creating agents with Knowledges > * Connecting knowledge bases to agents > * Setting up workflows for your team > > Recommended next page: [Knowledges Guide](../products/ai-knowledge/overview) > [tab] Developer > > Agents are one feature, not the whole platform. As a developer you build **full applications** on the same stack: > > * Build web apps, agentic workflows, and endpoints in [Builder](../products/ai-builder/overview), from VS Code over MCP > * Ship a real product: a portal, a custom CRM, a compliance system. See [use cases](/resources/use-cases/overview) > * Connect your systems with connectors, API, and MCP, and version everything in Git > > Recommended next page: [Builder Guide](../products/ai-builder/overview) > [tab] Administrator > > As an administrator, focus on: > > * Setting up user access and permissions > * Configuring deployment options > * Implementing governance policies > > Recommended next page: [Governe Guide](../products/ai-governance/overview) ## Common First Tasks Here are some common tasks that users typically want to accomplish when starting with Prisme.ai: > [accordion] Upload documents to create a knowledge base > > 1. Navigate to Knowledges > 2. Create a new knowledge base > 3. Upload your documents (PDF, Word, Excel, PowerPoint, etc.) > 4. Configure chunking and embedding settings > 5. Deploy your knowledge base to an agent > > [Detailed Guide →](../products/ai-knowledge/knowledge-bases) > [accordion] Customize an agent from Agent Creator > > 1. Browse Agent Creator for an agent that matches your needs > 2. Clone the agent to create your own version > 3. Modify the prompts and settings > 4. Connect to your knowledge base if needed > 5. Test and deploy your customized agent > > [Detailed Guide →](../products/agent-factory/instructions) > [accordion] Connect to external data sources > > 1. Navigate to Builder > 2. Set up connection to your data source (database, API, etc.) > 3. Configure authentication > 4. Create queries or data retrieval workflows > 5. Test the connection with simple prompts > > [Detailed Guide →](../apps-store/overview) ## Getting Help If you need assistance at any point: * Use the in-app help features (look for the "?" icon in most screens) * Check our [documentation](/) for detailed guides * Contact your organization's Prisme.ai administrator * For enterprise customers, reach out to your dedicated support contact We're committed to helping you succeed with Prisme.ai and harness the power of generative AI for your organization. # Get Started with Prisme.ai Source: https://docs.prisme.ai/get-started/home Your starting point for Prisme.ai: the story, the platform, your first steps, and the paths for business and technical teams. Everything you need to get productive with Prisme.ai. New here? Start with the story, then pick the path that matches how you work. > [card] [Start with the story](./introduction) > > Why Prisme.ai exists, what it does, and how it changes the way enterprises build with AI, in a 3-minute read. ## Key Resources > [card] [Introduction](./introduction) > > The problem, the shift, and what changes concretely > [card] [Sovereign agentic layer](./sovereign-agentic-layer) > > Why the agentic layer must be sovereign, governed, and traceable > [card] [Platform Overview](./platform-overview) > > Your maturity path, resilience, and governance at scale > [card] [What's New](./whats-new) > > New products and capabilities, release by release > [card] [First Steps Guide](./first-steps) > > Log in and build your first agent or app > [card] [Platform Navigation](./platform-navigation) > > Find your way around the interface ## Getting Started Paths Whatever you want to ship, a chat assistant, an agent inside your tools, a web app, or a workflow, it runs on the same foundation. Pick the entry point that matches how you work; most teams use both. > [tab] Business teams (no-code) > > **1. Set up your account** > > Complete your [account setup](./account-setup) to personalize your experience. > > **2. Start in Chat** > > Give everyone secure, multi-LLM [Chat](../products/ai-securechat/overview) for day-to-day work. > > **3. Ground it on your knowledge** > > Turn your documents and sites into knowledge your agents can use with [Knowledges](/products/ai-knowledge/overview). > > **4. Build what you need** > > An agent, an assistant, or a simple app: build it in [Agent Creator](/products/agent-factory/creating-agents), then publish it in Chat, embed it in Teams, or put it on your site. Browse [use cases](/resources/use-cases/overview) for ideas. > > **5. Measure impact** > > Track adoption and quality with [Insights](/products/ai-insights/overview). > [tab] Technical teams (full-code) > > **1. Understand the platform** > > Review the [platform overview](./platform-overview): maturity, resilience, and governance. > > **2. Set up your account** > > Complete your [account setup](./account-setup) with API access. > > **3. Build in Builder** > > Build React front-ends, agentic workflows, and endpoints in [Builder](../products/ai-builder/overview), versioned with Git. A web app, a chatbot, an agent, or all three. > > **4. Integrate everywhere** > > Use the [API, MCP, and connectors](/api-reference/introduction) to embed agents and apps in Teams, WhatsApp, or your own site. > > **5. Govern at scale** > > Configure multi-tenancy, roles, and model access in [Governe](/products/ai-governance/overview). ## Need Help? > [card] [Documentation](/) > [card] [Support](/resources/support/contact) > [card] [Community](https://prisme-ai.discourse.group) # Introduction to Prisme.ai Source: https://docs.prisme.ai/get-started/introduction Why Prisme.ai exists: one stack to turn LLMs into governed, traceable agents, apps, and workflows, instead of another generation of silos. ## The problem: your IT already lives in silos. AI is making it worse. For the last twenty years, every new business need has meant a new piece of software. Layer after layer, enterprises built their information systems by accumulation: dozens of disconnected tools, each with its own data, its own logs, its own access model. The result is a landscape that nobody can fully govern, secure, or reason about end to end. Generative AI is now repeating that same mistake, faster. Teams spin up assistants and copilots everywhere, on different stacks, with no shared traceability, no unified access control, and no way to measure what any of it actually delivers. You don't get an AI strategy. You get **another generation of silos**, this time probabilistic and even harder to audit. ## The shift: the AI Information System of tomorrow **Prisme.ai is the unified foundation where your agents, your full-stack applications, and your data live together**, instead of scattering a new silo for every use case. Think of it as the **Information System for AI**: a clean, purpose-built architecture where **technical and business teams collaborate on the same platform** to deliver value, in a way that is **secure, traceable, and scalable** by default. Business teams, developers, and IT govern the *same* system, with the *same* controls, from a first chat experiment all the way to production applications serving [millions of users](/self-hosting/operations/scaling). Because it's one foundation, you **pool what used to be duplicated in every silo**: infrastructure, security, compliance, and data protection are solved once, for everything built on top. ![Prisme.ai unified foundation: two doors (business no-code and technical full-code) onto one platform that is governed by design and traceable natively, resilient across LLMs and clouds](https://mintcdn.com/prismeai/v_kQ7jJ38u6-5D2j/images/architecture-foundation.svg?fit=max\&auto=format\&n=v_kQ7jJ38u6-5D2j\&q=85\&s=5e496f92849d2b504a074dcc32de5cda) ## What that changes, concretely Three principles set Prisme.ai apart from a collection of AI tools bolted onto your existing stack. > [card] Full-stack & agentic > > Build the whole thing in one place: a **React front-end** and a back-end made of **agentic workflows**: processes that can call AI agents, adding flexibility where rigid automation falls short. > [card] Governed by design > > Governance isn't a module you add later; it's the foundation. **Multi-tenant** by default, every agent runs with its own **service account**, and you control **quotas, models, and tools** at the organization level. > [card] Traceable natively > > An **event-driven architecture** where every action is a normalized event (type, correlation ID, timestamp). That means built-in **observability, security monitoring, and measurable ROI**, not an afterthought. Those three principles are the engine. Here is what they deliver for the business: > [card] One stack, any experience > > Build a web app, a chatbot, an agent inside Teams, or a workflow, all on the same platform, connected by default. One stack replaces the patchwork of tools that never talk to each other, so the experience stays coherent. > [card] Scale with confidence > > Go from a first experiment to **millions of users** on the same foundation. Multi-tenant, asynchronous, and event-driven by design, so adoption grows without the architecture breaking. See [scaling](/self-hosting/operations/scaling). > [card] Provable ROI > > Measure value, not just usage. Because every interaction is traced, you can show **adoption, quality, and cost per organization**, and turn AI spend into a business case. ### Full-stack, agentic development On Prisme.ai you build complete applications: a front-end interface in React, and a back-end composed of **agentic workflows**. A traditional workflow is rigid and perfectly reproducible; an agentic workflow can call an agent, introducing a probabilistic, adaptive dimension exactly where your business logic needs judgment rather than a fixed rule. Both live on the same platform, so an agent can be embedded inside a web flow, and a web flow can hand off to an agent. ### Governed by design Because everything runs on one foundation, governance is native rather than bolted on. And it works on **two levels at once**: a **central governance** sets the rules for the whole platform, while **each organization inherits from it** and adapts within those guardrails. That balance is the point: teams get the **freedom and agility** to move fast, while the enterprise keeps **compliance** guaranteed end to end. The platform handles the cross-cutting concerns *once*, for everyone: * **Multi-tenancy** cleanly separates organizations, teams, and environments, each inheriting central policy. * **SSO and centralized permissions**: one identity model, one place to grant and revoke access. * **Audit logs**: every action is recorded and traceable for security and compliance reviews. * **Chargeback / rebilling**: usage is attributed per organization, so costs are transparent and allocatable. * **Every agent has a service account** with its own roles: restrict which LLMs it may use or which tools it may call, from the organization level down. ### Traceable natively Prisme.ai is **event-driven**: processing is asynchronous, scalable, and every operation emits a **normalized event**: consistent types, correlation IDs, and timestamps. Those events are historized and aggregated, which is what makes observability, analytics, security monitoring, and debugging (follow a single **correlation ID** across every API call and tool execution) possible out of the box. ## Two ways in: the products adapt to your skills You don't have to choose a persona and get boxed in. The products **meet each person at their level of technical skill**, from pure no-code to full-code, and share the same foundation, so business and technical teams work on one system, not two. Most organizations use both entry points at once. > [card] For business teams, the no-code way > > Discover and use agents through the **Store** and the **Chat** interface. Create knowledge-powered agents, connect documents, and publish to your teams, no code required. > > [Start with Chat →](../products/ai-securechat/overview) > [card] For technical teams, the full-code way > > Use **Builder** and **VS Code** to develop agents and applications as code, version them with **Git**, review through **merge requests**, and inspect logs. Infrastructure-as-Code for AI: think Terraform, but for agents. > > [Explore Builder →](../products/ai-builder/overview) > [!NOTE] > > Working as code gives you what serious engineering demands: **reproducibility and consistency**. An agent's behavior is defined in a versioned config file (`index.yml`), pushed to a sandbox for fast iteration or promoted through Git for structured, auditable deployments. ## Built to live everywhere A foundation is only useful if it reaches your users where they already are. Prisme.ai is **API-first**, and every capability is exposed through **MCP (Model Context Protocol)**, so your agents and applications can be embedded in your websites, portals, and existing tools, or consumed from other systems entirely. Ready-made **connectors** push the same agents out to the channels your teams already use: **Microsoft Teams, Google Workspace, WhatsApp, Facebook**, without rebuilding them. The platform doesn't lock value inside its own UI; it lets that value flow wherever your business needs it. And because the foundation owns the plumbing, it gives you **resilience where it matters most**: > [card] LLM resilience > > Natively multi-model. Swap or route between providers per use case; you're never hostage to a single LLM's price, availability, or roadmap. > [card] Cloud resilience > > Cloud-agnostic by design. Run on any major cloud or on-premises, with no vendor lock-in baked into your AI strategy. ## The promise Prisme.ai exists to remove the frustration of digital complexity, so your teams spend their energy **solving business problems, not managing the technical stack**. The plumbing (scalability, security, traceability, governance) is handled by the foundation; the value is what you build on top of it. ## Next steps > [card] [Platform Overview](./platform-overview) > > How the architecture, lifecycle, and governance fit together > [card] [Products](../products/overview) > > The building blocks of the foundation > [card] [First Steps](./first-steps) > > Log in and build your first agent # Platform Navigation Source: https://docs.prisme.ai/get-started/platform-navigation Learn how to navigate the Prisme.ai interface and find what you need The Prisme.ai platform offers a comprehensive set of features and products, organized in an intuitive interface. This guide will help you understand how to navigate the platform effectively and find what you need. ## Home Screen When you log in to Prisme.ai, you'll land on the home screen, which serves as your central hub for Chat, agents, recent canvas, and product access. ![Prisme.ai home screen](https://mintcdn.com/prismeai/GnmZ7SyyCbjmVFba/images/get-started-dashboard.png?fit=max\&auto=format\&n=GnmZ7SyyCbjmVFba\&q=85\&s=3f0c4b9fa373766290fdd8ee7172699d) The home screen includes: * **Prompt Composer** - Start a Chat request directly from the home screen * **Product Navigation** - Access products depending on your role * **Available Agents** - Open agents your organization has made available * **Recent Canvas** - Return to recent canvas work * **What's New** - See highlighted platform updates ## Navigation Structure Prisme.ai's navigation is organized into several key areas: ### Side Navigation Menu ![Prisme.ai side navigation menu](https://mintcdn.com/prismeai/GnmZ7SyyCbjmVFba/images/get-started-side-navigation.png?fit=max\&auto=format\&n=GnmZ7SyyCbjmVFba\&q=85\&s=93330ae94ad132796561d134dc023c48) The side navigation menu includes: * **Logo** - Click to return to the home screen * **Use** - Chat and Store experiences * **Create** - Agent Creator, Knowledges, Collections, Builder, and other creation tools * **Monitor** - Insights and analytics products * **Run** - Operational products such as Engage, Governe, and Support * **User area** - Access your profile, terms, privacy policy, and display mode ## Product Navigation Each Prisme.ai product has its own dedicated navigation and interface. Here's a quick overview of how to navigate each product: > [tab] Chat > > ![Chat home screen with prompt composer and available agents](https://mintcdn.com/prismeai/GnmZ7SyyCbjmVFba/images/get-started-chat.png?fit=max\&auto=format\&n=GnmZ7SyyCbjmVFba\&q=85\&s=a645bcebabbaba90e6adbbf754afc48d) > > Key areas include: > > * **Chat Interface** - Main area for conversations > * **Conversation History** - Access previous chats > * **Settings** - Configure chat behavior > * **Document Upload** - Add documents to your conversation > [tab] Agent Creator > > ![Agent Creator dashboard with agent cards](https://mintcdn.com/prismeai/GnmZ7SyyCbjmVFba/images/get-started-agent-creator.png?fit=max\&auto=format\&n=GnmZ7SyyCbjmVFba\&q=85\&s=e815e6e7fec490dc0fbe46b1ba1219f2) > > Key areas include: > > * **Agent Hub** - Browse available agents > * **Create Agent** - Build a new agent > * **Instructions** - Define agent behavior > * **Capabilities** - Connect knowledge bases, tools, and integrations > * **Playground** - Test the agent before sharing it > [tab] Knowledges > > ![Knowledges dashboard with product navigation](https://mintcdn.com/prismeai/GnmZ7SyyCbjmVFba/images/get-started-knowledges.png?fit=max\&auto=format\&n=GnmZ7SyyCbjmVFba\&q=85\&s=718126b954bfd8de4f35d08137043f8e) > > Key areas include: > > * **Knowledge Bases** - Manage your knowledge bases > * **Documents** - Upload and manage documents > * **Agent Integration** - Connect knowledge bases to agents > * **Testing** - Test knowledge retrieval > [tab] Builder > > ![Builder workspace overview with sidebar navigation](https://mintcdn.com/prismeai/GnmZ7SyyCbjmVFba/images/get-started-builder.png?fit=max\&auto=format\&n=GnmZ7SyyCbjmVFba\&q=85\&s=7c4f3c1d5466d1d6b464436432998276) > > Key areas include: > > * **Overview** - Review usage, errors, recent changes, and quick actions > * **Activity** - Inspect workspace traces and correlation IDs > * **Pages** - Build React user interfaces > * **Automations** - Configure backend workflows > * **Imports** - Install and configure apps or custom code > * **Files** - Manage uploaded workspace assets > * **Settings** - Access workspace settings > [tab] Governe > > ![Governe dashboard with organization navigation](https://mintcdn.com/prismeai/GnmZ7SyyCbjmVFba/images/get-started-governe.png?fit=max\&auto=format\&n=GnmZ7SyyCbjmVFba\&q=85\&s=9a6687538cbd5135c9af8775793ee534) > > Key areas include: > > * **Organizations** - Manage tenants and members > * **Roles** - Configure product access and permissions > * **Models** - Govern model providers and routing > * **Observability** - Monitor platform activity and costs > * **Appearance** - Customize platform navigation and branding > [tab] Insights > > ![Insights dashboard with analytics navigation](https://mintcdn.com/prismeai/GnmZ7SyyCbjmVFba/images/get-started-insights.png?fit=max\&auto=format\&n=GnmZ7SyyCbjmVFba\&q=85\&s=b037c1534e0c9a3c2b3c25411b1486d7) > > Key areas include: > > * **Overview** - Review adoption and quality trends > * **Conversations** - Inspect conversations and analysis status > * **Evaluations** - Define criteria for conversation quality > * **Topics** - Understand common themes and clusters > * **Exports** - Extract data for reporting > [tab] Collections > > Key areas include: > > * **Dashboard** - Metrics and recent collections > * **Collections** - Your tabular datasets, with search and creation > * **Sources** - External data connectors (coming soon) > * **Settings** - Usage statistics across collections > [tab] Engage > > Key areas include: > > * **Dashboard** - Announcement stats and recent announcements > * **Announcements** - Create and target messages by product, role, or user > * **All Notifications** - The user-facing notification feed ## Add your own product to the menu The products above are not a fixed list. Every workspace you publish gets a slug, and you can pin it to your organization's menu, gated by permissions, so your custom apps sit right next to the built-in products. ![A platform sidebar with the built-in products (Chat, Store, Agent Creator, Knowledges, Collections, Builder, Insights, Engage, Governe) and a highlighted custom entry, Your CRM portal, added under a Your products group. To add it: build and publish a workspace, then pin it in Governe's menu editor and choose who sees it by role or group.](https://mintcdn.com/prismeai/lYxXAmOmR911Sth_/images/menu-custom-product.svg?fit=max\&auto=format\&n=lYxXAmOmR911Sth_\&q=85\&s=49483626eedaeea93035edf5aa44d265) It works because the built-in products are workspaces too. To add yours: build and publish a workspace in [Builder](/products/ai-builder/overview), then in [Governe](/products/ai-governance/overview) open Appearance (the menu editor), pin the workspace, and choose who sees it by role or group. ## Mobile Navigation On smaller screens, the navigation adapts to a more compact format: ![Prisme.ai mobile home screen](https://mintcdn.com/prismeai/GnmZ7SyyCbjmVFba/images/get-started-mobile-home.png?fit=max\&auto=format\&n=GnmZ7SyyCbjmVFba\&q=85\&s=a5ba321db69f5c9693869ecfeed1e35e) Key differences in mobile navigation: * Main menu collapses into a hamburger menu * Product navigation appears at the bottom of the screen * Some advanced features may be reorganized for better mobile access ![Prisme.ai mobile navigation drawer](https://mintcdn.com/prismeai/GnmZ7SyyCbjmVFba/images/get-started-mobile-nav.png?fit=max\&auto=format\&n=GnmZ7SyyCbjmVFba\&q=85\&s=78bc7d76c36512f47a7a5ad71547e397) ## Next Steps Now that you understand how to navigate the Prisme.ai platform, you're ready to explore its capabilities: > [card] [Products Overview](/products/overview) > > Explore the Prisme.ai product suite in detail # Platform Overview Source: https://docs.prisme.ai/get-started/platform-overview Where you are in your Gen.AI journey, and why the foundation has to be a neutral, resilient layer no single cloud or model vendor controls. The [introduction](./introduction) covered *why* Prisme.ai is a unified foundation rather than another silo. This page is the **strategic view**: where you are in your Gen.AI journey, and why that foundation has to be a **neutral, resilient layer** that no single cloud or model vendor controls. ## Where are you in building your AI Information System? Most enterprises are past experimentation. The work now is **scaling to measurable ROI**, with governance and freedom of choice. The platform meets you at your stage and grows with you, from secure chat to a scalable, AI-by-design Information System. ![Building your AI Information System on a value-at-scale axis. 1 Adopt: secure multi-LLM chat for everyone (Chat, Store). 2 Specialize: agents that act, with your skills and knowledge (Agent Creator, tools and MCP, Knowledges). 3 Scale and transform: custom apps, mutualized infrastructure, lower software costs (Builder, Collections, connectors and MCP). At every stage: governance central and delegated, sovereignty as freedom of cloud and model, and resilience.](https://mintcdn.com/prismeai/lYxXAmOmR911Sth_/images/maturity-model.svg?fit=max\&auto=format\&n=lYxXAmOmR911Sth_\&q=85\&s=3ccfa300ef2ed5526317ccdaa747ee78) * **Adopt**: give everyone secure, multi-LLM chat. Individual productivity, no data leaving your control. * **Specialize**: build agents that **act**, connected to your **skills** (tools, MCP) and your **knowledge**, multi-LLM and cloud-resilient. Moving from chat to agents that get things done. * **Scale & transform**: build custom apps and workflows with [Builder](/products/ai-builder/overview), mutualize infrastructure securely, and **rationalize internal software costs** by replacing siloed or underused applications, with measurable ROI. ## Resilience and freedom of choice A foundation earns its place by being the one layer no single vendor controls. This is a real **architecture** property, not a slogan: the platform is event-driven and layered to stay cloud- and model-agnostic. The low-level architecture, services, and databases are covered in [Self-Hosting](/self-hosting/overview). > [card] LLM resilience > > Models change fast: prices move, quality shifts, and some are deprecated (GPT-4o was retired). Prisme.ai is natively multi-model and routes across OpenAI, Anthropic, Mistral, AWS Bedrock, Google Vertex, and self-hosted models. Swap or route per use case **without touching your agents**. > [card] Cloud resilience > > Run on any major cloud or on-premises: AWS, Azure, Google Cloud, OVHcloud, Outscale, OpenShift. No cloud-specific service locks your agents, data, or governance in. Here, **sovereignty means resilience and freedom of choice, not protectionism**: you stay free to pick the best cloud and the best model, and to switch, without a rewrite. ### Why a cloud provider or an LLM provider cannot be your AI foundation * **A cloud provider's AI stack ties you to that cloud.** Your agents, data, and governance become cloud-specific, and leaving means rebuilding. Their incentive is to keep you on their cloud. * **An LLM provider's platform ties you to that model.** When a model is deprecated or repriced, you are exposed, and you cannot route to a competitor. Their incentive is to keep you on their model. * **Neither is neutral.** Their business is selling their cloud or their model. A foundation's job is the opposite: to keep you free to choose per use case, and to switch **without a rewrite**. * **Only a vendor-neutral layer can govern across clouds and models.** Governance, traceability, security, and cost control have to sit *above* any single provider to be real. That neutrality is the product. ## Governance that scales with you Governance is itself a maturity dimension. It starts **central** and becomes **delegated** as you scale, so teams get the freedom to act within guardrails rather than waiting on a bottleneck. That balance (central rules, per-organization autonomy) is what lets adoption grow without losing control. > [card] [Governe](/products/ai-governance/overview) > > Central and per-org governance: SSO, roles, model access, audit, quotas, and retention. > [card] [Adoption & Governance playbook](/resources/adoption-governance/overview) > > Who does what, one org or several, and how to open the platform without chaos. ## Build and deploy The foundation carries a full engineering lifecycle. Go straight to the detail: > [card] [Build](/dsul/overview) > > Workspaces as React front-ends and YAML automations, from VS Code over MCP, versioned in Git. > [card] [Deploy](/resources/adoption-governance/deployment) > > Platform environments with CI/CD, and per-use-case dev and prod workspaces synchronized by Git. > [card] [Architecture](/self-hosting/overview) > > Event-driven services, layering, and databases for teams running the platform. ## Next steps > [card] [Products & Capabilities](../products/overview) > > The building blocks of the platform > [card] [First Steps Guide](/get-started/first-steps) > > Getting hands-on with the platform > [card] [Account Setup](/get-started/account-setup) > > Configure your account and environment # The sovereign agentic layer Source: https://docs.prisme.ai/get-started/sovereign-agentic-layer Why the value of cloud is moving to the agentic layer, and why that layer must be sovereign: neutral, governed, and traceable across clouds and models. Prisme.ai is a sovereign agentic platform. The value in the cloud stack is moving up. Compute and models are becoming commodities. The durable value is now in the **agentic layer**: the layer that turns models into **agents that execute**, in a way that is **governed and traceable**. Prisme.ai is a **sovereign agentic platform** (in French, *une plateforme agentique souveraine*): that layer, built to stay yours. ## The value is moving to the agentic layer A model on its own does not run your business. What creates value is the layer that turns a model into an **agent that acts**: connected to your skills and knowledge, allowed to call tools, and doing it under governance and full traceability. That is where the differentiation and the ROI now sit, above raw infrastructure and above the models themselves. ## Why the agentic layer has to be sovereign Hyperscalers and model vendors capture this layer **above their own infrastructure**. That ties your agents, your data, and your governance to their cloud and their model. For enterprises with real sovereignty requirements (regulated industries, public sector, critical infrastructure), the agentic layer cannot be one more thing you rent from a single vendor. It has to be **sovereign**: * **Neutral** across clouds and models, so no single provider owns your AI. * **Running on the infrastructure you choose**, including sovereign and on-premises options. * **Governed and traceable by you**, not by the provider selling you compute or a model. ## What sovereign means here Not protectionism, but **resilience and freedom of choice**: run on any cloud or on-premises, route across any model, and switch without a rewrite. It is the same argument as [resilience and freedom of choice](/get-started/platform-overview#resilience-and-freedom-of-choice): a foundation earns its place by being the one layer no single vendor controls. ## Prisme.ai is that layer Prisme.ai is a governed, traceable foundation that turns models into agents and full-stack applications, on the infrastructure you choose. It is deployed in production across regulated industries such as banking, energy, industry, and the public sector: a working system, not a promise. ## Next steps > [card] [Introduction](./introduction) > > Why Prisme.ai exists and what it does > [card] [Platform Overview](./platform-overview) > > Your maturity path, resilience, and governance at scale > [card] [Governe](/products/ai-governance/overview) > > The governance that keeps the agentic layer yours # What's New in Prisme.ai Source: https://docs.prisme.ai/get-started/whats-new Latest features and improvements in the Prisme.ai platform Stay up-to-date with the latest enhancements, features, and improvements to the Prisme.ai platform. Our team continuously works to deliver new capabilities that help you build and deploy more powerful AI solutions. ## Latest Release **v27.9.0** Releasing version v27.9.0 > [!NOTE] > > **Deprecation notice** > > `PUT /v2/user/active-org` is deprecated and will be removed in a later release. Send the `x-prismeai-org-slug` header with each request instead. See [Authentication → Active Organization](/api-reference/authentication#active-organization). > [!WARNING] > > **This version contains breaking changes — check them before upgrading.** > > * Personal access tokens and demo mode need two new role permissions. > * The legacy `/v1/files` and `/v1/vector_stores` storage routes are removed. > * Add `agent-evaluations` to the LLM Gateway trusted sources. > * Run *Update from catalogue* on the Models page after the upgrade. > * Dictation falls back to the browser's speech service when no transcription model is available — on by default. > * The embedded chat follows the visitor's language; add `data-lang="en"` to keep English. > > [See the v27.9.0 breaking changes and actions →](/get-started/breaking-changes#v27-9-0) **Features:** * **API Gateway:** Each browser tab can work on its own organization, and any API request — Personal Access Tokens included — can choose its organization with the `x-prismeai-org-slug` header. See [Authentication → Active Organization](/api-reference/authentication#active-organization). * **AI Governance:** Edit several organizations at once from **Organizations › Bulk edit**, with the organization page editors — appearance and legal texts, left menu, Agents Controls, capabilities — a live preview and a detailed report. * **AI Governance > Models:** The API of a model, Chat Completions or Responses, is part of the Prisme.ai reference catalogue and prefilled from it. See [Model Governance → Reference catalogue](/products/ai-governance/model-governance#reference-catalogue-recommended-metrics). * **LLM Gateway:** New `recompute-usage-footprint` support tool, showing what an organization's past carbon footprint, energy and cost weigh with the current model settings, next to the recorded values. It is read-only: dashboards keep the recorded values. See [Model Governance → Costs are never recalculated](/products/ai-governance/model-governance#costs-are-never-recalculated). * **Governance:** Platform users can be filtered by organization, including users with no organization. * **Agent Creator:** Choose the model used by the LLM guardrails, and the reply Topic Guard gives to off-topic messages. See [Guardrails](/products/agent-factory/guardrails#classifier-model). * **Chat:** The model picker shows the cost and environmental impact of each model in a readable, comparable way. * **Chat:** Shared slide decks are displayed as slides instead of their raw source. * **Collections:** Organization administrators see and manage every collection of their organization, and collections can be filtered to those used by an agent. * **Knowledges:** A knowledge base shows its ready, processing and failed document counts, with pagination above the documents list. * **Connectors > SharePoint:** The connector works with a service account restricted to an explicit set of sites (Microsoft `Sites.Selected` permission), without read access to your whole tenant. Declare the allowed sites in the connector's configuration app: agents, MCP resources and indexing are limited to them, and an undeclared site is refused with an explicit message. Existing configurations are unchanged. See [SharePoint](/apps-store/marketplace/connectors/sharepoint). * **Connectors > Outlook:** Agents can prepare a reply, a reply-all or a forward as a draft, filed in the conversation thread, without sending anything: the user reviews and sends it. Drafts only need the Microsoft Graph `Mail.ReadWrite` permission. See [Outlook](/apps-store/marketplace/connectors/outlook). * **Connectors > Outlook:** Message search results can be paged through. See [Outlook](/apps-store/marketplace/connectors/outlook). * **Connectors > Odoo:** New connector: an agent can query Odoo data read-only, with the API key of a service account. * **Platform:** The studio and the mobile apps are available in Italian, Portuguese, Norwegian and Dutch, on top of French, English, Spanish, German, Arabic and Japanese. The language chosen on one applies to the others. **Improvements:** * **Agent Creator:** Long conversations make better use of the prompt cache on every provider: the instructions an agent gives itself mid-answer stay in place and no longer force the provider to reprocess the whole conversation, which lowers cost and response time. See [Model Governance → Prompt caching](/products/ai-governance/model-governance#prompt-caching). * **Agent Creator:** The low per-profile tool call limit that stopped agents early is gone: tool calls share one high safety ceiling, 100 by default — above the default of 50 for **Max Turns** — configurable with `config.tool_call_budget`. See [Runtime safeguards → Configurable budgets](/products/agent-factory/runtime-safeguards#configurable-budgets). * **Agent Creator:** Canvas content is kept in the history across the turns of one answer, and still removed from later messages. * **Agent Creator:** Topic Guard answers off-topic messages in the user's language. * **Agent Creator:** A model response cut off before its end is reported as interrupted, instead of asking to check the API key configuration. * **Agent Creator:** Choosing **Other** in a question the agent asks no longer requires typing in the custom input field first. * **Chat:** The microphone tooltip says when the audio goes to the browser's speech service, and a dedicated message explains when that service cannot be reached. Browser dictation stops after 2 minutes, like server dictation. See [Dictation](/products/ai-securechat/dictation). * **Chat:** The **Stop** button really stops the agent: it stops writing and calling tools as soon as you click, and only the part displayed is kept and billed. * **Sharing:** Sharing an agent, a knowledge base or a collection with a whole organization asks for confirmation first. * **Knowledges:** Any user can delete a file they uploaded that no document uses. * **Knowledges:** Migrating a legacy AI Knowledge project no longer goes through the legacy storage APIs. * **LLM Gateway:** Syncing models with the reference catalogue updates their capabilities and context window. * **LLM Gateway:** A Google Vertex AI model returning an HTTP error, streamed or not, is retried or failed over to another model. A mid-conversation system message or a forced tool choice the model refuses is replayed in an accepted form. * **LLM Gateway:** A streamed completion cut off before its end now ends on an explicit error chunk (`IncompleteStream`) instead of a silent end. * **prismeai-runtime:** A failed streaming HTTP call returns the provider's error message instead of an empty stream. * **prismeai-runtime:** `application/*+json` responses are decoded as JSON. * **prismeai-runtime:** A call whose error response is not valid JSON keeps being retried. * **prismeai-workspaces:** Storage errors on downloads return `502` instead of `404`, with the actual cause logged, and S3 timeouts are configurable (30 seconds by default). * **API Gateway:** The API answers `403` instead of `400` when a user is not allowed to manage organization roles or API keys. * **Connectors:** Hardened credential handling on the ServiceNow, Tableau, SonarQube, Excel and Word connectors. * **Platform:** October 2026 Node.js and Brotli security updates applied to every service. **Bugfixes:** * **Agent Creator:** Fixed conversations stopping without an answer when the agent asked an empty clarification question. * **Agent Creator:** Fixed agents rewriting the same canvas several times within one answer. * **Agent Creator:** Fixed files attached to a message taking long to index when the same file was already attached in another conversation or added to a knowledge base; they are indexed within seconds again. * **Agent Creator:** Fixed a connector's tools missing after connecting it from the chat's connectors menu; they are available on the next message. * **Agent Creator:** Fixed the settings of a knowledge base attached to an agent showing its vector store ID instead of its name — when an agent had several knowledge bases, all but one were affected. * **Agent Creator:** Fixed agents whose **Max Turns** was set to 0 failing to save; the editor now names the field when a value is rejected. * **Agent Creator:** Fixed LLM guardrails failing with an access error for regular users calling an agent through the API. * **Agent Creator:** Fixed agent analytics failing when a model returned a malformed tool name. * **Agent Evaluations:** Fixed evaluations run by builders and other non-admin users being left unjudged. * **Chat:** Fixed dictation missing on Chrome and Edge when no transcription model is configured. See [Dictation](/products/ai-securechat/dictation#browser-fallback-desktop-chrome-and-edge). * **Chat:** Fixed messages over 100,000 characters being silently discarded; a warning is shown instead. See [Document handling](/products/ai-securechat/document-handling). * **Chat:** Fixed uploaded files showing a stuck loading icon instead of a check once processed. * **Knowledges:** Fixed large documents failing to index when they exceeded the embedding provider's per-minute rate limit. * **Knowledges:** Fixed a document too large to index reporting *exceeds given threshold* instead of asking to split it. * **Knowledges:** Fixed the sharing tab showing an empty list to non-admins; every member allowed to share a knowledge base sees who has access to it. * **Knowledges:** Fixed deleting a document or a knowledge base no longer deleting its uploaded file when no other document uses it. * **Knowledges:** Fixed scheduled connector synchronizations failing with an authorization error on instances updated without their new configuration. * **Collections:** Fixed added columns never being created when a JSON column had stayed a text column. * **AI Governance:** Fixed importing a model governance export erasing the organization's default transcription model; settings the file does not contain are kept. * **LLM Gateway:** Fixed models added from a provider or the catalogue missing from model pickers. * **LLM Gateway:** Fixed document parsing with Bedrock models indexing invented text instead of the file content. * **AI Insights:** Fixed the per-user consumption tab showing *Unknown user* instead of user names. * **Settings:** Fixed the access token list appearing empty after revoking a token. `GET` and `DELETE /v2/user/accessTokens` now return the token `id` instead of `_id`, as the API specification documents. * **Connectors > Outlook:** Fixed message search failing when combined with filters, sorting or paging. * **Connectors > Salesforce:** Fixed the connection being lost when an agent ran several Salesforce tools in parallel right after the session expired, or on an organization that renews its keys on every use. When Salesforce does refuse to renew the session, the connector shows as disconnected and the agent offers to reconnect, and the status dot turns red right after a disconnection instead of on a second click. * **prismeai-workspaces:** Fixed file downloads hanging when storage timed out. * **prismeai-events:** Fixed the events cleanup job failing on older, write-locked OpenSearch indices. ## Previous Releases **v27.8.0** Releasing version v27.8.0 > [!WARNING] > > **This version contains breaking changes — check them before upgrading.** > > * Managing API keys needs the new `apikeys` permissions — custom and edited roles lose access until granted. > * A document over 10,000 chunks fails to index, including one indexed before. > * `rejection_reason` is empty for most readers; read `public_rejection_reason`. > * Agent Evaluations need an organization API key in `AGENT_FACTORY_API_KEY`. > * Access to knowledge bases and canvases is tighter. > > [See the v27.8.0 breaking changes and actions →](/get-started/breaking-changes#v27-8-0) **Features:** * **Agent Creator:** Agents can now read an attached file in full rather than only retrieving passages from it, which is what finding an exact value in a document requires. Enable it in the agent's settings. See [Knowledge architecture → Conversation file search](/products/agent-factory/knowledge-architecture#conversation-file-search-what-happens-when-a-user-uploads-a-file). * **Agent Creator:** An agent can attach a connector file of up to 100 MB to the conversation, like a file dropped in the chat. * **Agent Creator:** MCP tools can receive the user's message, through the `user_message` scope. * **Chat:** The model picker warns about a model's end of life — orange before the date, red after. * **Chat:** A model menu filter shows only the models able to listen to an audio file, each marked with its own pictogram, on the web and on the mobile applications. * **Knowledges:** E-mails (`.eml`, `.msg`) are indexed, from uploads and from connector syncs, and unreadable file types are refused with a clear error. * **Knowledges & AI Governance:** Organization administrators can enforce per-user access control on connector sources, including through Knowledge Explorer. See [Connectors](/products/ai-knowledge/connectors). * **Connectors > Outlook:** Microsoft Entra authentication can use a certificate held in your key store instead of a client secret. See [Outlook](/apps-store/marketplace/connectors/outlook). * **Connectors > Outlook:** Microsoft Graph calls can be routed through your own API gateway. See [Outlook](/apps-store/marketplace/connectors/outlook). * **Connectors > Outlook:** Agents choose which of the files uploaded in the chat to attach to an e-mail, keep their file names, and stop rather than send the mail when a requested file cannot be included. * **AI Governance > Models:** A model carries a **Max response tokens (max)** ceiling, pre-filled from the reference catalogue, which the default **Response Tokens** can no longer exceed. See [Model Governance](/products/ai-governance/model-governance). * **AI Governance > Models:** A model carries an end-of-life date, a brand picked from the known brands with its logo previewed, and a carbon region chosen from a list that defaults to *From the provider*. * **AI Governance > Models:** Request parameters can be excluded or renamed per model, with the catalogue's suggestions. * **AI Governance > Models:** A reference catalogue model is found through a searchable selector, and a model can be cloned under another catalogue id. * **AI Governance > Providers:** Each provider entry takes an optional carbon region, and models can be added from the list a provider exposes, with an optional alias and catalogue model per row. * **AI Governance:** Catalogue updates are reviewed in three tabs — to update, kept values, to add — and applied per tab or per model. * **LLM Gateway:** Excluded and renamed request parameters can be set per model. * **Governance:** An organization's join rules can be re-evaluated on existing users, with a dry-run preview, and optionally update the role and groups of existing members. See [Identity & Access → Simulating and applying rules](/products/ai-governance/identity-access#simulating-and-applying-rules). * **Governance > SAML:** The SAML request binding can be chosen, HTTP-POST or HTTP-Redirect. See [Identity & Access → Adding a SAML Provider](/products/ai-governance/identity-access#adding-a-saml-provider). * **AI Insights:** A custom date range on the Consumption, Memories, Feedback and agent Users pages. * **AI Insights:** The feedback modal shows the question and the answer the feedback was given on, and opening the conversation lands on the evaluated message, highlighted. See [Feedback](/products/ai-insights/feedback). * **Platform:** Built-in apps can be opened standalone, at `/p/`. * **prismeai-runtime:** New `crypto.signJwt`, signing JWTs with your own private key and certificate (RS256, PS256, ES256). See [Crypto Module → signJwt](/products/ai-builder/module-crypto#signjwt). * **prismeai-events:** The events index settings, the number of replicas for instance, can be customized with `EVENTS_STORAGE_ES_INDEX_SETTINGS`. **Improvements:** * **Agent Creator:** When a search in a conversation file finds nothing, the agent is told which attached files failed to index, were refused by a content policy, or are still indexing, instead of concluding the file does not hold the answer. * **Agent Creator:** A file refused by a content policy at upload is reported with the same public reason it gets on later searches. * **Agent Creator:** An agent's description is now required in the interface. Existing agents without one are untouched beyond an information modal inviting you to add one, and creation through the API is unchanged. * **Agent Creator:** Agent lists no longer show agents created in another organization. * **Agent Creator:** An agent reserves only its own **Max Response Tokens** for its answer, rather than the model's setting, so an agent with a lower limit keeps more conversation history. See [Settings](/products/agent-factory/settings). * **Chat:** The model picker shows each model's brand logo, built into the image so it works offline. * **Chat:** Canvas titles run on two lines across the whole card, so canvases with close titles can be told apart. * **Knowledges:** Large documents are indexed batch by batch, and no longer stay *in progress* after the indexing worker runs out of memory. * **Knowledges:** The upload dialog offers every supported format, e-mails included. * **Connectors > SharePoint:** Reading a non-text file — PDF, PowerPoint, image — offers it as a chat attachment instead of returning raw base64 that floods the agent's context. See [SharePoint](/apps-store/marketplace/connectors/sharepoint). * **Connectors > OneNote:** Page content is kept out of the activity feed, and every Microsoft Graph call is recorded as an audit event. See [OneNote](/apps-store/marketplace/connectors/onenote). * **LLM Gateway:** Every call is capped at the model's maximum response length, and the caller's own limit is applied whether it arrives as `max_tokens` or `max_completion_tokens`, on every provider — including GPT-5 and o-series models behind an entry that excludes `max_tokens`. * **LLM Gateway:** The carbon footprint region is taken from the provider entry actually serving the model on each call, so it follows a model moved to another entry or region, and Bedrock cross-region profiles (`eu.`, `us.`, `global.`) count in their own geography. * **AI Governance:** Model end-of-life dates and maximum response lengths are tracked from the reference catalogue, and each response-length field carries an (i) hint explaining the default and the maximum. * **AI Governance:** The role editor shows the API key permissions and the AI Collection product. * **Governance > SAML:** Signed SAML requests use SHA-256 digests instead of SHA-1, and requests sent with the HTTP-Redirect binding are always compressed. * **Platform:** Pinned agents, workspaces and apps are kept separate for each organization. * **Workspaces:** Better behaviour on imports and git pulls of large workspaces running out of memory. * **api-gateway:** New debug log of the SAML claims received, enabled with `LOG_LEVEL=debug`. * **Platform:** Security upgrades and dependency updates. * **E2E testing framework:** Added cross-tool challenging to the API model tests. **Bugfixes:** * **Agent Creator:** Fixed agents losing a file's content when searching it again later in a long conversation. * **Agent Creator:** Fixed serving the persisted service-account permissions to cross-organization callers. * **Agent Evaluations:** Fixed large runs stopping around case 46 on the maximum call depth; cases are now evaluated in slices. * **Agent Evaluations:** Fixed a stalled run restarting from scratch: it resumes at its first missing case, on its original plan, and a single-case run no longer re-evaluates every case of the agent. * **Agent Evaluations:** Fixed rate-limited cases being stored as errors; they are replayed after the retry delay, a throttled judge is replayed alone without calling the agent again, and an exhausted monthly quota is no longer retried. * **Agent Evaluations:** Fixed a failed agent call being judged anyway: the case is stored as errored with its failure kind — rate limit, quota exhausted, judge authentication — instead of a misleading score, and an errored multi-turn case is never stored as passed. * **Agent Evaluations:** Fixed multi-turn cases answering on top of earlier cases' turns; each one now runs in its own conversation. * **Chat:** Fixed the "Conversation not found" banner staying on every conversation after opening a deleted or inaccessible one. * **Chat:** Fixed the connection card not appearing in the conversation for connectors added through a custom configuration — the agent could ask you to click a **Connect** button that was nowhere on screen. * **Chat:** Fixed a failed connection being presented as successful: the card now gives the reason and offers to retry. * **Knowledges:** Fixed a run reading a large source staying displayed at 0/0/0, and a cancelled run appearing as an error. * **Collections:** Fixed a failed schema update leaving the collection unreadable; it keeps its previous state and can be updated again. Text columns changed to JSON are now converted automatically. See [Collection](/apps-store/marketplace/collection). * **Connectors > Power BI:** Fixed signing in failing with `invalid_state` when Microsoft answers instantly or when the connect button is clicked twice. See [Power BI](/apps-store/marketplace/connectors/powerbi). * **Connectors > Power BI:** Fixed DAX queries failing with an access error about an hour after connecting; an expired sign-in is now renewed automatically. * **AI Governance:** Fixed a model keeping its old capabilities indefinitely once used. Changes made in Governance — audio or image support, context size, excluded parameters, transcription model — now reach agents within minutes, with no technical intervention. A voice memo could previously stay ignored. * **AI Governance:** Fixed removing every organization from a model not making it available to all organizations again; the old restriction was kept. * **LLM Gateway:** Fixed a model declared in two provider entries being attributed to the wrong one in usage analytics. * **AI Insights:** Fixed unknown user IDs appearing in usage analytics for agents called with a service account. * **AI Insights:** Fixed the Memories figures on the "Last 90 days" period. * **Builder:** Fixed the **Pull Version** dialog showing only *Latest* for named repositories; it now lists each repository's own versions, and *Platform* no longer lists versions pushed to a git repository. See [Versioning](/products/ai-builder/versioning). * **Mobile:** Fixed canvas editing on Android — changes are taken into account as you type, line breaks keep their formatting, older versions display in full under their banner, and scrolling a canvas no longer closes it by accident. Asking the agent what changed now compares your versions instead of rewriting the document. **v27.7.3** Releasing version v27.7.3 **Highlights:** * **Performance:** Slow queries across Knowledges, Agent Factory and Insights have been reworked. The Insights and Consumption pages now load in about a second, even on large organizations, and the daily charts fill their own gaps after a processing outage instead of waiting for a manual backfill. > [!WARNING] > > **This version contains breaking changes — check them before upgrading.** > > * Declare the models that reject a forced tool choice. > * Tableau, ServiceNow and SonarQube agents stop working until you reconfigure them. > * Grant the dictation permission to your custom roles. > * Git now goes through `HTTPS_PROXY`. > * The crawler needs Redis 6.0 or later. > > [See the v27.7.3 breaking changes and actions →](/get-started/breaking-changes#v27-7-3) > [!NOTE] > > **Known issue — the microphone can disappear entirely, fixed in v27.9.0** > > Until a transcription model is configured on the platform **and** allowed in the organization, the microphone is not shown at all in the chat, even to users whose role grants **Use Audio Transcriptions**. There is no fallback in this version. > > v27.9.0 brings back the browser's own microphone for the browsers that support it, so dictation works again without a configured transcription model. v27.8.0 behaves like v27.7.3 here. **Features:** * **Agent Factory:** MCP servers can now offer files that the agent attaches to the conversation once you approve, and attached files are indexed and searchable in the chat. Updated servers: SharePoint (OneDrive included), Google Workspace (Drive files and Gmail attachments), Outlook (mail attachments), Confluence (page attachments), HubSpot (files), monday.com (assets) and WebDAV (files). * **Agent Factory:** A message can be resent without creating a duplicate: an application that does not know whether its send went through — connection lost, application closed — can send it again safely, as the agent answers only once and the second send returns the original answer. Conversations started by a non-streamed send now get a title like the others, and an agent's card says where to drop attachments. * **Agent Factory:** Hooks take a configurable timeout, 30 seconds by default, and users are told when a hook failed or did not answer. See [Hooks](/products/agent-factory/hooks). * **Chat > Canvas:** The Canvas tab on the home page now gathers all your canvases, with a search, filters by type and by agent, sorting and progressive loading. Deleting a conversation no longer deletes its canvases — they stay available in that tab. See [Canvas](/products/ai-securechat/canvas). * **Chat:** Voice dictation now works on every browser and behind corporate proxies: your voice is transcribed by your organization's transcription model, and is not retained. See [Dictation](/products/ai-securechat/dictation). *Since then, when the organization has no transcription model or its allowed models leave it out, users can dictate in desktop Chrome and Edge through the browser's own speech service: see [How dictation works](/products/ai-securechat/dictation#how-dictation-works).* * **Knowledges:** Failed connector documents can be retried from the connection, without resynchronizing the whole source, and indexing failures now state a readable cause. The parser chosen for a document is kept across synchronizations. See [Connectors](/products/ai-knowledge/connectors). * **Knowledges:** New weekly, every-2-weeks and custom auto-sync frequencies on connectors, plus a name filter in the folder picker. See [Connectors](/products/ai-knowledge/connectors). * **Knowledges:** A re-index can now force every document, including those carrying an override, to use the knowledge base chunking configuration. See [RAG Settings → Chunking Settings](/products/ai-knowledge/rag-settings#chunking-settings). * **LLM Gateway:** Prompt caching is enabled by default for conversations on every major provider, with a per-request switch. * **LLM Gateway:** New model setting declaring the models that reject a forced tool choice, settable from the Models admin page or detected by the model **Test** button. See [Model Governance](/products/ai-governance/model-governance). * **AI Governance > Models:** Recommended settings are now suggested for the models known to the reference Prisme.ai catalogue. See [Model Governance → Reference catalogue](/products/ai-governance/model-governance#reference-catalogue-recommended-metrics). * **AI Insights:** The per-user consumption table can be paginated, sorted and searched. See [Consumption → Per-user consumption](/products/ai-insights/consumption#per-user-consumption). * **Platform:** You can now change your password from **Settings › Security** after confirming your identity: your other devices are signed out and an email warns you, as after a reset. Passwords known to have leaked are refused, and long passphrases are accepted. See [Change your password](/get-started/change-password). * **Platform:** SAML authentication requests are now signed with a platform-managed certificate, and the service provider metadata can be downloaded from the provider dialog. Signatures default to SHA-256. See [Identity & Access → Adding a SAML Provider](/products/ai-governance/identity-access#adding-a-saml-provider). * **Platform:** New `/v2/orgs/{orgSlug}/join-rules/apply` endpoint, simulating the impact of organization join rules before applying them, and applying them to every matching user at once. See [Identity & Access → Simulating and applying rules](/products/ai-governance/identity-access#simulating-and-applying-rules). * **Connectors > SonarQube:** Each user can now connect their own SonarQube token, and SonarQube Server 9.9 LTS is supported. See [SonarQube](/apps-store/marketplace/connectors/sonarqube). * **Connectors:** The connector configuration page is now organized in two tabs, **Authentication** and **Agents**, with a tab bar that stays visible. * **Mobile:** You can choose to hear only a short spoken summary of each answer instead of the whole reply. Agents prepare it automatically when you listen, without changing anything you read on screen. **Improvements:** * **Agent Factory:** Agents reply in the language of your message and of the conversation, instead of falling back to your interface language. This was needed to improve the cache hit rate of the LLM providers. * **Agent Factory:** The conversations list now loads as you scroll. * **Chat:** A conversation keeps running in the background when you switch to another one. * **Chat:** Connect and Disconnect are no longer offered on connectors that use a shared credential. * **Chat:** The internal file id prefix is hidden from file names in attachments, processing cards and sources. * **Knowledges:** Changing the source or the knowledge base of an existing connection no longer interrupts AI Knowledge: the save shows as in progress, then the connection is updated without reloading the page. * **LLM Gateway & Agents:** The fixed limits of 100 requests per minute and 200 messages per hour are gone. Only the governance quotas apply now, with a default of 100 requests per minute per user that you can change. See [Subscriptions & Quotas](/products/ai-governance/subscriptions-quotas). * **AI Governance:** The format of Google Vertex accounts, `gemini` or `anthropic`, is now set from the **Providers** tab. * **AI Governance:** The default subscription plan can no longer be unset, and is assigned automatically to every new organization. See [Subscriptions & Quotas](/products/ai-governance/subscriptions-quotas). * **AI Insights:** Analytics pages show an error with a retry button instead of zeros when analytics are temporarily unavailable, and loading placeholders instead of empty data while they load. * **AI Insights:** Gaps in the daily charts are filled automatically after a data processing outage, with no manual backfill. * **Platform:** The organization creation wizard is simpler — fewer steps, and direct links to the AI models and SSO setup at the end. See [Identity & Access → The guided setup](/products/ai-governance/identity-access#the-guided-setup). See also [Help agents → API configuration](/products/ai-governance/help-agents#api-configuration). * **Workspaces:** Git now goes through `HTTPS_PROXY`. * **prismeai-runtime:** Long streaming responses are kept alive by default with a standard SSE comment ping. * **prismeai-workspaces:** Downloaded files are served under their clean name, without the internal storage id prefix. * **Functions:** Custom Code packages updated for security: `adm-zip`, `js-yaml`, `yaml`, `form-data`, `@azure/msal-node`, `axios`, `follow-redirects`, `brace-expansion`, `lodash`, `sharp`, `csv-parse`. * **Helm chart prismeai-core:** * `1.12.3`: Managed identity is available for Azure Blob Storage (`azureManagedIdentityClientId`, `azureSystemIdentity`). * **Helm chart prismeai-apps:** * `0.7.2`: Raised the `prismeai-functions` liveness probe timeout to 3s. **Bugfixes:** * **Agent Factory:** Fixed tool selection failing on Claude Opus 5.5 and other models that reject a forced tool use. * **Agent Factory:** Fixed the conversation history being dropped on follow-up messages sent through the `messages/send` API. * **Agent Factory:** Fixed conversations becoming unusable after an agent suggests connecting an OAuth connector and the user answers with a free-text message. * **Agent Factory:** Fixed connector tools breaking after a connector is switched to per-user sign-in. * **Agent Factory:** Fixed knowledge base citations of connector-synced documents linking to a non-clickable URL. * **Chat:** Fixed conversation, recent canvas and shared conversation dates showing in the browser language instead of the interface language. * **Knowledges:** Fixed the scheduled synchronizations of knowledge bases fed by a personal-account connector (SharePoint, Google Workspace, Confluence…) in the workspaces that installed that connector: they find again the account each user connected. * **Connectors > SharePoint:** Fixed **Load more** not loading further sites in the folder picker. See [SharePoint](/apps-store/marketplace/connectors/sharepoint). * **Connectors > Jira:** Fixed listing projects on Jira Cloud with the Next connector. See [Jira](/apps-store/marketplace/connectors/jira). * **Connectors > Confluence:** Fixed connecting your own Confluence Data Center token on a connector instance whose name contains a space. See [Confluence](/apps-store/marketplace/connectors/confluence). * **Crawler:** Fixed files with many custom metadata fields failing to index with a `Limit of total fields [1000]` error; the index template now stores `custom_metadata` as a single field. * **AI Governance:** Fixed the API Keys card of the organization overview always showing 0 active keys. * **AI Insights:** Fixed the agent graph being recomputed on every visit. * **Platform:** Fixed sign-in leaving the user on a `500` error when the sign-in session had expired; it now restarts the sign-in. * **Platform:** Fixed database access failing around 24 hours after startup when PostgreSQL uses Azure managed identity. * **Platform:** Fixed custom favicons on Chrome browsers. * **Mobile:** Fixed enterprise identity provider sign-in staying stuck on a "Redirecting…" page on Android; a return page now offers to open the application in one tap. * **api-gateway:** Fixed the Google SSO callback being refused with a `RequestValidationError`. * **prismeai-runtime:** Fixed `updateOne` on collections modifying every matching document instead of one, on PostgreSQL. See [Collections Module](/products/ai-builder/module-collections). * **prismeai-runtime:** Fixed expressions and conditions silently returning wrong results when a string or a regex contained a digit. * **Functions:** Fixed Custom Code functions staying stuck on "Object not found" after an incident on the execution service storage; the service now recovers on its own within seconds. **v27.7.1** Releasing version v27.7.1 > [!WARNING] > > **This version contains breaking changes — check them before upgrading.** > > * Helm upgrade recommended: `prismeai-apps` `0.7.2` and `prismeai-core` `1.12.2`. > * Code Interpreter download links need `authentication.allowApiKeyOnly`. > * Some monday.com, Outlook, Power BI and GitLab users reconnect their account once. > * Passkeys on a multi-DNS console need `WEBAUTHN_RP_ID`. > * Indexing embeddings now count against the monthly LLM budget. > > [See the v27.7.1 breaking changes and actions →](/get-started/breaking-changes#v27-7-1) **Features:** * **Agent Factory:** Approvals can now be set per tool and per action of an MCP server, from **Settings › Permissions**, with inheritance from server to tool to action. See [Tool Permissions → Per-tool overrides](/products/agent-factory/tool-permissions#per-tool-overrides). * **Agent Factory:** An agent can now be shared with a chosen organization, or with every authenticated user. * **Agent Factory:** The AI Collection capability can be added several times to one agent, one per collection. * **Agent Factory:** An evaluation run now displays the agent's model and the judge's model. See [Evaluations](/products/agent-factory/evaluations). * **Prompt Library:** Now multilingual, French and English, with a bulk import and export API. See [Prompt Management](/products/ai-securechat/prompt-management). * **Connectors:** Microsoft Teams becomes a connector in its own right. An agent can browse your teams and channels, read and post messages, follow your conversations, and retrieve the transcripts and attendance sheets of your meetings. Connecting takes one click, with no Microsoft application to register. Your channel threads can feed a knowledge base, each person seeing only what they have access to in Teams. And you can still talk to your agents from Teams. See [Microsoft Teams](/apps-store/marketplace/connectors/microsoft-teams). * **Connectors > GitLab:** The connector now also connects to a self-hosted GitLab instance. Two new authentication methods marked *self-hosted*, by personal token or by OAuth2, take the address of your instance; every connector operation then targets it, including connecting and disconnecting users. See [GitLab](/apps-store/marketplace/connectors/gitlab). * **Connectors > Confluence:** The Confluence MCP connector ("next") now fully supports on-premise Confluence. See [Confluence](/apps-store/marketplace/connectors/confluence). * **Connectors > SAP LeanIX:** Agents can now read the drawn diagrams attached to a fact sheet, such as the flowchart of a business process: they describe its steps, decisions and lanes, and can render it as a diagram in the conversation. See [SAP LeanIX](/apps-store/marketplace/connectors/sap-leanix). * **Code Interpreter:** The tool can now return a generated file as a downloadable link. See [Code Interpreter](/products/agent-factory/code-interpreter). * Self-hosted deployments need a configuration change first, see the breaking changes above. * **AI Governance:** New **Userinfo Endpoint** field on OIDC SSO providers. See [Authentication → Configuring OIDC Authentication](/self-hosting/entreprise/authentication#configuring-oidc-authentication). * **AI Insights > Consumption:** LLM consumption can now be filtered by user, call type, model, and a custom time range on the chart. See [Consumption → LLM requests](/products/ai-insights/consumption#llm-requests). * **AI Insights > Consumption:** A **Tokens** view sits next to Requests and Cost on the consumption chart. * **AI Insights:** The per-user consumption table can be sorted by any column, cost first by default, and the CSV export follows the current sort. See [Consumption → Per-user consumption](/products/ai-insights/consumption#per-user-consumption). * **AI Insights:** A piece of user feedback now opens the conversation it was given on, straight from the Feedback list. See [Feedback](/products/ai-insights/feedback). * **Platform:** You can now sign in with a passkey — Face ID, fingerprint, Windows Hello or a security key — with no password and no code to copy. The authenticator app remains available, a new **Connection** section in the settings manages your methods, and resetting a password now asks for the second factor when one is configured. See [Authentication → Configure passkeys](/self-hosting/entreprise/authentication#configure-passkeys). * **Platform:** A new **Connections** section in the user settings lists your active sessions and lets you revoke them. * **Platform:** Switch organization from the sidebar and from the settings, when you have access to more than one. * **Mobile:** Pair the app by scanning a QR code from a desktop session. * **Mobile:** Voice memos can now be uploaded from the mobile apps. * **Embed:** New script-free `