Files
temporal-ai-agent/tools/tool_registry.py
2025-02-03 17:34:42 +00:00

84 lines
2.7 KiB
Python

from models.tool_definitions import ToolDefinition, ToolArgument
find_events_tool = ToolDefinition(
name="FindEvents",
description="Find upcoming events to travel to a given city (e.g., 'Melbourne') and a date or month. "
"It knows about events in Oceania only (e.g. major Australian and New Zealand cities). "
"It will search 1 month either side of the month provided. "
"Returns a list of events. ",
arguments=[
ToolArgument(
name="city",
type="string",
description="Which city to search for events",
),
ToolArgument(
name="month",
type="string",
description="The month to search for events (will search 1 month either side of the month provided)",
),
],
)
# 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",
),
],
)
find_fixtures_tool = ToolDefinition(
name="FindFixtures",
description="Find upcoming fixtures for a given team and month",
arguments=[
ToolArgument(
name="team",
type="string",
description="The name of the team to search for",
),
ToolArgument(
name="month",
type="string",
description="The month to search for fixtures",
),
],
)