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

# Get tool function parameters

> This endpoint will generate the parameters for a tool function based on the user's message and image URL provided in the request body. The response will include the parameters for the tool function as a JSON object.



## OpenAPI

````yaml post /api/message/get_tool_function_params
openapi: 3.0.3
info:
  title: Trieve API
  description: >-
    Trieve OpenAPI Specification. This document describes all of the operations
    available through the Trieve API.
  contact:
    name: Trieve Team
    url: https://trieve.ai
    email: developers@trieve.ai
  license:
    name: BSL
    url: https://github.com/devflowinc/trieve/blob/main/LICENSE.txt
  version: 0.13.0
servers:
  - url: https://api.trieve.ai
    description: Production server
  - url: http://localhost:8090
    description: Local development server
security: []
tags:
  - name: Invitation
    description: Invitation endpoint. Exists to invite users to an organization.
  - name: Auth
    description: Authentication endpoint. Serves to register and authenticate users.
  - name: User
    description: User endpoint. Enables you to modify user roles and information.
  - name: Organization
    description: >-
      Organization endpoint. Enables you to modify organization roles and
      information.
  - name: Dataset
    description: >-
      Dataset endpoint. Datasets belong to organizations and hold configuration
      information for both client and server. Datasets contain chunks and chunk
      groups.
  - name: Chunk
    description: >-
      Chunk endpoint. Think of chunks as individual searchable units of
      information. The majority of your integration will likely be with the
      Chunk endpoint.
  - name: Chunk Group
    description: >-
      Chunk groups endpoint. Think of a chunk_group as a bookmark folder within
      the dataset.
  - name: Crawl
    description: Crawl endpoint. Used to create and manage crawls for datasets.
  - name: File
    description: >-
      File endpoint. When files are uploaded, they are stored in S3 and broken
      up into chunks with text extraction from Apache Tika. You can upload files
      of pretty much any type up to 1GB in size. See chunking algorithm details
      at `docs.trieve.ai` for more information on how chunking works. Improved
      default chunking is on our roadmap.
  - name: Events
    description: >-
      Notifications endpoint. Files are uploaded asynchronously and events are
      sent to the user when the upload is complete.
  - name: Topic
    description: >-
      Topic chat endpoint. Think of topics as the storage system for gen-ai chat
      memory. Gen AI messages belong to topics.
  - name: Message
    description: >-
      Message chat endpoint. Messages are units belonging to a topic in the
      context of a chat with a LLM. There are system, user, and assistant
      messages.
  - name: Stripe
    description: >-
      Stripe endpoint. Used for the managed SaaS version of this app. Eventually
      this will become a micro-service. Reach out to the team using contact info
      found at `docs.trieve.ai` for more information.
  - name: Health
    description: Health check endpoint. Used to check if the server is up and running.
  - name: Metrics
    description: Metrics endpoint. Used to get information for monitoring
  - name: Analytics
    description: Analytics endpoint. Used to get information for search and RAG analytics
  - name: Experiment
    description: Experiment endpoint. Used to create and manage experiments
paths:
  /api/message/get_tool_function_params:
    post:
      tags:
        - Message
      summary: Get tool function parameters
      description: >-
        This endpoint will generate the parameters for a tool function based on
        the user's message and image URL provided in the request body. The
        response will include the parameters for the tool function as a JSON
        object.
      operationId: get_tool_function_params
      parameters:
        - name: TR-Dataset
          in: header
          description: >-
            The dataset id or tracking_id to use for the request. We assume you
            intend to use an id if the value is a valid uuid.
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        description: JSON request payload to get the parameters for a tool function
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetToolFunctionParamsReqPayload'
        required: true
      responses:
        '200':
          description: A JSON object containing the parameters for the tool function
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetToolFunctionParamsRespBody'
        '400':
          description: >-
            Service error relating to to updating chunk, likely due to
            conflicting tracking_id
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody'
      security:
        - ApiKey:
            - admin
components:
  schemas:
    GetToolFunctionParamsReqPayload:
      type: object
      description: Request payload for getting the parameters of a tool function
      required:
        - tool_function
      properties:
        audio_input:
          type: string
          description: >-
            The base64 encoded audio input of the user message to attach to the
            topic and then generate an assistant message in response to.
          nullable: true
        image_url:
          type: string
          description: >-
            Image URL to attach to the message to generate the parameters for
            the tool function.
          deprecated: true
          nullable: true
        image_urls:
          type: array
          items:
            type: string
          description: >-
            Image URLs to attach to the message to generate the parameters for
            the tool function.
          nullable: true
        model:
          type: string
          description: >-
            Model name to use for the completion. If not specified, this
            defaults to the dataset's model.
          nullable: true
        temperature:
          type: number
          format: double
          description: >-
            Temperature to use for the completion. If not specified, this
            defaults to the dataset's temperature.
          nullable: true
        tool_function:
          $ref: '#/components/schemas/ToolFunction'
        user_message_text:
          type: string
          description: >-
            Text of the user's message to the assistant which will be used to
            generate the parameters for the tool function.
          nullable: true
      example:
        image_url: https://example.com/jacket.jpg
        tool_function:
          description: >-
            Decide on which filters to apply to available catalog being used
            within the knowledge base to respond. Always get filters.
          name: get_filters
          parameters:
            - description: Whether or not the user is looking for jackets.
              name: jackets
              parameter_type: boolean
            - description: Whether or not the user is looking for shirts.
              name: shirts
              parameter_type: boolean
        user_message_text: |-
          Get filters for the following message: 

          I am looking for a jacket.
    GetToolFunctionParamsRespBody:
      type: object
      description: Response body for getting the parameters of a tool function
      properties:
        parameters:
          description: Parameters for the tool function.
          nullable: true
      example:
        parameters:
          jackets: true
          shirts: false
    ErrorResponseBody:
      type: object
      required:
        - message
      properties:
        message:
          type: string
      example:
        message: Bad Request
    ToolFunction:
      type: object
      description: Function for a LLM tool call
      required:
        - name
        - description
        - parameters
      properties:
        description:
          type: string
          description: Description of the function.
        name:
          type: string
          description: Name of the function.
        parameters:
          type: array
          items:
            $ref: '#/components/schemas/ToolFunctionParameter'
          description: Parameters of the function.
      example:
        description: >-
          Decide on which filters to apply to available catalog being used
          within the knowledge base to respond. Always get filters.
        name: get_filters
        parameters:
          - description: Whether or not the user is looking for jackets.
            name: jackets
            parameter_type: boolean
          - description: Whether or not the user is looking for shirts.
            name: shirts
            parameter_type: boolean
    ToolFunctionParameter:
      type: object
      description: Function parameter for a LLM tool call
      required:
        - name
        - parameter_type
        - description
      properties:
        description:
          type: string
          description: The description of the tag.
        name:
          type: string
          description: Name of the parameter.
        parameter_type:
          $ref: '#/components/schemas/ToolFunctionParameterType'
      example:
        description: Whether or not the user is looking for jackets.
        name: jackets
        parameter_type: boolean
    ToolFunctionParameterType:
      type: string
      description: Type of a given parameter for a LLM tool call
      enum:
        - number
        - boolean
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: Authorization

````