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

# Test a tool call

> Executes a tool call with the provided parameters and returns the result. This is useful for testing and debugging tool configurations.



## OpenAPI

````yaml POST /v1/tool-servers/{toolServerId}/tools/{toolName}/test
openapi: 3.0.0
info:
  title: Devic.ai Public API
  description: >-
    Devic.ai is an AI platform that allows you to create, manage, and use AI
    agents for various tasks.
  version: 1.0.0
  contact:
    name: Devic.ai Support
    url: https://devic.ai
  x-logo:
    url: https://devic.ai/logo.png
    altText: Devic.ai Logo
  x-summary: Public API for interacting with Devic.ai platform
servers:
  - url: https://api.devic.ai
    description: Production server
  - url: https://staging-api.devic.ai
    description: Staging server
security:
  - bearerAuth: []
tags:
  - name: Projects
    description: Group agents, assistants, documents and costs into projects
  - name: Documents
    description: >-
      Knowledge base documents: create, version, attach and index markdown
      content for RAG
  - name: Document Folders
    description: Organise knowledge base documents into folders and attach them in bulk
  - name: Files
    description: Upload files and obtain shareable download URLs to attach to messages
  - name: Agents
    description: Endpoints related to AI agents and their operations
  - name: Assistants
    description: Endpoints for interacting with assistants and their specializations
  - name: Tool Servers
    description: Endpoints for managing tool servers and their tool definitions
  - name: Health
    description: API health check endpoints
  - name: Documentation
    description: Endpoints for retrieving markdown documentation
paths:
  /v1/tool-servers/{toolServerId}/tools/{toolName}/test:
    post:
      tags:
        - Tool Servers
      summary: Test a tool call
      description: >-
        Executes a tool call with the provided parameters and returns the
        result. This is useful for testing and debugging tool configurations.
      operationId: testToolCall
      parameters:
        - name: toolServerId
          in: path
          required: true
          description: The unique identifier of the tool server
          schema:
            type: string
        - name: toolName
          in: path
          required: true
          description: The function name of the tool to test
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TestToolCallRequest'
      responses:
        '200':
          description: Tool call executed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TestToolCallResponse'
        '400':
          description: Invalid parameters or tool configuration
        '401':
          description: Unauthorized - Invalid or missing token
        '404':
          description: Tool server or tool not found
        '500':
          description: Internal Server Error
      security:
        - bearerAuth: []
components:
  schemas:
    TestToolCallRequest:
      type: object
      required:
        - parameters
      properties:
        parameters:
          type: object
          additionalProperties: true
          description: Parameters object to pass to the tool
    TestToolCallResponse:
      type: object
      properties:
        success:
          type: boolean
          description: Whether the tool call was successful
        data:
          type: object
          additionalProperties: true
          description: Tool call result data
        error:
          type: string
          description: Error message if the call failed
        executionTimeMs:
          type: integer
          description: Execution time in milliseconds
        requestUrl:
          type: string
          description: The URL that was called
        requestMethod:
          type: string
          description: The HTTP method used
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Use JWT token for authentication

````