---
title: "Get tool function parameters"
method: POST
path: "/api/message/get_tool_function_params"
tags: ["Message"]
---

# Get tool function parameters

`POST /api/message/get_tool_function_params`

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.

## Headers

- `TR-Dataset` string, uuid, required

## Request body

- GetToolFunctionParamsReqPayload — Request payload for getting the parameters of a tool function
  - `audio_input` string, nullable — The base64 encoded audio input of the user message to attach to the topic and then generate an assistant message in response to.
  - `image_url` string, nullable — Image URL to attach to the message to generate the parameters for the tool function.
  - `image_urls` string[], nullable — Image URLs to attach to the message to generate the parameters for the tool function.
  - `model` string, nullable — Model name to use for the completion. If not specified, this defaults to the dataset's model.
  - `temperature` number, double, nullable — Temperature to use for the completion. If not specified, this defaults to the dataset's temperature.
  - `tool_function` ToolFunction, required — Function for a LLM tool call
    - `description` string, required — Description of the function.
    - `name` string, required — Name of the function.
    - `parameters` ToolFunctionParameter[], required — Parameters of the function.
      - `description` string, required — The description of the tag.
      - `name` string, required — Name of the parameter.
      - `parameter_type` 'number' | 'boolean', required — Type of a given parameter for a LLM tool call
  - `user_message_text` string, nullable — Text of the user's message to the assistant which will be used to generate the parameters for the tool function.

## Response `200`

A JSON object containing the parameters for the tool function

- GetToolFunctionParamsRespBody — Response body for getting the parameters of a tool function
  - `parameters` unknown

## Other responses

- `400` — Service error relating to to updating chunk, likely due to conflicting tracking_id

---

[API](https://skmtc.net/devflowinc/apis/trieve-api.md) · [All operations](https://skmtc.net/devflowinc/apis/trieve-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/devflowinc/trieve-api/revisions/84583e7c9fc1/schema)
