curl --request PUT \
--url https://cp.xenovia.io/api/v1/agents/{agent_id}/hosted-tools \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"families": [],
"mcp_servers": [
{
"label": "<string>",
"url": "<string>",
"connector_id": "<string>",
"tunnel_id": "<string>",
"tools": [
"<string>"
]
}
]
}
'import requests
url = "https://cp.xenovia.io/api/v1/agents/{agent_id}/hosted-tools"
payload = {
"families": [],
"mcp_servers": [
{
"label": "<string>",
"url": "<string>",
"connector_id": "<string>",
"tunnel_id": "<string>",
"tools": ["<string>"]
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
families: [],
mcp_servers: [
{
label: '<string>',
url: '<string>',
connector_id: '<string>',
tunnel_id: '<string>',
tools: ['<string>']
}
]
})
};
fetch('https://cp.xenovia.io/api/v1/agents/{agent_id}/hosted-tools', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://cp.xenovia.io/api/v1/agents/{agent_id}/hosted-tools",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'families' => [
],
'mcp_servers' => [
[
'label' => '<string>',
'url' => '<string>',
'connector_id' => '<string>',
'tunnel_id' => '<string>',
'tools' => [
'<string>'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://cp.xenovia.io/api/v1/agents/{agent_id}/hosted-tools"
payload := strings.NewReader("{\n \"families\": [],\n \"mcp_servers\": [\n {\n \"label\": \"<string>\",\n \"url\": \"<string>\",\n \"connector_id\": \"<string>\",\n \"tunnel_id\": \"<string>\",\n \"tools\": [\n \"<string>\"\n ]\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://cp.xenovia.io/api/v1/agents/{agent_id}/hosted-tools")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"families\": [],\n \"mcp_servers\": [\n {\n \"label\": \"<string>\",\n \"url\": \"<string>\",\n \"connector_id\": \"<string>\",\n \"tunnel_id\": \"<string>\",\n \"tools\": [\n \"<string>\"\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cp.xenovia.io/api/v1/agents/{agent_id}/hosted-tools")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"families\": [],\n \"mcp_servers\": [\n {\n \"label\": \"<string>\",\n \"url\": \"<string>\",\n \"connector_id\": \"<string>\",\n \"tunnel_id\": \"<string>\",\n \"tools\": [\n \"<string>\"\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"mode": "monitor",
"families": [
"web_search"
],
"mcp_servers": [
{
"label": "<string>",
"url": "<string>",
"connector_id": "<string>",
"tunnel_id": "<string>",
"tools": [
"<string>"
]
}
]
}Replace hosted tool allow-list
Auth: organization API key with write scope, or a signed-in user.
Send the whole list, or JSON null to remove it. An empty body is refused with 422. A coding tool’s agent can list only web_search, web_fetch, shell and mcp, and names its MCP servers by label.
curl --request PUT \
--url https://cp.xenovia.io/api/v1/agents/{agent_id}/hosted-tools \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"families": [],
"mcp_servers": [
{
"label": "<string>",
"url": "<string>",
"connector_id": "<string>",
"tunnel_id": "<string>",
"tools": [
"<string>"
]
}
]
}
'import requests
url = "https://cp.xenovia.io/api/v1/agents/{agent_id}/hosted-tools"
payload = {
"families": [],
"mcp_servers": [
{
"label": "<string>",
"url": "<string>",
"connector_id": "<string>",
"tunnel_id": "<string>",
"tools": ["<string>"]
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
families: [],
mcp_servers: [
{
label: '<string>',
url: '<string>',
connector_id: '<string>',
tunnel_id: '<string>',
tools: ['<string>']
}
]
})
};
fetch('https://cp.xenovia.io/api/v1/agents/{agent_id}/hosted-tools', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://cp.xenovia.io/api/v1/agents/{agent_id}/hosted-tools",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'families' => [
],
'mcp_servers' => [
[
'label' => '<string>',
'url' => '<string>',
'connector_id' => '<string>',
'tunnel_id' => '<string>',
'tools' => [
'<string>'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://cp.xenovia.io/api/v1/agents/{agent_id}/hosted-tools"
payload := strings.NewReader("{\n \"families\": [],\n \"mcp_servers\": [\n {\n \"label\": \"<string>\",\n \"url\": \"<string>\",\n \"connector_id\": \"<string>\",\n \"tunnel_id\": \"<string>\",\n \"tools\": [\n \"<string>\"\n ]\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://cp.xenovia.io/api/v1/agents/{agent_id}/hosted-tools")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"families\": [],\n \"mcp_servers\": [\n {\n \"label\": \"<string>\",\n \"url\": \"<string>\",\n \"connector_id\": \"<string>\",\n \"tunnel_id\": \"<string>\",\n \"tools\": [\n \"<string>\"\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cp.xenovia.io/api/v1/agents/{agent_id}/hosted-tools")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"families\": [],\n \"mcp_servers\": [\n {\n \"label\": \"<string>\",\n \"url\": \"<string>\",\n \"connector_id\": \"<string>\",\n \"tunnel_id\": \"<string>\",\n \"tools\": [\n \"<string>\"\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"mode": "monitor",
"families": [
"web_search"
],
"mcp_servers": [
{
"label": "<string>",
"url": "<string>",
"connector_id": "<string>",
"tunnel_id": "<string>",
"tools": [
"<string>"
]
}
]
}Authorizations
Body
An agent's hosted tool allow-list: GET/PUT /agents/{agent_id}/hosted-tools,
AgentRead.hosted_tools and the config snapshot's hosted_tools.
mode is what the runtime does with a hosted tool outside the list:
enforce refuses the request, monitor records it and lets it
through. mcp_servers may be set without mcp in families: it
is kept and served, and the runtime allows no MCP tool while mcp is
not in the families (so an admin can switch MCP off without losing the
server list).
Response
Successful Response
An agent's hosted tool allow-list: GET/PUT /agents/{agent_id}/hosted-tools,
AgentRead.hosted_tools and the config snapshot's hosted_tools.
mode is what the runtime does with a hosted tool outside the list:
enforce refuses the request, monitor records it and lets it
through. mcp_servers may be set without mcp in families: it
is kept and served, and the runtime allows no MCP tool while mcp is
not in the families (so an admin can switch MCP off without losing the
server list).