import type { ToolRunHistory } from "@scoopika/types";

type ToolRun = ToolRunHistory<MyToolRes>;
{
	"call": {
		"id": "CALL_1",
		"type": "function",
		"function": {
			"name": "get_document",
			"arguments": "{\"id\": \"001\"}"
		}
	},
	"result": {
		"document": {
			"title": "Document 1"
		}
	}
}

The ToolHistory is an object that contains information about an external tool an agent called during its processing. It contains insights into the called tool and the results it yielded.

Props

call
ToolCall

This property holds a ToolCall object that details the specific tool call made by the agent.

Reference

result
any

This field contains the actual result returned by the tool after its execution. The data type of the result can vary depending on the specific tool.

import type { ToolRunHistory } from "@scoopika/types";

type ToolRun = ToolRunHistory<MyToolRes>;
{
	"call": {
		"id": "CALL_1",
		"type": "function",
		"function": {
			"name": "get_document",
			"arguments": "{\"id\": \"001\"}"
		}
	},
	"result": {
		"document": {
			"title": "Document 1"
		}
	}
}