import type { LLMToolCall } from "@scoopika/types";
{
	"id": "CALL_1",
	"type": "function",
	"function": {
		"name": "get_document",
		"arguments": "{\"id\": \"001\"}"
	}
}

The ToolCall object contains details about an external tool called by the agent during processing.

id
string

The ID of the call

type
string, always "function"

The type of the call. currently will always be "function".

function
object

This property provides details about the specific function call made by the agent.

Properties:

  • name (string): This field specifies the name of the function or tool that was called.
  • arguments (string): This field contains a JSON-encoded string representing the arguments that were passed to the called function. While the field itself is a string, you can leverage JSON.parse to convert it into a JavaScript object for easier access to the individual arguments.
import type { LLMToolCall } from "@scoopika/types";
{
	"id": "CALL_1",
	"type": "function",
	"function": {
		"name": "get_document",
		"arguments": "{\"id\": \"001\"}"
	}
}