Skip to main content
POST
/
api
/
mcp-servers
/
{mcpServerId}
/
tool-approvals
Add tool approval
curl --request POST \
  --url http://localhost:8080/api/mcp-servers/{mcpServerId}/tool-approvals \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --header 'X-API-SECRET: <api-key>' \
  --data '
{
  "tool_name": "file_read",
  "approval_hash": "abc123def456",
  "auto_approve": true,
  "approval_conditions": {
    "file_extensions": [
      ".txt",
      ".md",
      ".json"
    ],
    "max_file_size": 1048576
  }
}
'
{
  "message": "Tool approval added successfully",
  "status": "success",
  "error": null,
  "data": {
    "server_id": "mcp_8c180796-e6d7-4343-88b5-5df0846fef69",
    "tool_name": "file_read",
    "approval_hash": "abc123def456",
    "auto_approve": true,
    "created_at": 1751401500000
  }
}

Authorizations

X-API-KEY
string
header
required

API Key for MCP server and external service authentication

X-API-SECRET
string
header
required

API Secret for MCP server and external service authentication

Path Parameters

mcpServerId
string
required

MCP server ID

Example:

"mcp_8c180796-e6d7-4343-88b5-5df0846fef69"

Body

application/json
tool_name
string
required

Tool name

approval_hash
string
required

Approval hash

auto_approve
boolean
required

Whether to auto-approve

approval_conditions
object

Response

Tool approval added successfully

message
string
status
string
error
string | null
data
object