Update Tool Approval

Update Tool Approval
Approve or unapprove a tool.

This method allows you to approve or unapprove a tool from an MCP server.

Request
URI
POST
https://{api_host}/api/v1/control/mcp-servers/{mcp_server_id}/tools/{tool_id}/approval
COPY
Path Parameters
string
mcp_server_id
Required  

mcp_server_id

string
tool_id
Required  

tool_id


Request Body
McpToolApprovalRequest of type(s) application/json
Required  
{
    "is_approved": false
}
boolean
is_approved
Required  

Whether to approve or unapprove the tool.

Authentication
This operation uses the following authentication methods.
Responses
200

Successful Response

Returns McpTool of type(s) application/json
{
    "id": "string",
    "server": {
        "id": "string",
        "name": "string"
    },
    "tool_type": "string",
    "tool_configuration_type": "string",
    "origin_name": "string",
    "description": "string",
    "annotations": "string",
    "input_schema": "string",
    "output_schema": "string",
    "is_approved": false,
    "availability": "string",
    "last_available_at": 0,
    "last_updated_at": 0
}
string As uuid As uuid
id
Required  

id

server
Optional

The server which serves the tool. If not set, the tool is provided by a built-in PAIS service.

string
tool_type
Optional
Constraints: default: MCP

Tool type, which is always MCP.

string
tool_configuration_type
Required  

Configuration type of the Tool for determining its usage.

Enumeration: GENERIC_MCP_TOOL_LINK, PAIS_KNOWLEDGE_BASE_INDEX_SEARCH_TOOL_LINK
string
origin_name
Required  

A name of the MCP tool according to the MCP server.

string
description
Optional

A text description of the MCP tool and its function.

string
annotations
Optional

Optional annotation as JSON dictionary containing MCP tool details, such as tool "title". For a full set of available annotations, refer to the MCP documentation

string
input_schema
Required  

JSON schema describing the input parameters of the tool.

string
output_schema
Optional

Optional JSON schema describing the output format of the tool.

boolean
is_approved
Required  

Whether the MCP tool is approved.

string
availability
Required  

Availability status of a tool.

Enumeration: AVAILABLE, UNAVAILABLE
integer
last_available_at
Required  

Unix timestamp (in seconds) when the MCP tool was available.

integer
last_updated_at
Required  

Unix timestamp (in seconds) when the MCP tool entry was last updated.


404

Invalid MCP server or tool ID.

Operation doesn't return any data structure

422

The tool cannot be unapproved because it is in use.

Operation doesn't return any data structure

Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{"is_approved":"boolean"}' https://{api_host}/api/v1/control/mcp-servers/{mcp_server_id}/tools/{tool_id}/approval