---
title: "Tool calls"
url: "https://kongair.terwilligar.com/apis/openai-api-2-3-0/versions/ea92d048-c746-4ead-a6a8-da28d93137d1/schemas/RunStepDetailsToolCallsObject"
---

> Full API specification: https://kongair.terwilligar.com/apis/openai-api-2-3-0/versions/ea92d048-c746-4ead-a6a8-da28d93137d1.md

# Tool calls

Details of the tool call.

## OpenAPI definition

```yaml
openapi: 3.0.0
info:
  title: OpenAI API
  version: 2.3.0
servers:
  - url: https://api.openai.com/v1
components:
  schemas:
    RunStepDetailsToolCallsCodeObject:
      title: Code Interpreter tool call
      type: object
      description: Details of the Code Interpreter tool call the run step was involved in.
      properties:
        id:
          type: string
          description: The ID of the tool call.
        type:
          type: string
          description: The type of tool call. This is always going to be
            `code_interpreter` for this type of tool call.
          enum:
            - code_interpreter
          x-stainless-const: true
        code_interpreter:
          type: object
          description: The Code Interpreter tool call definition.
          required:
            - input
            - outputs
          properties:
            input:
              type: string
              description: The input to the Code Interpreter tool call.
            outputs:
              type: array
              description: The outputs from the Code Interpreter tool call. Code Interpreter
                can output one or more items, including text (`logs`) or images
                (`image`). Each of these are represented by a different object
                type.
              items:
                type: object
                oneOf:
                  - $ref: "#/components/schemas/RunStepDetailsToolCallsCodeOutputLogsObject"
                  - $ref: "#/components/schemas/RunStepDetailsToolCallsCodeOutputImageObject"
                x-oaiExpandable: true
      required:
        - id
        - type
        - code_interpreter
    RunStepDetailsToolCallsFileSearchObject:
      title: File search tool call
      type: object
      properties:
        id:
          type: string
          description: The ID of the tool call object.
        type:
          type: string
          description: The type of tool call. This is always going to be `file_search` for
            this type of tool call.
          enum:
            - file_search
          x-stainless-const: true
        file_search:
          type: object
          description: For now, this is always going to be an empty object.
          x-oaiTypeLabel: map
          properties:
            ranking_options:
              $ref: "#/components/schemas/RunStepDetailsToolCallsFileSearchRankingOptionsObje\
                ct"
            results:
              type: array
              description: The results of the file search.
              items:
                $ref: "#/components/schemas/RunStepDetailsToolCallsFileSearchResultObject"
      required:
        - id
        - type
        - file_search
    RunStepDetailsToolCallsFunctionObject:
      type: object
      title: Function tool call
      properties:
        id:
          type: string
          description: The ID of the tool call object.
        type:
          type: string
          description: The type of tool call. This is always going to be `function` for
            this type of tool call.
          enum:
            - function
          x-stainless-const: true
        function:
          type: object
          description: The definition of the function that was called.
          properties:
            name:
              type: string
              description: The name of the function.
            arguments:
              type: string
              description: The arguments passed to the function.
            output:
              type: string
              description: The output of the function. This will be `null` if the outputs have
                not been [submitted](/docs/api-reference/runs/submitToolOutputs)
                yet.
              nullable: true
          required:
            - name
            - arguments
            - output
      required:
        - id
        - type
        - function
    RunStepDetailsToolCallsCodeOutputLogsObject:
      title: Code Interpreter log output
      type: object
      description: Text output from the Code Interpreter tool call as part of a run step.
      properties:
        type:
          description: Always `logs`.
          type: string
          enum:
            - logs
          x-stainless-const: true
        logs:
          type: string
          description: The text output from the Code Interpreter tool call.
      required:
        - type
        - logs
    RunStepDetailsToolCallsCodeOutputImageObject:
      title: Code Interpreter image output
      type: object
      properties:
        type:
          description: Always `image`.
          type: string
          enum:
            - image
          x-stainless-const: true
        image:
          type: object
          properties:
            file_id:
              description: The [file](/docs/api-reference/files) ID of the image.
              type: string
          required:
            - file_id
      required:
        - type
        - image
    RunStepDetailsToolCallsFileSearchRankingOptionsObject:
      title: File search tool call ranking options
      type: object
      description: The ranking options for the file search.
      properties:
        ranker:
          type: string
          description: The ranker used for the file search.
          enum:
            - default_2024_08_21
          x-stainless-const: true
        score_threshold:
          type: number
          description: The score threshold for the file search. All values must be a
            floating point number between 0 and 1.
          minimum: 0
          maximum: 1
      required:
        - ranker
        - score_threshold
    RunStepDetailsToolCallsFileSearchResultObject:
      title: File search tool call result
      type: object
      description: A result instance of the file search.
      x-oaiTypeLabel: map
      properties:
        file_id:
          type: string
          description: The ID of the file that result was found in.
        file_name:
          type: string
          description: The name of the file that result was found in.
        score:
          type: number
          description: The score of the result. All values must be a floating point number
            between 0 and 1.
          minimum: 0
          maximum: 1
        content:
          type: array
          description: The content of the result that was found. The content is only
            included if requested via the include query parameter.
          items:
            type: object
            properties:
              type:
                type: string
                description: The type of the content.
                enum:
                  - text
                x-stainless-const: true
              text:
                type: string
                description: The text content of the file.
      required:
        - file_id
        - file_name
        - score
    RunStepDetailsToolCallsObject:
      title: Tool calls
      type: object
      description: Details of the tool call.
      properties:
        type:
          description: Always `tool_calls`.
          type: string
          enum:
            - tool_calls
          x-stainless-const: true
        tool_calls:
          type: array
          description: >
            An array of tool calls the run step was involved in. These can be
            associated with one of three types of tools: `code_interpreter`,
            `file_search`, or `function`.
          items:
            oneOf:
              - $ref: "#/components/schemas/RunStepDetailsToolCallsCodeObject"
              - $ref: "#/components/schemas/RunStepDetailsToolCallsFileSearchObject"
              - $ref: "#/components/schemas/RunStepDetailsToolCallsFunctionObject"
            x-oaiExpandable: true
      required:
        - type
        - tool_calls
```
