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

> 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:
    RunStepDeltaStepDetailsToolCallsCodeObject:
      title: Code interpreter tool call
      type: object
      description: Details of the Code Interpreter tool call the run step was involved in.
      properties:
        index:
          type: integer
          description: The index of the tool call in the tool calls array.
        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.
          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/RunStepDeltaStepDetailsToolCallsCodeOutputLogsObjec\
                      t"
                  - $ref: "#/components/schemas/RunStepDeltaStepDetailsToolCallsCodeOutputImageObje\
                      ct"
                x-oaiExpandable: true
      required:
        - index
        - type
    RunStepDeltaStepDetailsToolCallsFileSearchObject:
      title: File search tool call
      type: object
      properties:
        index:
          type: integer
          description: The index of the tool call in the tool calls array.
        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
      required:
        - index
        - type
        - file_search
    RunStepDeltaStepDetailsToolCallsFunctionObject:
      type: object
      title: Function tool call
      properties:
        index:
          type: integer
          description: The index of the tool call in the tool calls array.
        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:
        - index
        - type
    RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject:
      title: Code interpreter log output
      type: object
      description: Text output from the Code Interpreter tool call as part of a run step.
      properties:
        index:
          type: integer
          description: The index of the output in the outputs array.
        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:
        - index
        - type
    RunStepDeltaStepDetailsToolCallsCodeOutputImageObject:
      title: Code interpreter image output
      type: object
      properties:
        index:
          type: integer
          description: The index of the output in the outputs array.
        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:
        - index
        - type
    RunStepDeltaStepDetailsToolCallsObject:
      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/RunStepDeltaStepDetailsToolCallsCodeObject"
              - $ref: "#/components/schemas/RunStepDeltaStepDetailsToolCallsFileSearchObject"
              - $ref: "#/components/schemas/RunStepDeltaStepDetailsToolCallsFunctionObject"
            x-oaiExpandable: true
      required:
        - type
```
