Files
temporal-ai-agent/tools/tool_registry.py

65 lines
2.0 KiB
Python

from models.tool_definitions import ToolDefinition, ToolArgument
find_events_tool = ToolDefinition(
name="FindEvents",
description="Find upcoming events to travel to given a location or city (e.g., 'Oceania') and a date or month",
arguments=[
ToolArgument(
name="city",
type="string",
description="Which city to search for events",
),
ToolArgument(
name="month",
type="string",
description="The month or approximate date range to find events",
),
],
)
# 2) Define the SearchFlights tool
search_flights_tool = ToolDefinition(
name="SearchFlights",
description="Search for return flights from an origin to a destination within a date range (dateDepart, dateReturn).",
arguments=[
ToolArgument(
name="origin",
type="string",
description="Airport or city (infer airport code from city and store)",
),
ToolArgument(
name="destination",
type="string",
description="Airport or city code for arrival (infer airport code from city and store)",
),
ToolArgument(
name="dateDepart",
type="ISO8601",
description="Start of date range in human readable format, when you want to depart",
),
ToolArgument(
name="dateReturn",
type="ISO8601",
description="End of date range in human readable format, when you want to return",
),
],
)
# 3) Define the CreateInvoice tool
create_invoice_tool = ToolDefinition(
name="CreateInvoice",
description="Generate an invoice for the items described for the amount provided",
arguments=[
ToolArgument(
name="amount",
type="float",
description="The total cost to be invoiced",
),
ToolArgument(
name="flightDetails",
type="string",
description="A description of the item details to be invoiced",
),
],
)