> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xenovia.io/llms.txt
> Use this file to discover all available pages before exploring further.

# 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.



## OpenAPI

````yaml https://cp.xenovia.io/openapi.json put /api/v1/agents/{agent_id}/hosted-tools
openapi: 3.1.0
info:
  title: Xenovia Control Plane API
  version: 1.0.0
  description: >-
    Management API for agents, providers, policies, telemetry, alerts and
    organization settings.
servers:
  - url: https://cp.xenovia.io
    description: Production
security:
  - BearerAuth: []
paths:
  /api/v1/agents/{agent_id}/hosted-tools:
    put:
      tags:
        - agents
      summary: Replace hosted tool allow-list
      description: >-
        **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.
      operationId: put_hosted_tools_route_api_v1_agents__agent_id__hosted_tools_put
      parameters:
        - name: agent_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Agent Id
        - name: X-Request-ID
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Request-Id
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
                - $ref: '#/components/schemas/HostedTools'
                - type: 'null'
              description: The whole allow-list, or JSON `null` to remove it.
              title: Payload
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/HostedTools'
                  - type: 'null'
                title: >-
                  Response Put Hosted Tools Route Api V1 Agents  Agent Id 
                  Hosted Tools Put
        '422':
          description: >-
            The list is invalid, or the body is empty: send the list, or JSON
            `null` to remove it
components:
  schemas:
    HostedTools:
      properties:
        mode:
          type: string
          enum:
            - monitor
            - enforce
          title: Mode
        families:
          items:
            type: string
            enum:
              - web_search
              - web_fetch
              - code_execution
              - computer
              - shell
              - file_search
              - image_generation
              - mcp
              - advisor
              - other
          type: array
          title: Families
        mcp_servers:
          items:
            $ref: '#/components/schemas/HostedMcpServer'
          type: array
          maxItems: 50
          title: Mcp Servers
      additionalProperties: false
      type: object
      required:
        - mode
      title: HostedTools
      description: >-
        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).
    HostedMcpServer:
      properties:
        label:
          type: string
          maxLength: 64
          minLength: 1
          title: Label
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
        connector_id:
          anyOf:
            - type: string
              maxLength: 256
              minLength: 1
            - type: 'null'
          title: Connector Id
        tunnel_id:
          anyOf:
            - type: string
              maxLength: 256
              minLength: 1
            - type: 'null'
          title: Tunnel Id
        tools:
          items:
            type: string
            maxLength: 128
            minLength: 1
          type: array
          maxItems: 100
          title: Tools
      additionalProperties: false
      type: object
      required:
        - label
      title: HostedMcpServer
      description: |-
        One remote MCP server the agent's model requests may use, named by
        exactly one of: its URL, a provider connector id, or a tunnel id. A
        coding tool's agent names its servers by label alone (the server's name
        in the tool's MCP configuration), so the target is checked per agent
        (hosted_tools_service.check_hosted_tools).
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer token: an organization API key (`ak_…`) created under Settings →
        API Keys, or a dashboard user session token. Agent keys (`xe_…`) are not
        accepted here. Endpoints marked as user-only in their description reject
        organization keys with `403`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.