Integrations

Remote Tool Approvals

How Appstrate tracks the tools a remote MCP server lists, which ones a space can use, how undeclared tools are approved or blocked, and what happens to a run when a tool is unavailable.

Preview

Tool snapshots, approvals and blocks are not yet in the latest release.

A remote MCP integration offers the tools its server lists, and that list can change without the integration changing. Appstrate keeps track of it and lets each space decide which tools its agents may use. This page covers that mechanism. Integrations with source.kind: "none" or "local" have no remote server to list: snapshots and approvals do not concern them, but blocking applies to the tools of every source and to api_call and api_upload.

The tool snapshot

For each connection, the platform stores what the server last listed: the tool snapshot. It is refreshed when:

  • tools are listed outside a run (the agent editor, a direct tool listing through the credential proxy);
  • a platform run boots: the sidecar reports what the server listed to the run;
  • someone selects Read the server again on the integration's Tools tab. It reads the latest published version of the integration and needs the right to call it with that connection.

Read the server again needs credential-proxy:call-own. It is refused when no version is published, for an integration that is not remote (integration_not_remote), for a server on the SSE transport (sync_transport_unsupported, only Streamable HTTP is read), when the space closed the credential proxy (credential_proxy_closed) and when the connection's variables do not render the server URL (remote_url_unrenderable). The Tools tab shows the button disabled, with the reason, in those cases and when the integration is not active in the space, you may not use a connection to query the server, or no account is connected.

The Tools tab shows the date of the last read, how many tools were added, gone or changed since the previous one, and the connection used. If the server returned more tools than the platform keeps, the list is marked Truncated list. A tool missing from a truncated list is never judged gone.

Tool statuses

In a space, every tool has a status and an origin.

StatusMeaning
availableThe agent can select and call it.
missingDeclared or approved, but the server no longer lists it ("Not on the server at the last read"). Only judged from a complete listing.
pendingWaiting for an approval in this space ("Awaiting approval in this space"): an undeclared tool on a closed catalog, or an approved tool, declared or not, whose definition changed.
blockedA person blocked it in this space ("Blocked in this space") or for the whole organization ("Blocked by the organization"); block_level says which.
OriginMeaning
declaredNamed in the integration's tools_policy.
approvedNot declared, but a person approved its definition in this space or for the organization.
listedNot declared and not approved: the server lists it, nothing more.

One rule decides when an approval is needed:

  • A tool that holds at least one approval, in the space or for the organization, runs only in an approved definition. This holds for a declared tool and on an open catalog too: approving a tool pins its definition. When the organization approved the tool, only the organization's approvals count (see Organization level).
  • An undeclared tool on a closed catalog needs an approval to run at all.

A tool that holds no approval and is declared, or listed on an open catalog, is usable as the server lists it. If a declared tool's definition changes, it is only flagged "definition changed".

Closed and open catalogs

What happens to an undeclared tool depends on allow_undeclared_tools in the integration manifest.

CatalogUndeclared tool
Closed (default)Unavailable in a space until a person holding integrations:configure approves its exact definition there.
Open (allow_undeclared_tools: true)Usable without approval, unless someone pinned it by approving a definition. Blocking still applies.

Tools in hidden_tools (and the connect and login tools the platform keeps out of reach) are never offered and can never be approved, whatever the catalog.

Approve a tool

Open the integration, then its Tools tab. Under Tools to review are the tools the server lists that the package does not declare, and the approved ones whose definition changed (Definition changed since approval). View the definition shows what the server lists, next to the approved one when there is one. Approve accepts that exact definition, identified by its fingerprint. An approval covers the definition the server lists, not what the server does when the tool is called.

  • A tool that no snapshot contains cannot be reviewed: read the server again first.
  • If the definition changed between your review and your click, the approval is refused (tool_snapshot_stale): review the new one.
  • One tool can have several approved definitions, for instance when a templated server URL points each connection at its own instance. At most 32 per tool at one level, the space's or the organization's (409 tool_approvals_limit); since a tool's approvals that count come from one level only, that is also the most any space judges it against. Withdraw approval removes every approved definition of the tool, so to stay under the limit withdraw the tool, then approve the definition to keep.
  • A definition too large to be kept cannot be reviewed, so it cannot be approved (tool_definition_unavailable).
  • A hidden tool cannot be approved (409 tool_hidden).
  • A tool the organization approved cannot be approved in a space (409 tool_governed_by_organization): its review card says the organization must review it, and offers Approve for the organization to a holder of org-integrations:configure.

Pin a definition

A tool that needs no approval (a declared tool, or any tool of an open catalog) can still be approved: Pin this definition on its row approves the definition the server lists now, and Pin for the organization does it for every space. From then on the tool runs only in an approved definition: if the server changes it, the tool turns pending and appears under Tools to review until someone approves the new definition. Withdraw approval unpins it.

A Tools to review notification goes to the holders of integrations:configure when a snapshot brings a new or changed tool that is awaiting approval: an undeclared tool on a closed catalog, or a pinned tool whose definition changed, on either catalog. It is sent only in the spaces where the integration is active and the tool is pending (not blocked, and not already approved at its current definition). An open catalog with no pinned tool notifies nobody. For a snapshot of a connection, only the holders who can use that connection are notified. A tool the organization approved is reviewed by the organization alone: its notice goes to the holders of org-integrations:configure (whichever connections they can use), and to no holder of the space right only. Each person has at most one unread notice per space and integration: a new listing does not stack another.

Approvals made in a space hold in that space only. To approve a tool in every space at once, approve it for the organization (see Organization level).

Declare a tool in the integration

Approving is the space's decision. Declaring is the author's: it adds the tool to the integration's tools_policy, so the integration itself vouches for it.

On the Tools tab of the integration editor, Declare in the integration (on a tool under Tools to review or Undeclared tools) adds one listed tool to the draft, and Declare all listed tools adds every tool the last read lists and the package does not declare yet. Both work from the recorded snapshot: read the server again first if none exists.

  • Who: anyone with write access to the integration in its home space. This is not the integrations:configure right that approving needs.
  • Effect: the tool is added to the draft only. Save the draft, then publish a version. From that version on the tool is declared everywhere the integration is active, with no per-space approval. Declaring does not remove an approval: a space or an organization that approved the tool keeps it pinned to its approved definitions.
  • Approving instead: approving makes the tool usable in this space only, and leaves the manifest untouched. Declaring, once published, covers the whole organization.
  • Nothing is removed: declaring only adds. A declared tool the server stops listing stays in the list as missing.

An integration created from an MCP URL declares no tool; the tools the server lists are reviewed through the snapshot, and the server's readOnlyHint and destructiveHint annotations appear on each review card as unverified hints.

Block a tool

Block (or Block a tool… to name one) makes a tool neither offered nor callable in the space, declared or not, on an open or a closed catalog. It applies to the tools of every integration source (remote, local or none) and to api_call and api_upload; blocking api_upload alone applies to runs only. A policy route accepts any name the server listed (1 to 128 characters). A space holds at most 500 blocks per integration, its own and the organization's together; past that, blocking is refused with 409 tool_blocks_limit until one is lifted. Unblock reverses it. A space's unblock of a tool only the organization blocks is refused (409 tool_governed_by_organization).

Organization level

A policy has two levels: the space and the organization. A decision taken for the organization holds in every space of it.

  • Who: a space decision needs integrations:configure in that space; an organization decision needs org-integrations:configure. On the Tools tab, holders of the organization right see, next to the space actions, Approve for the organization (on a review card), Pin for the organization, Block for the organization, Withdraw the organization’s approval and Unblock for the organization (on a tool's row).
  • A block for the organization wins: a space cannot lift it. The space's Unblock acts on the space's own blocks only, and is refused on a tool only the organization blocks (409 tool_governed_by_organization); the tool is shown Blocked by the organization (block_level: organization) until someone lifts the organization block.
  • The organization's decision on a tool's definition wins: when the organization holds at least one approval of a tool, only the organization's approvals count for that tool, in every space. A space's approval of it counts for nothing (the space read does not list it), a space cannot approve it (409 tool_governed_by_organization), pin it or withdraw it, and when its definition moves only the organization can approve the new one. Withdrawing the organization's approvals gives the tool back to each space: the approvals a space gave it count again. A tool the organization never approved is decided by each space, as above. The catalog entry's approval_level names the level whose approvals count.
  • Limits: at most 32 approved definitions per tool at each level, and a tool's counting approvals come from one level only. The 500-block limit counts the organization's blocks plus each space's own, so an organization block is refused when it would take any space past 500.
  • Routes: GET /api/org-integrations/{scope}/{name}/tool-policy reads the organization's rows and the tools every snapshot of the organization lists; POST/DELETE on …/tool-policy/approvals and …/tool-policy/blocks write them. The space read (GET /api/integrations/{packageId}/tool-policy) returns both levels' rows that hold there, each with its level.

Who can change a policy

Approving, withdrawing, blocking and unblocking are decisions about what agents may do, at either level. They are accepted only from a person signed in to the dashboard. API keys, tokens issued to the CLI, MCP or OIDC clients, the chat and the MCP invoke_operation tool are refused with 403 dashboard_session_required. These routes are not in the MCP catalog. Reading the server again is not a policy decision: anyone who may call the integration with the connection can do it.

In the agent editor

The agent editor greys out tools that are unavailable and says why, but never removes a selection. Selections are judged against the approvals of the agent's home space. A tool that is merely missing or pending stays selected, so the agent works again as soon as the server lists it or someone approves it.

Saving or publishing an agent refuses a selected tool whose approvals the server moved past (it lists the tool only at definitions nobody approved), declared or not, on an open or a closed catalog: 400 validation_failed with the field code tool_definition_changed on integrations_configuration.<id>.tools. Approve the current definition again, or drop the tool from the selection.

When a run cannot have a tool

A run whose selected tools are unavailable does not fail: it continues without them and is marked degraded. This holds for a local integration too: when it loses a selected tool, the sidecar reports it and the run is marked degraded. This includes a blocked api_call or api_upload: it is removed from the run and reported with blocked_in_space, like any selected tool the space blocks. A selection of all tools ("*") resolved at run time against a closed catalog version exposes only the declared and approved tools. The run page shows Tools unavailable during this run, listing each tool with its reason, and the model is told in its system prompt which tools it does not have.

Reason shownMeaning
Not listed by the server at launchnot_listed: the server did not list the tool.
Hidden by the integrationhidden_tools: the integration withholds it.
Definition not approved in this spacedefinition_not_approved: undeclared on a closed catalog, or changed since approval.
Name already taken by another toolname_collision: two tools would reach the agent under one name.
Blocked in this spaceblocked_in_space: the space or the organization blocks it.

An integration fails at boot only when it registers no callable tool and lost none to policy or listing, as described in How integrations work. One whose selected tools are all unavailable is started with no tools and the run is degraded.

Limits

  • The fingerprint covers a tool's name, title, description, inputSchema, outputSchema, annotations and execution, and its _meta apart from the keys the platform reserves for itself. It does not cover icons or any member this list does not name, and it cannot see the code behind a definition: a server can change what a tool does while its definition stays the same, and an approval stays valid.
  • A run launched from the CLI on the caller's machine (runOrigin: "remote", for example appstrate run --local) does not receive the space's blocks and approvals: the CLI connects itself to the unauthenticated remote MCP integrations and applies only the agent's selection and hidden_tools, skips authenticated remote integrations, and the platform records such a run's tool listing as no snapshot. Blocks and approvals are not a security boundary for a run executed on the caller's own machine.
  • A tool's definition is checked once, when the run starts: the listing taken at boot is the definition for the run, and a server that changes it during a run is seen at the next run.

Reaching the server directly is refused

An integration's own MCP endpoint cannot be called as plain HTTP through the credential proxy or an in-run api_call: the proxy refuses it with 403 remote_mcp_endpoint_not_proxied, an in-run api_call as not_authorized. Tools are the way in, because they are where the policy applies.

A server's 401 or 403 insufficient_scope challenge is surfaced with the scopes it asks for: see When a server asks for more scopes.

Exporting an agent

GET /api/agents/{scope}/{name}/bundle adds an Appstrate-Space-Approved-Tools response header when the agent uses tools only because this space approved them; a tool the organization approved is not named, since it stays approved in every space of the organization. Each element is encodeURIComponent("<integrationId>:<tool>"), percent-encoded because a tool name may contain a comma, and the elements are joined by commas. The archive does not carry the approvals: the importing space must approve those tools again.

Error codes

Every code of this mechanism is in the error catalog.

On this page