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

# Add tool approval

> Adds a tool approval to an MCP server (current behavior).

## Notes

* Adds tool approval configuration for a server


## OpenAPI

````yaml post /api/mcp-servers/{mcpServerId}/tool-approvals
openapi: 3.0.3
info:
  title: Zudu API
  description: >-
    Comprehensive REST API for LiveKit Backend - Call Management, Agent
    Configuration, and Real-time Communication Services
  version: 1.0.0
  contact:
    name: Zudu AI Team
    url: https://zudu.ai
    email: support@zudu.ai
  license:
    name: Proprietary
    url: https://zudu.ai/license
servers:
  - url: https://api.zudu.ai
    description: Production (Customer-facing)
security:
  - apiKey: []
    apiSecret: []
tags:
  - name: Agent Management
    description: Create and manage AI agents
  - name: Call Data Management
    description: Call records and history
  - name: Customer API Keys
    description: Manage API keys
  - name: Post-Call Webhooks
    description: Webhook configuration
  - name: phone-number-controller
    description: Phone numbers
  - name: batch-call-controller
    description: Batch calls
  - name: MCP Server Management
    description: MCP servers
  - name: Knowledge Base Management
    description: Knowledge bases
  - name: Call Analysis
    description: Call analysis
paths:
  /api/mcp-servers/{mcpServerId}/tool-approvals:
    post:
      tags:
        - MCP Server Management
      summary: Add tool approval
      description: >-
        Adds tool approval configuration for an MCP server. Requires
        X-Service-Key, orgId, and Content-Type: application/json.
      operationId: addToolApproval
      parameters:
        - name: mcpServerId
          in: path
          required: true
          description: MCP server ID
          schema:
            type: string
            example: mcp_8c180796-e6d7-4343-88b5-5df0846fef69
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - tool_name
                - approval_hash
                - auto_approve
              properties:
                tool_name:
                  type: string
                  description: Tool name
                approval_hash:
                  type: string
                  description: Approval hash
                auto_approve:
                  type: boolean
                  description: Whether to auto-approve
                approval_conditions:
                  type: object
                  properties:
                    file_extensions:
                      type: array
                      items:
                        type: string
                    max_file_size:
                      type: integer
            example:
              tool_name: file_read
              approval_hash: abc123def456
              auto_approve: true
              approval_conditions:
                file_extensions:
                  - .txt
                  - .md
                  - .json
                max_file_size: 1048576
        required: true
      responses:
        '200':
          description: Tool approval added successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  status:
                    type: string
                  error:
                    type: string
                    nullable: true
                  data:
                    type: object
              example:
                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
        '400':
          description: Validation failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  status:
                    type: string
                  error:
                    type: string
                    nullable: true
                  data:
                    type: string
                    nullable: true
              example:
                message: Validation failed
                status: error
                error: MCP server name is required
                data: null
        '404':
          description: MCP server not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  status:
                    type: string
                  error:
                    type: string
                    nullable: true
                  data:
                    type: string
                    nullable: true
              example:
                message: MCP server not found
                status: error
                error: >-
                  MCP server with ID 'mcp_invalid_id' does not exist in
                  organization
                data: null
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  status:
                    type: string
                  error:
                    type: string
                    nullable: true
                  data:
                    type: string
                    nullable: true
              example:
                message: Internal server error
                status: error
                error: Server error
                data: null
components:
  securitySchemes:
    apiKey:
      type: apiKey
      description: API Key for MCP server and external service authentication
      name: X-API-KEY
      in: header
    apiSecret:
      type: apiKey
      description: API Secret for MCP server and external service authentication
      name: X-API-SECRET
      in: header

````