Skip to content

Update a connection’s instructions

PATCH
/api/mcp-connections/{connectionId}/instructions

Sets the guidance the assistant reads before using this connection. Send null to clear it. Requires the mcp:write scope.

connectionId
required
string format: uuid

The unique identifier of the MCP connection.

object
instructions
required

Guidance the assistant reads before it uses this connection’s tools. It also reads the connection’s records through it when it decides, writes and checks a reply. At most 8,192 bytes of UTF-8; a longer text is refused with 422 instructions_too_long. null clears it.

string | null
<= 8192 characters
Example
Use this connection for order lookups. Ask the customer for the order number first.

The connection, as it now stands.

One connection with its endpoint, its discovered tools, and the governance set on each tool.

object
connectionId
required
string format: uuid
name
required
string
connectionType
required
string
Allowed values: system marketplace custom paid
endpointUrl
required

The MCP endpoint oHallo calls.

string format: uri
Example
https://mcp.example.com/mcp
authType
required

How oHallo authenticates to the server. The credential itself is held in the secret store and is returned by no endpoint.

string
Allowed values: none api_key oauth2_client oauth2_pkce mtls
capabilities
required
Array<string>
instructions

Guidance the assistant reads before it uses this connection’s tools. It also reads the connection’s records through it when it decides, writes and checks a reply.

string | null
scope
required
string
Allowed values: tenant brand workspace
brandId
string | null format: uuid
workspaceId
string | null format: uuid
status
required
string
Allowed values: active degraded error unreachable
lastHealthCheckAt
string | null format: date-time
templateId
string | null
tools

The tools discovered on the server.

Array<object>
object
name
required
string
Example
get_order
description
required
string
inputSchema

The tool’s JSON Schema for arguments.

object
outputSchema

The tool’s declared output schema, when it declares one.

object
toolRiskClassifications

Tool name to risk classification.

object
key
additional properties
string
Allowed values: read read_pii write write_pii destructive
toolAssurance

Tool name to the assurance a caller must reach, where one has been set. An absent entry takes the default for the tool’s risk classification.

object
key
additional properties
string
Allowed values: anonymous identified high-assurance
toolGovernance

Tool name to the governance in force on it: the risk classification, the assurance a caller must reach, the scope declaration and the last scope outcome. Resolved server-side, so what the API returns is what oHallo enforces.

object
key
additional properties

The governance in force on one tool.

object
risk
required

The tool’s risk classification; null when it has not been classified.

string | null
Allowed values: read read_pii write write_pii destructive
enforcedAssurance
required

The assurance a caller must reach before the tool runs; null when the tool is unclassified.

string | null
Allowed values: anonymous identified high-assurance
default
required

The default assurance for the tool’s risk classification: read is anonymous; read_pii, write and write_pii are identified; destructive is high-assurance. Null when unclassified.

string | null
Allowed values: anonymous identified high-assurance
source
required

Where enforcedAssurance sits relative to default: the default itself, a setting raised above it, or a setting lowered below it. A lowered row is shown as Below default on the dashboard.

string | null
Allowed values: default raised lowered
callable
required

False when an agent does not call the tool: it has no risk classification, or no scope declaration. A tool with no declaration still reports the assurance it takes once declared.

boolean
scope
required
One of:
One of:
string
Allowed values: unscoped
setting
required

The assurance setting persisted for the tool, or null when none is set. enforcedAssurance is what oHallo applies: a setting equal to the default reports source: default, and a setting that breaks one of the two rules is not applied and the default is enforced in its place. On a tool declared at customer level a setting or default below identified is enforced at identified, and source is read against the default: raised on a read tool, whose default is anonymous, and default on every other class.

string | null
Allowed values: anonymous identified high-assurance
scopeOutcome
required
One of:

The last thing the scope check recorded on a tool, and when.

object
outcome
required

captured: a successful call returns the created record’s id at the originates path, and oHallo holds it for the conversation. originates_missing: a successful call returns no id at the originates path. originates_refused: oHallo does not hold the id at the originates path of a successful call: the tool is classified read or read_pii, or the path runs through the field designated on the connection as the eID reference or the national identity number, whether or not an id is returned; or the result carries more than one id there, the id repeats one of the call’s arguments, another conversation on the connection already holds it, the sender is not proven, the call has no conversation or caller to hold it for, or the conversation’s held records expire as it is written. set_write_failed: a successful call returns an id at the originates path, and the write that holds it for the conversation fails. owner_absent: at record level, on a tool declared with an ownerField, no part of a result names an owner there and no created-record outcome applies, and the result is returned. At customer and account level, a result, or any part of it, names no owner at ownerField that can be checked, and no record in its text content or structured content names another party: a record or list element without one, a list element that is not a record, a JSON scalar, text that is not JSON, an item that is not text, a field beside the content, a missing list, a result with no content, or a declaration with no ownerField; the result is withheld. An empty list passes at those levels and records nothing. mismatch: a record in the result’s text content or structured content names a record or party the caller does not hold, and the result is withheld: at record level a value under the ownerField name or a refArgs name that is not a record the conversation created; at customer level anyone but the verified customer at ownerField, or anyone but that customer or their company under the ownerField name or a default owner name; at account level anyone but their company at ownerField or under either name; otherPartyFields excepted. A JSON number that is not a whole number from 0 to 9007199254740991 under any of these names counts as another party. A result with a record in its text content or structured content that names another party, and also a part with no owner, records mismatch. A withheld result records owner_absent or mismatch in place of any created-record outcome.

string
Allowed values: captured originates_missing originates_refused owner_absent set_write_failed mismatch
at
required
string format: date-time
factorRequirementUnreachable

True when the tool’s stored factor requirement asks for a factor category or type, or a number of factors, that no verification method gives. No caller reaches such a tool at any level, and the dashboard shows it as needing a method.

boolean

The caller may not change this connection. People need the owner or admin role. An API key needs the mcp:write scope; a key restricted to a brand or workspace receives code: "key_lock" for an action its restriction does not cover, and for a change to what oHallo configures on a system connection (its instructions, its tools’ risk classifications, or a version restore). Guardrails, per-tool assurance and agent assignments on a system connection are the account’s and stay open.

Standard error response returned by all endpoints on failure.

object
error
required

A human-readable error message describing what went wrong.

string
Example
Conversation not found
code

A machine-readable reason on some refusals, for example ‘key_lock’ when an API key’s brand or workspace restriction does not cover the action.

string
Example
key_lock
missing_scopes

On a 403 for an API key without a scope the endpoint requires: the scopes the key lacks.

Array<string>
Example
[
"mcp:write"
]
entryId

On a 409 with code duplicate_question or duplicate_rule_text: the knowledge base entry or policy that already holds the question or rule text.

string format: uuid
Example
11223344-5566-4788-99aa-bbccddeeff00
connectionId

On a 422 about one MCP connection a request names, from an assignment or an agent create or update (a connection that does not exist, one listed twice, or one that does not declare a tool named): the connection, as the request named it.

string
undeclaredTools

On the same 422: the tool names the connection does not declare.

Array<string>
Example
[
"get_orders"
]
declaredTools

On the same 422: the tools the connection declares.

Array<string>
Example
[
"get_order",
"search_orders"
]

No such connection, or it is outside the API key’s brand or workspace restriction. A connection the key cannot reach is not disclosed.

Standard error response returned by all endpoints on failure.

object
error
required

A human-readable error message describing what went wrong.

string
Example
Conversation not found
code

A machine-readable reason on some refusals, for example ‘key_lock’ when an API key’s brand or workspace restriction does not cover the action.

string
Example
key_lock
missing_scopes

On a 403 for an API key without a scope the endpoint requires: the scopes the key lacks.

Array<string>
Example
[
"mcp:write"
]
entryId

On a 409 with code duplicate_question or duplicate_rule_text: the knowledge base entry or policy that already holds the question or rule text.

string format: uuid
Example
11223344-5566-4788-99aa-bbccddeeff00
connectionId

On a 422 about one MCP connection a request names, from an assignment or an agent create or update (a connection that does not exist, one listed twice, or one that does not declare a tool named): the connection, as the request named it.

string
undeclaredTools

On the same 422: the tool names the connection does not declare.

Array<string>
Example
[
"get_orders"
]
declaredTools

On the same 422: the tools the connection declares.

Array<string>
Example
[
"get_order",
"search_orders"
]

Validation error, or instructions is over 8,192 bytes of UTF-8 (error: "instructions_too_long").

Standard error response returned by all endpoints on failure.

object
error
required

A human-readable error message describing what went wrong.

string
Example
Conversation not found
code

A machine-readable reason on some refusals, for example ‘key_lock’ when an API key’s brand or workspace restriction does not cover the action.

string
Example
key_lock
missing_scopes

On a 403 for an API key without a scope the endpoint requires: the scopes the key lacks.

Array<string>
Example
[
"mcp:write"
]
entryId

On a 409 with code duplicate_question or duplicate_rule_text: the knowledge base entry or policy that already holds the question or rule text.

string format: uuid
Example
11223344-5566-4788-99aa-bbccddeeff00
connectionId

On a 422 about one MCP connection a request names, from an assignment or an agent create or update (a connection that does not exist, one listed twice, or one that does not declare a tool named): the connection, as the request named it.

string
undeclaredTools

On the same 422: the tool names the connection does not declare.

Array<string>
Example
[
"get_orders"
]
declaredTools

On the same 422: the tools the connection declares.

Array<string>
Example
[
"get_order",
"search_orders"
]