Adopt tools as governed actions
Answers 404 where the mcp-upstreams feature is off. Adopts tools from the last listing. Each becomes a governed action named <upstream>-<tool> whose version pins the tool’s definition hash; a tool adopted before whose definition changed is re-adopted as a new version. The suggested class is never applied by itself: approval and impact are what the request chooses (ADR 0020). A tool that cannot be adopted is reported in skipped without stopping the others. From an API key, a CLI login or an MCP session this answers 202 with a sign-off link, for a first adoption and a re-adoption alike: only a workspace admin, as a person, can approve it. If the named tools’ definitions change before they decide, the request fails as SIGN_OFF_STALE and nothing is adopted.
/api/v2/mcp-upstreams/{id}/adoptAuthorizationBearer token (Anlyon API key) · headerrequiredWorkspace API key sent as Authorization: Bearer <key>.
better-auth.session_tokenAPI key · cookierequiredBrowser session used by dashboard-only operations.
idstringrequiredThe upstream's id (mcpu_...).
X-Request-IdstringOptional caller correlation ID. Unsafe or oversized values are replaced.
application/jsontoolsobjectrequiredTool name to the operator's choices. 1 to 100 tools.
Only re-adoptions, or nothing adopted.
successbooleanrequireddataMcpAdoptResultrequiredShow propertiesHide properties
adoptedobject[]requiredShow propertiesHide properties
objecttoolstringrequiredactionActionrequiredShow propertiesHide properties
idstringrequiredenvironmentIdstring<uuid>requiredThe environment this action lives in. An action belongs to exactly one.
namestringrequireddescriptionstring | nullrequiredmethodstringrequiredGETPOSTPUTPATCHDELETEurlTemplatestringrequiredheadersobjectrequiredbodyTemplateobject | nullrequiredinputSchemaobjectrequiredrequiresApprovalbooleanrequiredenabledbooleanrequiredsecretsstring[]requiredReferenced secret names only; values are never returned.
currentVersionIdstring | nullrequiredThe immutable version this definition currently is. An agent version pins a version id, so this is what to pin to hold an action at its present definition. Null only for actions that predate versioning and have not been edited since.
adapterActionAdapter | nullrequiredThe governed-effect adapter, or null for a template action.
Show propertiesHide properties
typestringrequiredstripe.refundgithub.file_updateresend.email_sendconfigobjectrequiredcredentialSecretstringrequirednullgovernedbooleanrequiredTrue when every invocation creates a governed effect. The action has an adapter, or it carries a declaration.
impactActionImpact | nullrequiredThe declared impact, or null when the action declares none.
Show propertiesHide properties
dimensionstringrequiredmoney, resource_mutations, or a workspace-declared unit such as emails, messages or rows.
unitstringThe currency for money (lowercase ISO 4217, required). For every other dimension the unit is the dimension name and may be left out.
amountstringrequiredboundstringrequiredexactupper_boundnullverifyActionVerify | nullrequiredThe declared read-back, or null when the action declares none.
Show propertiesHide properties
urlstringrequiredstatusintegerrequiredThe status the read-back must answer with.
matchobject[]JSON path equality checks on the read-back body. Every one must hold.
Show propertiesHide properties
objectpathstringrequiredA dotted path into the read-back body. A numeric segment indexes an array; a * segment stands for any item of one (labels.*.name).
equalsany | nullrequiredA string, number, boolean or null. A string may be exactly one {{input.field}} or {{response.field}}.
absentbooleanTrue when the check holds only if no value at the path equals equals: how a removal is read back. Left out, the check holds when one does.
graphqlobjectA GraphQL read-back: Anlyon POSTs { query, variables } to url instead of a GET. The query is fixed text: no placeholder, and no mutation or subscription anywhere in it, so a read-back cannot write. Only the variables come from the call.
Show propertiesHide properties
querystringrequiredvariablesobjectEach a string, number, boolean or null; a string may be exactly one {{input.field}} or {{response.field}}.
nullcreatedAtstring<date-time>requiredupdatedAtstring<date-time>requiredreadoptedbooleanrequiredskippedobject[]requiredShow propertiesHide properties
objecttoolstringrequiredreasonstringrequiredAt least one tool was adopted as a new action.
successbooleanrequireddataMcpAdoptResultrequiredShow propertiesHide properties
adoptedobject[]requiredShow propertiesHide properties
objecttoolstringrequiredactionActionrequiredShow propertiesHide properties
idstringrequiredenvironmentIdstring<uuid>requiredThe environment this action lives in. An action belongs to exactly one.
namestringrequireddescriptionstring | nullrequiredmethodstringrequiredGETPOSTPUTPATCHDELETEurlTemplatestringrequiredheadersobjectrequiredbodyTemplateobject | nullrequiredinputSchemaobjectrequiredrequiresApprovalbooleanrequiredenabledbooleanrequiredsecretsstring[]requiredReferenced secret names only; values are never returned.
currentVersionIdstring | nullrequiredThe immutable version this definition currently is. An agent version pins a version id, so this is what to pin to hold an action at its present definition. Null only for actions that predate versioning and have not been edited since.
adapterActionAdapter | nullrequiredThe governed-effect adapter, or null for a template action.
Show propertiesHide properties
typestringrequiredstripe.refundgithub.file_updateresend.email_sendconfigobjectrequiredcredentialSecretstringrequirednullgovernedbooleanrequiredTrue when every invocation creates a governed effect. The action has an adapter, or it carries a declaration.
impactActionImpact | nullrequiredThe declared impact, or null when the action declares none.
Show propertiesHide properties
dimensionstringrequiredmoney, resource_mutations, or a workspace-declared unit such as emails, messages or rows.
unitstringThe currency for money (lowercase ISO 4217, required). For every other dimension the unit is the dimension name and may be left out.
amountstringrequiredboundstringrequiredexactupper_boundnullverifyActionVerify | nullrequiredThe declared read-back, or null when the action declares none.
Show propertiesHide properties
urlstringrequiredstatusintegerrequiredThe status the read-back must answer with.
matchobject[]JSON path equality checks on the read-back body. Every one must hold.
Show propertiesHide properties
objectpathstringrequiredA dotted path into the read-back body. A numeric segment indexes an array; a * segment stands for any item of one (labels.*.name).
equalsany | nullrequiredA string, number, boolean or null. A string may be exactly one {{input.field}} or {{response.field}}.
absentbooleanTrue when the check holds only if no value at the path equals equals: how a removal is read back. Left out, the check holds when one does.
graphqlobjectA GraphQL read-back: Anlyon POSTs { query, variables } to url instead of a GET. The query is fixed text: no placeholder, and no mutation or subscription anywhere in it, so a read-back cannot write. Only the variables come from the call.
Show propertiesHide properties
querystringrequiredvariablesobjectEach a string, number, boolean or null; a string may be exactly one {{input.field}} or {{response.field}}.
nullcreatedAtstring<date-time>requiredupdatedAtstring<date-time>requiredreadoptedbooleanrequiredskippedobject[]requiredShow propertiesHide properties
objecttoolstringrequiredreasonstringrequiredAccepted, not applied: the change loosens a guardrail, so a workspace admin has to approve it. Location is the request to poll.
successbooleanrequiredtruesignOffRequiredbooleanrequiredtruedataSignOffRequestrequiredA governance change that loosens a guardrail, asked for by an API key, a CLI login or an MCP session, waiting for a workspace admin. Give signOffUrl to a person; poll pollUrl.
Show propertiesHide properties
objectstringrequiredsign_off_requestidstringrequiredstatusstringrequiredpending until a workspace admin decides. applied: approved and in effect. rejected, expired (after 24 hours), cancelled (withdrawn by the credential) and failed (approved but could not be applied, see error): nothing changed.
pendingappliedrejectedexpiredcancelledfailedoperationstringrequiredpolicy.createpolicy.updatepolicy.deletepolicy_file.applyimpact_limit.updateimpact_limit.archivebudget.putbudget.deleteenvironment.resumeaction.createaction.updateaction.importsecret.putsecret_store.createsecret_store.updatesecret_store_settings.updateoauth_app.putenvironmentIdstring<uuid>requiredresourceobject | nullrequiredShow propertiesHide properties
typestringrequiredidstringrequirednamestringsummarystringrequiredchangesSignOffChange[]requiredShow propertiesHide properties
SignOffChangefieldstringrequiredfromany | nullrequiredThe value before. Never a secret value.
toany | nullrequiredThe value after. Never a secret value.
directionstringrequiredtighteninglooseningneutralreasonstringrequireddiffstringrequiredThe changes as plain text
signOffUrlstring<uri>requiredThe console page where a workspace admin approves or rejects it. Give this to a person.
pollUrlstringrequiredpollAfterSecondsintegerrequiredrequestedByobjectrequiredShow propertiesHide properties
typestringrequiredapi_keyoauth_clientsystemidstring | nullrequiredonBehalfOfstring | nullFor a CLI login or an MCP session
createdAtstring<date-time>requiredexpiresAtstring<date-time>requireddecidedAtstring<date-time> | nullrequireddecidedByobject | nullrequiredShow propertiesHide properties
typestringrequireduseridstringrequiredviastringrequiredconsoleemail_linkdecisionNotestring | nullrequiredresultany | nullrequiredWhen applied, what the original request would have returned: the limit, budget, policy or action as it now is.
errorobject | nullrequiredShow propertiesHide properties
codestringrequiredmessagestringrequiredBad Request - Invalid input data
successbooleanrequiredrequestIdstringrequiredCorrelation ID matching the X-Request-Id response header.
errorobjectrequiredShow propertiesHide properties
codestringmessagestringdetailsobjectfixErrorFixHow to get past this error, for a person or an agent. Present on refusals with a known next step, such as a missing scope or role, a plan or billing limit, a halted environment, or a missing secret, connected account, OAuth app or end-user header. Absent when there is no fix to give. Kept in production responses, unlike details.
Show propertiesHide properties
summarystringrequiredOne sentence that says what to do.
commandstringAn exact anlyon CLI command that fixes it. Absent when no command does.
urlstring<uri>An absolute console link where a person fixes it.
docsstring<uri>A docs page that explains it.
Unauthorized - Invalid or missing API key
successbooleanrequiredrequestIdstringrequiredCorrelation ID matching the X-Request-Id response header.
errorobjectrequiredShow propertiesHide properties
codestringmessagestringdetailsobjectfixErrorFixHow to get past this error, for a person or an agent. Present on refusals with a known next step, such as a missing scope or role, a plan or billing limit, a halted environment, or a missing secret, connected account, OAuth app or end-user header. Absent when there is no fix to give. Kept in production responses, unlike details.
Show propertiesHide properties
summarystringrequiredOne sentence that says what to do.
commandstringAn exact anlyon CLI command that fixes it. Absent when no command does.
urlstring<uri>An absolute console link where a person fixes it.
docsstring<uri>A docs page that explains it.
Authenticated credential lacks the required scope or workspace access.
successbooleanrequiredrequestIdstringrequiredCorrelation ID matching the X-Request-Id response header.
errorobjectrequiredShow propertiesHide properties
codestringmessagestringdetailsobjectfixErrorFixHow to get past this error, for a person or an agent. Present on refusals with a known next step, such as a missing scope or role, a plan or billing limit, a halted environment, or a missing secret, connected account, OAuth app or end-user header. Absent when there is no fix to give. Kept in production responses, unlike details.
Show propertiesHide properties
summarystringrequiredOne sentence that says what to do.
commandstringAn exact anlyon CLI command that fixes it. Absent when no command does.
urlstring<uri>An absolute console link where a person fixes it.
docsstring<uri>A docs page that explains it.
Not Found - Resource does not exist
successbooleanrequiredrequestIdstringrequiredCorrelation ID matching the X-Request-Id response header.
errorobjectrequiredShow propertiesHide properties
codestringmessagestringdetailsobjectfixErrorFixHow to get past this error, for a person or an agent. Present on refusals with a known next step, such as a missing scope or role, a plan or billing limit, a halted environment, or a missing secret, connected account, OAuth app or end-user header. Absent when there is no fix to give. Kept in production responses, unlike details.
Show propertiesHide properties
summarystringrequiredOne sentence that says what to do.
commandstringAn exact anlyon CLI command that fixes it. Absent when no command does.
urlstring<uri>An absolute console link where a person fixes it.
docsstring<uri>A docs page that explains it.
Too Many Requests - Rate limit exceeded. A workspace's API requests are limited per minute and per UTC clock hour by plan; Retry-After says when to try again, and an hourly refusal names the limit and when the count resets. Successful responses carry the same limits in X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset (the minute) and X-RateLimit-Limit-Hour, X-RateLimit-Remaining-Hour, X-RateLimit-Reset-Hour (the hour).
successbooleanrequiredrequestIdstringrequiredCorrelation ID matching the X-Request-Id response header.
errorobjectrequiredShow propertiesHide properties
codestringmessagestringdetailsobjectfixErrorFixHow to get past this error, for a person or an agent. Present on refusals with a known next step, such as a missing scope or role, a plan or billing limit, a halted environment, or a missing secret, connected account, OAuth app or end-user header. Absent when there is no fix to give. Kept in production responses, unlike details.
Show propertiesHide properties
summarystringrequiredOne sentence that says what to do.
commandstringAn exact anlyon CLI command that fixes it. Absent when no command does.
urlstring<uri>An absolute console link where a person fixes it.
docsstring<uri>A docs page that explains it.

