code stringlengths 17 6.64M |
|---|
class IFTTTUpdateApplet(VirtualFunctionTool):
name = 'IFTTTUpdateApplet'
summary = 'Update an existing applet with new trigger and action settings.'
parameters: List[ArgParameter] = [{'name': 'applet_id', 'type': 'string', 'description': 'The unique identifier of the applet to update.', 'required': True}, {'name': 'trigger_service_name', 'type': 'string', 'description': "The new service of the trigger for the applet, e.g., 'Twitter'. Must be an existing connected service returned by ListConnectedServices.", 'required': True}, {'name': 'trigger_name', 'type': 'string', 'description': "The new trigger from the service for the applet, e.g., 'new tweet from user'. Must be an existing trigger returned by SearchTriggers for the specified service.", 'required': True}, {'name': 'trigger_parameters', 'type': 'object', 'description': 'The new parameters for the trigger. Must be a valid object matching the description returned by SearchTriggers for the specified trigger.', 'required': True}, {'name': 'action_service_name', 'type': 'string', 'description': "The new service of the action for the applet, e.g., 'Gmail'. Must be an existing connected service returned by ListConnectedServices.", 'required': True}, {'name': 'action_name', 'type': 'string', 'description': "The new action from the service to perform when the trigger is activated, e.g., 'send an email'. Must be an existing action returned by SearchActions for the specified service. ", 'required': True}, {'name': 'action_parameters', 'type': 'object', 'description': 'The new parameters for the action. Must be a valid object matching the description returned by SearchActions for the specified action.', 'required': True}]
returns: List[ArgReturn] = [{'name': 'success', 'type': 'boolean', 'description': 'Indicates whether the applet update was successful.'}]
exceptions: List[ArgException] = [{'name': 'InvalidRequestException', 'description': "The 'trigger_parameters' does not match the parameter required by the specified 'trigger_name' or the 'action_parameters' does not match the parameter required by the specified 'action_name'."}, {'name': 'NotFoundException', 'description': "The specified 'trigger_service_name', 'trigger_name', 'action_service_name', or 'action_name' does not exist, or the specified 'applet_id' does not exist."}]
|
class IFTTTDeleteApplets(VirtualFunctionTool):
name = 'IFTTTDeleteApplets'
summary = 'Delete the specified applets.'
parameters: List[ArgParameter] = [{'name': 'applet_ids', 'type': 'array', 'description': 'The list of unique identifiers of the applets to delete.', 'required': True}]
returns: List[ArgReturn] = [{'name': 'success', 'type': 'boolean', 'description': 'Indicates whether the applet deletion was successful.'}]
exceptions: List[ArgException] = [{'name': 'NotFoundException', 'description': "The specified 'applet_ids' does not exist."}]
|
@register_toolkit()
class IFTTT(FunctionToolkit):
name_for_human = 'IFTTT'
description_for_human = 'Toolkit for creating and managing IFTTT applets and connected services.'
name_for_model = 'IFTTT'
description_for_model = 'The IFTTT toolkit connect different services together using applets. Each applet defines a relationship between a trigger and an action, where the action is performed when the trigger is triggered. It allows users to create and manage applets, discover pre-built applets, enable/disable applets, list connected services, and search for available triggers and actions. It supports a wide range of services including social media platforms, email services, IoT devices, and more.'
tool_classes = [IFTTTSearchConnectedServices, IFTTTSearchTriggers, IFTTTSearchActions, IFTTTCreateApplet, IFTTTSearchApplets, IFTTTUpdateApplet, IFTTTDeleteApplets]
|
class EvernoteManagerCreateNote(VirtualFunctionTool):
name = 'EvernoteManagerCreateNote'
summary = 'Create a new note with a title, content, and optional attachments.'
parameters: List[ArgParameter] = [{'name': 'title', 'type': 'string', 'description': 'The title of the note.', 'required': True}, {'name': 'content', 'type': 'string', 'description': 'The content of the note.', 'required': True}, {'name': 'attachments', 'type': 'array', 'description': 'Local file paths of attachments (optional).', 'required': False}, {'name': 'notebook_id', 'type': 'string', 'description': 'The ID of the notebook to add the note to (optional).', 'required': False}]
returns: List[ArgReturn] = [{'name': 'note_id', 'type': 'string', 'description': 'The unique identifier of the created note.'}]
exceptions: List[ArgException] = [{'name': 'InvalidRequestException', 'description': 'The title or content is empty or the attachments have invalid file paths.'}]
|
class EvernoteManagerReadNote(VirtualFunctionTool):
name = 'EvernoteManagerReadNote'
summary = 'Retrieve the content of a note by its unique identifier.'
parameters: List[ArgParameter] = [{'name': 'note_id', 'type': 'string', 'description': 'The unique identifier of the note.', 'required': True}]
returns: List[ArgReturn] = [{'name': 'note', 'type': 'object', 'description': "An object containing the note's title, snippet, content, attachments, notebook_id, and tags."}]
exceptions: List[ArgException] = [{'name': 'NotFoundException', 'description': 'The note_id does not exist.'}]
|
class EvernoteManagerUpdateNote(VirtualFunctionTool):
name = 'EvernoteManagerUpdateNote'
summary = 'Update the content, title, or attachments of a note by its unique identifier.'
parameters: List[ArgParameter] = [{'name': 'note_id', 'type': 'string', 'description': 'The unique identifier of the note.', 'required': True}, {'name': 'title', 'type': 'string', 'description': 'The new title of the note (optional).', 'required': False}, {'name': 'content', 'type': 'string', 'description': 'The new content of the note (optional).', 'required': False}, {'name': 'attachments', 'type': 'array', 'description': 'Local file paths of new attachments (optional).', 'required': False}]
returns: List[ArgReturn] = [{'name': 'success', 'type': 'boolean', 'description': 'Whether the update was successful.'}]
exceptions: List[ArgException] = [{'name': 'NotFoundException', 'description': 'The note_id does not exist.'}, {'name': 'InvalidRequestException', 'description': 'The attachments have invalid file paths.'}]
|
class EvernoteManagerDeleteNote(VirtualFunctionTool):
name = 'EvernoteManagerDeleteNote'
summary = 'Delete a note by its unique identifier.'
parameters: List[ArgParameter] = [{'name': 'note_id', 'type': 'string', 'description': 'The unique identifier of the note.', 'required': True}]
returns: List[ArgReturn] = [{'name': 'success', 'type': 'boolean', 'description': 'Whether the deletion was successful.'}]
exceptions: List[ArgException] = [{'name': 'NotFoundException', 'description': 'The note_id does not exist.'}]
|
class EvernoteManagerCreateNotebook(VirtualFunctionTool):
name = 'EvernoteManagerCreateNotebook'
summary = 'Create a new notebook with a name.'
parameters: List[ArgParameter] = [{'name': 'name', 'type': 'string', 'description': 'The name of the notebook.', 'required': True}]
returns: List[ArgReturn] = [{'name': 'notebook_id', 'type': 'string', 'description': 'The unique identifier of the created notebook.'}]
exceptions: List[ArgException] = [{'name': 'InvalidRequestException', 'description': 'The name is empty.'}]
|
class EvernoteManagerReadNotebook(VirtualFunctionTool):
name = 'EvernoteManagerReadNotebook'
summary = 'Retrieve the content of a notebook by its unique identifier.'
parameters: List[ArgParameter] = [{'name': 'notebook_id', 'type': 'string', 'description': 'The unique identifier of the notebook.', 'required': True}]
returns: List[ArgReturn] = [{'name': 'notebook', 'type': 'object', 'description': "An object containing the notebook's name and an array of note_id."}]
exceptions: List[ArgException] = [{'name': 'NotFoundException', 'description': 'The notebook_id does not exist.'}]
|
class EvernoteManagerUpdateNotebook(VirtualFunctionTool):
name = 'EvernoteManagerUpdateNotebook'
summary = 'Update the name of a notebook by its unique identifier.'
parameters: List[ArgParameter] = [{'name': 'notebook_id', 'type': 'string', 'description': 'The unique identifier of the notebook.', 'required': True}, {'name': 'name', 'type': 'string', 'description': 'The new name of the notebook.', 'required': True}]
returns: List[ArgReturn] = [{'name': 'success', 'type': 'boolean', 'description': 'Whether the update was successful.'}]
exceptions: List[ArgException] = [{'name': 'NotFoundException', 'description': 'The notebook_id does not exist.'}, {'name': 'InvalidRequestException', 'description': 'The name is empty.'}]
|
class EvernoteManagerDeleteNotebook(VirtualFunctionTool):
name = 'EvernoteManagerDeleteNotebook'
summary = 'Delete a notebook by its unique identifier.'
parameters: List[ArgParameter] = [{'name': 'notebook_id', 'type': 'string', 'description': 'The unique identifier of the notebook.', 'required': True}]
returns: List[ArgReturn] = [{'name': 'success', 'type': 'boolean', 'description': 'Whether the deletion was successful.'}]
exceptions: List[ArgException] = [{'name': 'NotFoundException', 'description': 'The notebook_id does not exist.'}]
|
class EvernoteManagerSearchNotes(VirtualFunctionTool):
name = 'EvernoteManagerSearchNotes'
summary = 'Search for notes by keywords, tags, or notebook ID.'
parameters: List[ArgParameter] = [{'name': 'keywords', 'type': 'array', 'description': 'A list of keywords to search for in the note title or content (optional).', 'required': False}, {'name': 'tags', 'type': 'array', 'description': 'A list of tags to search for in the note tags (optional).', 'required': False}, {'name': 'notebook_id', 'type': 'string', 'description': 'The unique identifier of the notebook to search within (optional).', 'required': False}, {'name': 'max_results', 'type': 'integer', 'description': 'The maximum number of results to return (optional, default: 10).', 'required': False}]
returns: List[ArgReturn] = [{'name': 'notes', 'type': 'array', 'description': 'A list of note objects, each includes note_id, title, and snippet.'}]
exceptions: List[ArgException] = [{'name': 'InvalidRequestException', 'description': 'The max_results is not a positive integer.'}]
|
class EvernoteManagerManageNoteSharingLevel(VirtualFunctionTool):
name = 'EvernoteManagerManageNoteSharingLevel'
summary = 'Alter the note-sharing permissions for a specific user identified by their email address.'
parameters: List[ArgParameter] = [{'name': 'note_id', 'type': 'string', 'description': 'The unique identifier of the note that the permissions will be changed for.', 'required': True}, {'name': 'email', 'type': 'string', 'description': 'The email address of the user whose note-sharing permissions will be altered.', 'required': True}, {'name': 'level', 'type': 'string', 'description': "The level of sharing, can be 'not_accessible', 'read_only', or 'can_edit'.", 'required': True}]
returns: List[ArgReturn] = [{'name': 'success', 'type': 'boolean', 'description': 'Whether the sharing permissions for the note were successfully updated.'}]
exceptions: List[ArgException] = [{'name': 'NotFoundException', 'description': 'The note_id does not exist.'}, {'name': 'InvalidRequestException', 'description': "The email is invalid or the level is not one of 'not_accessible', 'read_only', or 'can_edit'."}]
|
class EvernoteManagerSearchNotebooks(VirtualFunctionTool):
name = 'EvernoteManagerSearchNotebooks'
summary = 'Search for notebooks by keywords or name.'
parameters: List[ArgParameter] = [{'name': 'keywords', 'type': 'array', 'description': 'A list of keywords to search for in the notebook name (optional).', 'required': False}, {'name': 'name', 'type': 'string', 'description': 'The name of the notebook to search for (optional).', 'required': False}, {'name': 'max_results', 'type': 'integer', 'description': 'The maximum number of results to return (optional, default: 10).', 'required': False}]
returns: List[ArgReturn] = [{'name': 'notebooks', 'type': 'array', 'description': 'A list of notebook objects, each includes notebook_id and name.'}]
exceptions: List[ArgException] = [{'name': 'InvalidRequestException', 'description': 'The max_results is not a positive integer.'}]
|
@register_toolkit()
class EvernoteManager(FunctionToolkit):
name_for_human = 'Evernote Manager'
description_for_human = 'Toolkit for managing and organizing notes and documents using Evernote.'
name_for_model = 'EvernoteManager'
description_for_model = 'A toolkit for managing and organizing notes, documents, and web clippings using Evernote, including creating, reading, updating, deleting, searching, tagging, and sharing notes and notebooks. It also allows users to control the level of sharing of notes with other users.'
tool_classes = [EvernoteManagerCreateNote, EvernoteManagerReadNote, EvernoteManagerUpdateNote, EvernoteManagerDeleteNote, EvernoteManagerCreateNotebook, EvernoteManagerReadNotebook, EvernoteManagerUpdateNotebook, EvernoteManagerDeleteNotebook, EvernoteManagerSearchNotes, EvernoteManagerManageNoteSharingLevel, EvernoteManagerSearchNotebooks]
|
class SlackSendMessage(VirtualFunctionTool):
name = 'SlackSendMessage'
summary = 'Send a message and optional file to a channel or user.'
parameters: List[ArgParameter] = [{'name': 'recipient', 'type': 'string', 'description': "The name of the recipient, channel name starts with '#', e.g., '#general', or user name starts with '@', e.g., '@john'.", 'required': True}, {'name': 'message', 'type': 'string', 'description': 'The content of the message.', 'required': True}, {'name': 'file_path', 'type': 'string', 'description': 'The local file path of the file to upload (optional).', 'required': False}]
returns: List[ArgReturn] = [{'name': 'success', 'type': 'boolean', 'description': 'Whether the message was sent successfully.'}]
exceptions: List[ArgException] = [{'name': 'InvalidRequestException', 'description': "The 'recipient' is in an invalid format, or the 'message' is empty."}, {'name': 'NotFoundException', 'description': "The 'recipient' does not exist, or the 'file_path' does not exist."}]
|
class SlackCreateChannel(VirtualFunctionTool):
name = 'SlackCreateChannel'
summary = 'Create a new channel.'
parameters: List[ArgParameter] = [{'name': 'channel_name', 'type': 'string', 'description': "The name of the channel, must start with '#'.", 'required': True}, {'name': 'is_public', 'type': 'boolean', 'description': 'Whether the channel is public. Default is public.', 'required': False}]
returns: List[ArgReturn] = [{'name': 'success', 'type': 'boolean', 'description': 'Whether the channel was created successfully.'}]
exceptions: List[ArgException] = [{'name': 'InvalidRequestException', 'description': "The 'channel_name' is empty or in an invalid format."}, {'name': 'ConflictException', 'description': "A channel with the same 'channel_name' already exists."}]
|
class SlackJoinChannel(VirtualFunctionTool):
name = 'SlackJoinChannel'
summary = 'Join an existing channel.'
parameters: List[ArgParameter] = [{'name': 'channel_name', 'type': 'string', 'description': "The name of the channel, must start with '#'.", 'required': True}]
returns: List[ArgReturn] = [{'name': 'success', 'type': 'boolean', 'description': 'Whether the user joined the channel successfully.'}]
exceptions: List[ArgException] = [{'name': 'NotFoundException', 'description': "The 'channel_name' does not exist."}, {'name': 'InvalidRequestException', 'description': "The 'channel_name' is empty or in an invalid format, or the user is already a member of the channel."}]
|
class SlackLeaveChannel(VirtualFunctionTool):
name = 'SlackLeaveChannel'
summary = 'Leave a channel.'
parameters: List[ArgParameter] = [{'name': 'channel_name', 'type': 'string', 'description': "The name of the channel, must start with '#'.", 'required': True}]
returns: List[ArgReturn] = [{'name': 'success', 'type': 'boolean', 'description': 'Whether the user left the channel successfully.'}]
exceptions: List[ArgException] = [{'name': 'InvalidRequestException', 'description': "The 'channel_name' is empty or in an invalid format, or the user is not a member of the channel."}, {'name': 'NotFoundException', 'description': "The 'channel_name' does not exist."}]
|
class SlackSearchMessage(VirtualFunctionTool):
name = 'SlackSearchMessage'
summary = 'Search for messages in a channel or direct messages.'
parameters: List[ArgParameter] = [{'name': 'query', 'type': 'string', 'description': 'The search query.', 'required': True}, {'name': 'in', 'type': 'string', 'description': "The channel name or user name to search within, must start with '#' (for channels) or '@' (for users). When not specified, search all channels and direct messages.", 'required': False}, {'name': 'from', 'type': 'string', 'description': "The user name to search for, must start with '@'. When not specified, search all users.", 'required': False}, {'name': 'max_results', 'type': 'integer', 'description': 'The maximum number of results to return. Default is 10.', 'required': False}]
returns: List[ArgReturn] = [{'name': 'messages', 'type': 'array', 'description': "The search results, each object includes 'content' (string, the content of the message), 'timestamp' (string, the timestamp of the message in ISO 8601 format), 'in' (string, the channel name or user name), 'from' (string, the user name of the sender), and 'file_id' (string, the unique identifier of the file if the message is a file)."}]
exceptions: List[ArgException] = [{'name': 'InvalidRequestException', 'description': "The 'in' or 'from' argument is not a valid string or the 'max_results' argument is not a valid integer."}]
|
class SlackSearchChannelOrUser(VirtualFunctionTool):
name = 'SlackSearchChannelOrUser'
summary = 'Search for channels or users by query.'
parameters: List[ArgParameter] = [{'name': 'query', 'type': 'string', 'description': 'The search query.', 'required': True}, {'name': 'search_type', 'type': 'string', 'description': "One of ['channels', 'users'], the type of resources to search.", 'required': True}, {'name': 'max_results', 'type': 'integer', 'description': 'The maximum number of results to return. Default is 10.', 'required': False}]
returns: List[ArgReturn] = [{'name': 'results', 'type': 'array', 'description': "A list of objects indicating the search results, each object includes 'name' (string, the name of the channel or user), 'status' (string, one of ['member', 'non-member', 'owner'] for channels, 'online' or 'offline' for users)."}]
exceptions: List[ArgException] = [{'name': 'InvalidRequestException', 'description': "The 'search_type' is not one of ['channels', 'users'], the 'max_results' is not a positive integer."}]
|
class SlackUpdateProfileAndStatus(VirtualFunctionTool):
name = 'SlackUpdateProfileAndStatus'
summary = "Update the user's profile and status."
parameters: List[ArgParameter] = [{'name': 'status_text', 'type': 'string', 'description': 'The status text.', 'required': False}, {'name': 'status_emoji', 'type': 'string', 'description': 'The status emoji.', 'required': False}, {'name': 'presence', 'type': 'string', 'description': "One of ['auto', 'away'], the presence status.", 'required': False}, {'name': 'profile', 'type': 'object', 'description': "The profile to update, includes 'first_name' (string), 'last_name' (string), 'email' (string), 'phone' (string), 'local_time' (string), 'title' (string).", 'required': False}]
returns: List[ArgReturn] = [{'name': 'success', 'type': 'boolean', 'description': 'Whether the profile and status were updated successfully.'}]
exceptions: List[ArgException] = [{'name': 'InvalidRequestException', 'description': "The 'status_text' or 'status_emoji' is inappropriate, the 'presence' is not one of ['auto', 'away'], or the 'profile' contains incorrect or inappropriate information."}]
|
class SlackManageMembership(VirtualFunctionTool):
name = 'SlackManageMembership'
summary = 'Add or remove users from a channel. This tool is only valid when the user is the owner of the group.'
parameters: List[ArgParameter] = [{'name': 'channel_name', 'type': 'string', 'description': "The name of the channel, must start with '#'.", 'required': True}, {'name': 'user_name', 'type': 'string', 'description': "The name of the user to add or remove, must start with '@'.", 'required': True}, {'name': 'action', 'type': 'string', 'description': "One of ['add', 'remove'], the action to perform.", 'required': True}]
returns: List[ArgReturn] = [{'name': 'success', 'type': 'boolean', 'description': 'Whether the membership was managed successfully.'}]
exceptions: List[ArgException] = [{'name': 'InvalidRequestException', 'description': "The 'channel_name' or 'user_name' is empty or in an invalid format, or the 'action' is not one of ['add', 'remove'], or the channel is not owned by the user."}]
|
class SlackGetUserDetails(VirtualFunctionTool):
name = 'SlackGetUserDetails'
summary = 'Retrieve the profile and status of a user.'
parameters: List[ArgParameter] = [{'name': 'user_name', 'type': 'string', 'description': "The name of the user, must start with '@'.", 'required': True}]
returns: List[ArgReturn] = [{'name': 'profile', 'type': 'object', 'description': "The profile of the user, includes 'first_name' (string), 'last_name' (string), 'email' (string), 'phone' (string), 'local_time' (string), 'title' (string)."}, {'name': 'status', 'type': 'object', 'description': "The status of the user, includes 'status_text' (string), 'status_emoji' (string), 'presence' (string)."}]
exceptions: List[ArgException] = [{'name': 'InvalidRequestException', 'description': "The 'user_name' is empty or in an invalid format."}]
|
class SlackDownloadFile(VirtualFunctionTool):
name = 'SlackDownloadFile'
summary = 'Download a file using its unique identifier.'
parameters: List[ArgParameter] = [{'name': 'file_id', 'type': 'string', 'description': 'The unique identifier of the file.', 'required': True}, {'name': 'save_path', 'type': 'string', 'description': 'The local path to save the file.', 'required': True}]
returns: List[ArgReturn] = [{'name': 'success', 'type': 'boolean', 'description': 'Whether the file was downloaded successfully.'}]
exceptions: List[ArgException] = [{'name': 'InvalidRequestException', 'description': "The 'file_id' is incorrect or the 'save_path' is invalid."}]
|
@register_toolkit()
class Slack(FunctionToolkit):
name_for_human = 'Slack'
description_for_human = 'Toolkit for managing Slack interactions.'
name_for_model = 'Slack'
description_for_model = 'A toolkit for managing Slack interactions, including sending messages, managing channels, searching for messages, channels, and users, uploading and downloading files, and managing user profiles and statuses.'
tool_classes = [SlackSendMessage, SlackCreateChannel, SlackJoinChannel, SlackLeaveChannel, SlackSearchMessage, SlackSearchChannelOrUser, SlackUpdateProfileAndStatus, SlackManageMembership, SlackGetUserDetails, SlackDownloadFile]
|
class TwilioSendSms(VirtualFunctionTool):
name = 'TwilioSendSms'
summary = 'Send an SMS message to one or multiple specified phone numbers.'
parameters: List[ArgParameter] = [{'name': 'to_phone_numbers', 'type': 'array', 'description': 'A list of phone numbers in E.164 format to send the SMS message to.', 'required': True}, {'name': 'message', 'type': 'string', 'description': 'The content of the SMS message.', 'required': True}, {'name': 'scheduled_time', 'type': 'string', 'description': "The scheduled time for sending the SMS message in the format 'YYYY-MM-DD HH:mm:ss'. Optional.", 'required': False}, {'name': 'is_recurring', 'type': 'boolean', 'description': 'Whether the SMS message should be sent on a recurring basis. Default is false.', 'required': False}, {'name': 'recurrence', 'type': 'string', 'description': "The recurrence rule in RRULE format, required if 'is_recurring' is true.", 'required': False}]
returns: List[ArgReturn] = [{'name': 'success', 'type': 'boolean', 'description': 'Whether the SMS message was sent successfully.'}]
exceptions: List[ArgException] = [{'name': 'InvalidRequestException', 'description': "The 'to_phone_numbers' or 'message' parameter is invalid, the 'scheduled_time' parameter is not in the correct format, or the 'is_recurring' parameter is true but the 'recurrence' parameter is not properly set."}]
|
class TwilioGetSmsHistory(VirtualFunctionTool):
name = 'TwilioGetSmsHistory'
summary = 'Retrieve the history of sent SMS messages.'
parameters: List[ArgParameter] = [{'name': 'to_phone_number', 'type': 'string', 'description': 'The phone number in E.164 format to retrieve the history for. If not specified, the history for all phone numbers will be retrieved.', 'required': False}, {'name': 'datetime_range', 'type': 'array', 'description': "A list of two timestamps in the format 'YYYY-MM-DD HH:mm:ss' to retrieve the history between. If not specified, the history for all timestamps will be retrieved.", 'required': False}, {'name': 'keywords', 'type': 'string', 'description': 'The comma-separated keywords to search for in the message content. If not specified, no keyword filtering will be performed.', 'required': False}, {'name': 'max_results', 'type': 'integer', 'description': 'The maximum number of results to retrieve. Optional.', 'required': False}]
returns: List[ArgReturn] = [{'name': 'sms_history', 'type': 'array', 'description': "A list of objects containing the 'to_phone_number', 'message', and 'timestamp' of each sent SMS message."}]
exceptions: List[ArgException] = [{'name': 'InvalidRequestException', 'description': "The 'to_phone_number' parameter is invalid, the 'datetime_range' parameter is not in the correct format, or the 'max_results' parameter is not a positive integer."}]
|
class TwilioGetReceivedSmsMessages(VirtualFunctionTool):
name = 'TwilioGetReceivedSmsMessages'
summary = 'Retrieve the history of received SMS messages.'
parameters: List[ArgParameter] = [{'name': 'from_phone_number', 'type': 'string', 'description': 'The phone number in E.164 format to retrieve the history for. If not specified, the history for all phone numbers will be retrieved.', 'required': False}, {'name': 'datetime_range', 'type': 'array', 'description': "A list of two timestamps in the format 'YYYY-MM-DD HH:mm:ss' to retrieve the history between. If not specified, the history for all timestamps will be retrieved.", 'required': False}, {'name': 'keywords', 'type': 'string', 'description': 'The comma-separated keywords to search for in the message content. If not specified, no keyword filtering will be performed.', 'required': False}, {'name': 'max_results', 'type': 'integer', 'description': 'The maximum number of results to retrieve. Optional.', 'required': False}]
returns: List[ArgReturn] = [{'name': 'received_messages', 'type': 'array', 'description': "A list of objects containing the 'from_phone_number', 'message', and 'timestamp' of each received message or phone call."}]
exceptions: List[ArgException] = [{'name': 'InvalidRequestException', 'description': "The 'from_phone_number' parameter is invalid, the 'datetime_range' parameter is not in the correct format, or the 'max_results' parameter is not a positive integer."}]
|
class TwilioGetSmsPricing(VirtualFunctionTool):
name = 'TwilioGetSmsPricing'
summary = 'Retrieve the costs per text for different country codes.'
parameters: List[ArgParameter] = [{'name': 'country_code', 'type': 'integer', 'description': 'The country code to retrieve the costs for.', 'required': True}]
returns: List[ArgReturn] = [{'name': 'pricing', 'type': 'object', 'description': "An object containing the 'country_code' and 'cost_per_text' for the specified country code."}]
exceptions: List[ArgException] = [{'name': 'InvalidRequestException', 'description': "The 'country_code' parameter is invalid."}]
|
class TwilioGetPhoneNumberInfo(VirtualFunctionTool):
name = 'TwilioGetPhoneNumberInfo'
summary = 'Retrieve information about a specific phone number.'
parameters: List[ArgParameter] = [{'name': 'phone_number', 'type': 'string', 'description': 'The phone number in E.164 format to retrieve information for.', 'required': True}]
returns: List[ArgReturn] = [{'name': 'phone_number_info', 'type': 'object', 'description': "An object containing the 'phone_number', 'country', 'carrier', and 'type' of the specified phone number."}]
exceptions: List[ArgException] = [{'name': 'NotFoundException', 'description': "The 'phone_number' parameter is not found."}, {'name': 'InvalidRequestException', 'description': "The 'phone_number' parameter is invalid."}]
|
class TwilioGetScheduledActions(VirtualFunctionTool):
name = 'TwilioGetScheduledActions'
summary = 'Retrieve the list of scheduled actions.'
parameters: List[ArgParameter] = [{'name': 'max_results', 'type': 'integer', 'description': 'The maximum number of results to retrieve. Optional.', 'required': False}]
returns: List[ArgReturn] = [{'name': 'scheduled_actions', 'type': 'array', 'description': "A list of objects containing the 'action_type', 'to_phone_number', 'message', and 'scheduled_time' of each scheduled action."}]
exceptions: List[ArgException] = []
|
class TwilioCancelScheduledAction(VirtualFunctionTool):
name = 'TwilioCancelScheduledAction'
summary = 'Cancel a scheduled action.'
parameters: List[ArgParameter] = [{'name': 'action_id', 'type': 'string', 'description': 'The unique identifier of the scheduled action to cancel.', 'required': True}]
returns: List[ArgReturn] = [{'name': 'success', 'type': 'boolean', 'description': 'Whether the scheduled action was canceled successfully.'}]
exceptions: List[ArgException] = [{'name': 'NotFoundException', 'description': "The 'action_id' parameter is not found."}, {'name': 'InvalidRequestException', 'description': "The 'action_id' parameter is invalid."}]
|
@register_toolkit()
class Twilio(FunctionToolkit):
name_for_human = 'Twilio'
description_for_human = 'Toolkit for Twilio services.'
name_for_model = 'Twilio'
description_for_model = 'A toolkit for Twilio services, enabling users to send SMS messages, retrieve communication history, manage scheduled actions, retrieve information about specific phone numbers, and retrieve the history of received SMS messages.'
tool_classes = [TwilioSendSms, TwilioGetSmsHistory, TwilioGetReceivedSmsMessages, TwilioGetSmsPricing, TwilioGetPhoneNumberInfo, TwilioGetScheduledActions, TwilioCancelScheduledAction]
|
class GoogleMapGetCurrentLocation(VirtualFunctionTool):
name = 'GoogleMapGetCurrentLocation'
summary = 'Get the current location of the user.'
parameters: List[ArgParameter] = []
returns: List[ArgReturn] = [{'name': 'location_address', 'type': 'string', 'description': "The current location of the user in the format of 'street address, city, zip code'."}]
exceptions: List[ArgException] = []
|
class GoogleMapSearchLocations(VirtualFunctionTool):
name = 'GoogleMapSearchLocations'
summary = 'Search for locations using keywords, distance, open status, and rating.'
parameters: List[ArgParameter] = [{'name': 'keywords', 'type': 'string', 'description': 'The keywords to search for locations.', 'required': True}, {'name': 'open_now', 'type': 'boolean', 'description': 'Whether the location is open now. Default is not applying the open filter.', 'required': False}, {'name': 'min_rating', 'type': 'number', 'description': 'The minimum rating of the location. Default is not applying the rating filter. Should be a number between 0 and 5.', 'required': False}, {'name': 'base_location_address', 'type': 'string', 'description': "The base location address to search for locations and calculate the distance, in the format of 'street address, city, zip code'. Default is the current location.", 'required': False}, {'name': 'max_distance', 'type': 'number', 'description': 'The distance in miles within which to search for locations. Default is not applying the distance filter.', 'required': False}, {'name': 'max_results', 'type': 'integer', 'description': 'The maximum number of results to return. Default is 10.', 'required': False}]
returns: List[ArgReturn] = [{'name': 'locations', 'type': 'array', 'description': "The array of locations, each of which is a dictionary containing the 'location_name', 'location_address' (in the format of 'street address, city, zip code'), 'location_rating', and 'location_distance' (in miles) of the location to the base location, and 'open_now' (optional, indicate whether the location is open now)."}]
exceptions: List[ArgException] = [{'name': 'InvalidRequestException', 'description': "The 'keywords' argument is empty, or the 'min_rating' argument is not a number between 0 and 5, or the 'max_distance' argument is not a positive number, or the 'max_results' argument is not a positive integer, or the 'base_location_address' is not in the valid format."}, {'name': 'NotFoundException', 'description': "The 'base_location_address' does not exist."}]
|
class GoogleMapGetLocationDetails(VirtualFunctionTool):
name = 'GoogleMapGetLocationDetails'
summary = 'Get details of a location.'
parameters: List[ArgParameter] = [{'name': 'location_address', 'type': 'string', 'description': "The address of the location, in the format of 'street address, city, zip code'.", 'required': True}]
returns: List[ArgReturn] = [{'name': 'location_details', 'type': 'object', 'description': "The dictionary containing the 'location_name', 'location_address' (string, in the format of 'street address, city, zip code'), 'location_rating' (number, between 0 and 5), 'open_now' (optional, indicate whether the location is open now), and 'extra_details' (an object including the phone number and opening hours, and other details depending on the type of the location, such as menu for restaurants.)"}]
exceptions: List[ArgException] = [{'name': 'NotFoundException', 'description': "The 'location_address' does not exist."}, {'name': 'InvalidRequestException', 'description': "The 'location_address' is not in the valid format."}]
|
class GoogleMapGetDirections(VirtualFunctionTool):
name = 'GoogleMapGetDirections'
summary = 'Get driving, walking, or public transit directions between two or more locations.'
parameters: List[ArgParameter] = [{'name': 'start_location_address', 'type': 'string', 'description': "The starting location address, in the format of 'street address, city, zip code'. Default is the current location.", 'required': False}, {'name': 'end_location', 'type': 'string', 'description': "The ending location address, in the format of 'street address, city, zip code'.", 'required': True}, {'name': 'mode', 'type': 'string', 'description': "The mode of transportation, can be 'driving', 'walking', or 'transit'.", 'required': True}]
returns: List[ArgReturn] = [{'name': 'estimated_time', 'type': 'string', 'description': "The overall estimated time for the route in the format of 'hours:minutes'."}, {'name': 'estimated_distance', 'type': 'string', 'description': 'The overall estimated distance for the route in miles.'}]
exceptions: List[ArgException] = [{'name': 'InvalidRequestException', 'description': "The 'mode' argument is not one of 'driving', 'walking', or 'transit', or the 'start_location_address' is not in the valid format, or the 'end_location_address' is not in the valid format."}, {'name': 'NotFoundException', 'description': "The 'start_location_address' does not exist, or the 'end_location_address' does not exist."}]
|
class GoogleMapGeocoding(VirtualFunctionTool):
name = 'GoogleMapGeocoding'
summary = 'Convert a location address to geographic coordinates.'
parameters: List[ArgParameter] = [{'name': 'location_address', 'type': 'string', 'description': "The address of the location, in the format of 'street address, city, zip code'.", 'required': True}]
returns: List[ArgReturn] = [{'name': 'coordinates', 'type': 'string', 'description': "The geographic coordinates of the location in the format of 'latitude,longitude'."}]
exceptions: List[ArgException] = [{'name': 'NotFoundException', 'description': "The 'location_address' does not exist."}, {'name': 'InvalidRequestException', 'description': "The 'location_address' is not in the valid format."}]
|
class GoogleMapReverseGeocoding(VirtualFunctionTool):
name = 'GoogleMapReverseGeocoding'
summary = 'Convert geographic coordinates to a location address.'
parameters: List[ArgParameter] = [{'name': 'coordinates', 'type': 'string', 'description': "The geographic coordinates in the format of 'latitude,longitude'.", 'required': True}]
returns: List[ArgReturn] = [{'name': 'location_address', 'type': 'string', 'description': "The address of the location, in the format of 'street address, city, zip code'."}]
exceptions: List[ArgException] = [{'name': 'InvalidRequestException', 'description': "The 'coordinates' argument is not in the correct format."}, {'name': 'NotFoundException', 'description': "The 'coordinates' does not exist."}]
|
class GoogleMapGetLocationReviews(VirtualFunctionTool):
name = 'GoogleMapGetLocationReviews'
summary = 'Get the contents of reviews of a location.'
parameters: List[ArgParameter] = [{'name': 'location_address', 'type': 'string', 'description': "The address of the location, in the format of 'street address, city, zip code'.", 'required': True}]
returns: List[ArgReturn] = [{'name': 'reviews', 'type': 'array', 'description': "The contents of the reviews. Each review object contains 'time' (string, the time when the review was posted, in the format of 'YYYY-MM-DD HH:MM:SS'), 'rating' (number, the rating of the review), 'username' (string, the username of the reviewer), and 'content' (string, the content of the review)."}]
exceptions: List[ArgException] = [{'name': 'NotFoundException', 'description': "The 'location_address' does not exist."}, {'name': 'InvalidRequestException', 'description': "The 'location_address' is not in the valid format."}]
|
class GoogleMapSearchAddressBook(VirtualFunctionTool):
name = 'GoogleMapSearchAddressBook'
summary = 'Search for locations in the address book.'
parameters: List[ArgParameter] = [{'name': 'keywords', 'type': 'string', 'description': 'The keywords to search for locations in the address book.', 'required': True}]
returns: List[ArgReturn] = [{'name': 'addresses', 'type': 'array', 'description': "The addresses found in the address book. Each address object contains 'location_address' (string, the address of the location in the format of 'street address, city, zip code'), 'name' (string, the name of the location), 'note' (string, the note of the location)."}]
exceptions: List[ArgException] = [{'name': 'InvalidRequestException', 'description': "The 'keywords' argument is empty."}]
|
class GoogleMapAddAddress(VirtualFunctionTool):
name = 'GoogleMapAddAddress'
summary = 'Add an address to the address book.'
parameters: List[ArgParameter] = [{'name': 'name', 'type': 'string', 'description': 'The name of the address.', 'required': True}, {'name': 'address', 'type': 'string', 'description': "The address of the location, in the format of 'street address, city, zip code'.", 'required': True}, {'name': 'note', 'type': 'string', 'description': 'The note of the address.', 'required': True}]
returns: List[ArgReturn] = [{'name': 'success', 'type': 'boolean', 'description': 'Whether the operation is successful.'}]
exceptions: List[ArgException] = [{'name': 'InvalidRequestException', 'description': "The 'name' argument is empty, or the 'address' argument is not in the valid format, or the 'note' argument is empty."}, {'name': 'ConflictException', 'description': "The 'name' argument already exists in the address book."}, {'name': 'NotFoundException', 'description': "The 'address' argument does not exist."}]
|
@register_toolkit()
class GoogleMap(FunctionToolkit):
name_for_human = 'Google Map'
description_for_human = 'Toolkit for searching locations, getting location details, getting directions, geocoding, and managing the address book.'
name_for_model = 'GoogleMap'
description_for_model = 'A toolkit that provides functionalities for getting current location, searching locations, getting location details, getting directions, geocoding, getting location reviews, and managing the address book.'
tool_classes = [GoogleMapGetCurrentLocation, GoogleMapSearchLocations, GoogleMapGetLocationDetails, GoogleMapGetDirections, GoogleMapGeocoding, GoogleMapReverseGeocoding, GoogleMapGetLocationReviews, GoogleMapSearchAddressBook, GoogleMapAddAddress]
|
class IndoorRobotGetCurrentState(VirtualFunctionTool):
name = 'IndoorRobotGetCurrentState'
summary = 'Retrieve the current state of the robot, including the room it is currently in and the objects it has grabbed.'
parameters: List[ArgParameter] = []
returns: List[ArgReturn] = [{'name': 'current_room', 'type': 'string', 'description': 'The unique identifier of the current room where the robot is located.'}, {'name': 'grabbed_objects', 'type': 'array', 'description': "A list of objects containing information about the objects grabbed by the robot, including details like object_id (the unique identifier of the object, in the format of 'object name' + 'object number', e.g., 'table_1'), object_name (the name of the object), and description (the description of the object)."}]
exceptions: List[ArgException] = []
|
class IndoorRobotListRooms(VirtualFunctionTool):
name = 'IndoorRobotListRooms'
summary = 'List all the rooms in the building that the robot can navigate to.'
parameters: List[ArgParameter] = []
returns: List[ArgReturn] = [{'name': 'rooms', 'type': 'array', 'description': "A list of objects containing information about the rooms in the building, including details like room_name (the name of the room) and room_id (the unique identifier of the room, in the format of 'room name' + 'room number', e.g., 'kitchen_1')."}]
exceptions: List[ArgException] = []
|
class IndoorRobotGoToRoom(VirtualFunctionTool):
name = 'IndoorRobotGoToRoom'
summary = "Let the robot safely move to a specified room based on the room's unique identifier. If the robot cannot move to the specified room safely, it will return a message indicating the reason why it cannot move to the specified room safely."
parameters: List[ArgParameter] = [{'name': 'room_id', 'type': 'string', 'description': 'The unique identifier of the room to which the robot should move.', 'required': True}]
returns: List[ArgReturn] = [{'name': 'message', 'type': 'string', 'description': 'A message indicating the robot safely moved to the specified room, or the reason why the robot cannot move to the specified room safely.'}, {'name': 'current_room', 'type': 'string', 'description': 'The unique identifier of the current room where the robot is located after executing the command.'}]
exceptions: List[ArgException] = [{'name': 'NotFoundException', 'description': "The 'room_id' parameter does not exist."}]
|
class IndoorRobotFindObjects(VirtualFunctionTool):
name = 'IndoorRobotFindObjects'
summary = 'Let the robot find objects in the current room based on a query. When the robot cannot find any objects that match the query, it will return an empty list.'
parameters: List[ArgParameter] = [{'name': 'query', 'type': 'string', 'description': 'The query to find objects in the current room. The query can be a name or a description of the object.', 'required': True}]
returns: List[ArgReturn] = [{'name': 'objects', 'type': 'array', 'description': "A list of objects that match the query, each object includes object_id (the unique identifier of the object), object_name (the name of the object), object_location (the description of the object location, composed of relative position words like 'on', 'inside', 'left of', 'near', etc., and the relative object id, e.g., 'on table_1'), description (the description of the object), and can_be_grabbed (a boolean indicating whether the robot can grab the object)."}]
exceptions: List[ArgException] = []
|
class IndoorRobotLookAroundObject(VirtualFunctionTool):
name = 'IndoorRobotLookAroundObject'
summary = 'Let the robot look around a specified object and list all objects around the object in the current room.'
parameters: List[ArgParameter] = [{'name': 'object_id', 'type': 'string', 'description': 'The unique identifier of the object around which the robot should look.', 'required': True}]
returns: List[ArgReturn] = [{'name': 'objects', 'type': 'array', 'description': "A list of objects that are around the specified object, each object contains object_id (the unique identifier of the object), object_name (the name of the object), object_location (the description of the object location, e.g., 'on the table'), description (the description of the object), and can_be_grabbed (a boolean indicating whether the robot can grab the object)."}]
exceptions: List[ArgException] = [{'name': 'NotFoundException', 'description': "The 'object_id' parameter does not exist in the current room."}]
|
class IndoorRobotGetAllowedOperations(VirtualFunctionTool):
name = 'IndoorRobotGetAllowedOperations'
summary = 'Get allowed operations on a specific target object, optionally using the grabbed objects for interaction. The allowed operations include grabbing, placing, and interacting with the target object. The grabbed objects can be used as tools to interact with the target object, for example, using a knife (grabbed object) to cut an organe (target object). The allowed operations must exclusively be applied on the target object instead of other objects in the room. The allowed operations must be retrieved before applying any allowed operation.'
parameters: List[ArgParameter] = [{'name': 'target_object_id', 'type': 'string', 'description': 'The unique identifier of the target object.', 'required': True}, {'name': 'interact_grabbed_object_ids', 'type': 'array', 'description': 'A list of unique identifiers of the grabbed objects that will be used to interact with the target object.', 'required': False}]
returns: List[ArgReturn] = [{'name': 'allowed_operations', 'type': 'array', 'description': "This parameter refers to an array of objects, each representing an allowed operation on the specifed target object. Each object includes the following properties: 'operation_id' (str) which is a unique identifier for the operation, 'arguments' (object) that denotes the available arguments for the operation along with their valid values or constraints, 'description' (str) that provides an in-depth explanation of the operation's functionality, and 'potential_side_effects' (array) each containing an object with fields 'effect' (str, the potential side effect) and 'probability' (number, the estimated possibility of the side effect occuring on a scale from 0-1)."}]
exceptions: List[ArgException] = [{'name': 'NotFoundException', 'description': "The 'target_object_id' does not exist in the current room."}, {'name': 'InvalidRequestException', 'description': "Any of the 'interact_grabbed_object_ids' parameters do not exist in the grabbed objects."}]
|
class IndoorRobotApplyAllowedOperation(VirtualFunctionTool):
name = 'IndoorRobotApplyAllowedOperation'
summary = 'Apply an allowed operation on a specific target object, optionally using the grabbed objects as tools for interaction. The allowed operations must be retrieved using the GetAllowedOperations tool before applying any allowed operation.'
parameters: List[ArgParameter] = [{'name': 'target_object_id', 'type': 'string', 'description': 'The unique identifier of the target object on which the operation should be applied.', 'required': True}, {'name': 'operation_id', 'type': 'string', 'description': 'The unique identifier of the operation to be applied. The unique identifier must be retrieved using the GetAllowedOperations tool.', 'required': True}, {'name': 'arguments', 'type': 'object', 'description': 'A dictionary of arguments for the operation. The arguments must match the arguments retrieved using the GetAllowedOperations tool.', 'required': False}]
returns: List[ArgReturn] = [{'name': 'message', 'type': 'string', 'description': 'A message describing the result of the operation, including the other side effects occurred during the operation. If the operation is failed, the message will indicate the reason why the operation is failed.'}, {'name': 'updated_grabbed_objects', 'type': 'array', 'description': 'A list of objects containing information about the objects grabbed by the robot, including details like object_id (the unique identifier of the object), object_name (the name of the object), and description (the description of the object).'}]
exceptions: List[ArgException] = [{'name': 'NotFoundException', 'description': "The 'target_object_id' does not exist, or the 'operation_id' does not exist."}, {'name': 'InvalidRequestException', 'description': 'The operation is not valid for the given arguments.'}]
|
class IndoorRobotFindPeople(VirtualFunctionTool):
name = 'IndoorRobotFindPeople'
summary = 'Let the robot find people in the current room based on a query. When the robot cannot find any people that match the query, it will return an empty list.'
parameters: List[ArgParameter] = [{'name': 'query', 'type': 'string', 'description': 'The query to find people in the current room. The query can be a name or a description of the person. If not provided, the robot will find all people in the current room.', 'required': True}]
returns: List[ArgReturn] = [{'name': 'found_people', 'type': 'array', 'description': "A list of objects containing information about the people that match the query. Each object includes details like person_id (the unique identifier of the person), person_name (the name of the person, should be 'unknown' if the person is not in identified), person_location (the description of the person location, composed of relative position words like 'on', 'inside', 'left of', 'near', etc., and the relative object id, e.g., 'near table_1'), and description (the description of the person, e.g., the person's appearance)."}]
exceptions: List[ArgException] = []
|
class IndoorRobotHandObjectsToPerson(VirtualFunctionTool):
name = 'IndoorRobotHandObjectsToPerson'
summary = 'Let the robot hand a subset of the grabbed objects to a person.'
parameters: List[ArgParameter] = [{'name': 'object_ids', 'type': 'array', 'description': 'A list of unique identifiers of the objects to be handed to the user. Must be the ids of the grabbed objects.', 'required': True}, {'name': 'person_id', 'type': 'string', 'description': 'The unique identifier of the person to whom the objects should be handed. Must be the id of a person in the current room, returned by the FindPeople tool.', 'required': True}]
returns: List[ArgReturn] = [{'name': 'message', 'type': 'string', 'description': 'A message describing the result of the operation. If the operation is failed, the message will indicate the reason why the operation is failed.'}, {'name': 'updated_grabbed_objects', 'type': 'array', 'description': 'A list of objects containing information about the objects grabbed by the robot, including details like object_id (the unique identifier of the object), object_name (the name of the object), and description (the description of the object).'}]
exceptions: List[ArgException] = [{'name': 'NotFoundException', 'description': "Any of the 'object_ids' parameters do not exist in the grabbed objects, or the 'person_id' parameter does not exist."}]
|
@register_toolkit()
class IndoorRobot(FunctionToolkit):
name_for_human = 'Indoor Robot'
description_for_human = 'Toolkit for controlling an indoor robot to perform indoor tasks.'
name_for_model = 'IndoorRobot'
description_for_model = 'A toolkit for controlling an indoor robot to perform a range of tasks in the physical world by navigating through rooms, identifying and manipulating objects, and operating on objects. The robot is able to handle tasks from basic object manipulation to advanced operations such as turning devices on and off, cutting vegetables, pouring a drink, and using tools. The maximum number of objects that the robot can grab at the same time is 5.'
tool_classes = [IndoorRobotGetCurrentState, IndoorRobotListRooms, IndoorRobotGoToRoom, IndoorRobotFindObjects, IndoorRobotLookAroundObject, IndoorRobotGetAllowedOperations, IndoorRobotApplyAllowedOperation, IndoorRobotFindPeople, IndoorRobotHandObjectsToPerson]
|
class EmergencyDispatchSystemCreateDispatchRequest(VirtualFunctionTool):
name = 'EmergencyDispatchSystemCreateDispatchRequest'
summary = 'Create an active new emergency dispatch request with available resources.'
parameters: List[ArgParameter] = [{'name': 'incident_location', 'type': 'string', 'description': 'The location of the incident in the street address format.', 'required': True}, {'name': 'resource_ids', 'type': 'array', 'description': 'List of unique identifiers for the dispatch resources to be dispatched.', 'required': True}, {'name': 'incident_type', 'type': 'string', 'description': "The primary type of the incident, one of ['Fire', 'Medical', 'Police'].", 'required': True}, {'name': 'incident_severity', 'type': 'string', 'description': "The severity of the incident, one of ['Low', 'Medium', 'High'].", 'required': True}, {'name': 'incident_description', 'type': 'string', 'description': 'A brief description of the incident.', 'required': True}]
returns: List[ArgReturn] = [{'name': 'incident_id', 'type': 'string', 'description': 'The unique identifier of the created dispatch request.'}]
exceptions: List[ArgException] = [{'name': 'InvalidRequestException', 'description': "The 'incident_type' parameter is not one of ['Fire', 'Medical', 'Police'], or the 'incident_severity' parameter is not one of ['Low', 'Medium', 'High'], or if the 'incident_location' is invalid, or at least one resource represented by 'resource_id' is 'Unavailable' or 'Dispatched'."}, {'name': 'NotFoundException', 'description': "At least one 'resource_id' from the 'resource_ids' does not exist."}]
|
class EmergencyDispatchSystemRedirectDispatchResources(VirtualFunctionTool):
name = 'EmergencyDispatchSystemRedirectDispatchResources'
summary = 'Redirect a specific dispatch resources to an already existing incident or a new location. If the location is provided, a new incident will be created and the dispatch resources will be redirected to the new incident.'
parameters: List[ArgParameter] = [{'name': 'resource_ids', 'type': 'array', 'description': 'List of unique identifiers for the dispatch resources to be redirected.', 'required': True}, {'name': 'target_type', 'type': 'string', 'description': "The type of the target location, one of ['Incident', 'Location']."}, {'name': 'incident_id_or_new_location', 'type': 'string', 'description': "If 'target_type' is 'Incident', it is 'incident_id' of the incident to which the dispatch resources should be redirected. If 'target_type' is 'Location', it is the 'new_location' to which the dispatch resources should be redirected, in the street address format."}]
returns: List[ArgReturn] = [{'name': 'redirect_result', 'type': 'object', 'description': "An object containing a boolean 'success' field indicating whether the redirection was successful. If the 'target_type' is 'Location', the object also contains a 'incident_id' field indicating the unique identifier of the incident that was created as a result of the redirection."}]
exceptions: List[ArgException] = [{'name': 'InvalidRequestException', 'description': "The 'resource_ids' is not provided, or 'target_type' is not one of ['Incident', 'Location'], or the 'new_location' is invalid if 'target_type' is 'Location', the resource is Unavailable."}, {'name': 'NotFoundException', 'description': "The 'resource_ids' does not exist, or the 'incident_id' does not exist if 'target_type' is 'Incident'."}]
|
class EmergencyDispatchSystemEstimateDispatchTime(VirtualFunctionTool):
name = 'EmergencyDispatchSystemEstimateDispatchTime'
summary = 'Estimate the dispatch time for a specific dispatch resource to reach a specified location.'
parameters: List[ArgParameter] = [{'name': 'resource_id', 'type': 'string', 'description': 'The unique identifier of the dispatch resource.', 'required': True}, {'name': 'destination_location', 'type': 'string', 'description': 'The destination location for the dispatch resource, in the street address format.', 'required': True}]
returns: List[ArgReturn] = [{'name': 'estimated_time', 'type': 'string', 'description': "The estimated dispatch time in the format 'HH:mm:ss'."}]
exceptions: List[ArgException] = [{'name': 'InvalidRequestException', 'description': "The 'resource_id' or 'destination_location' is not provided or invalid."}]
|
class EmergencyDispatchSystemFindNearbyResources(VirtualFunctionTool):
name = 'EmergencyDispatchSystemFindNearbyResources'
summary = 'Find nearby dispatch resources based on a specified location and resource type.'
parameters: List[ArgParameter] = [{'name': 'location', 'type': 'string', 'description': 'The location to find nearby dispatch resources, in the street address format.', 'required': True}, {'name': 'resource_type', 'type': 'string', 'description': "The type of the dispatch resources to find, one of ['Fire', 'Medical', 'Police']. If not provided, all types of dispatch resources will be considered.", 'required': False}, {'name': 'max_results', 'type': 'integer', 'description': 'The maximum number of results to return. Default is 10.', 'required': False}]
returns: List[ArgReturn] = [{'name': 'nearby_resources', 'type': 'array', 'description': "An array of objects for nearby dispatch resources, each object contains 'resource_id', 'resource_type' (one of ['Fire', 'Medical', 'Police']), 'resource_location', 'resource_status' (one of ['Available', 'Dispatched', 'Unavailable']), 'incident_id' (the unique identifier of the incident this resource is dispatched to, only included if the resource is Dispatched), 'distance_to_location' (unit miles)."}]
exceptions: List[ArgException] = [{'name': 'InvalidRequestException', 'description': "The 'resource_type' parameter is not one of ['Fire', 'Medical', 'Police'], or if the 'location' is not provided or invalid."}]
|
class EmergencyDispatchSystemGetIncidentData(VirtualFunctionTool):
name = 'EmergencyDispatchSystemGetIncidentData'
summary = 'Retrieve incident data for a specified incident.'
parameters: List[ArgParameter] = [{'name': 'incident_id', 'type': 'string', 'description': 'The unique identifier of the incident to retrieve data for.', 'required': True}]
returns: List[ArgReturn] = [{'name': 'incident_data', 'type': 'object', 'description': "The incident data for the specified incident, contains 'incident_id', 'incident_type' (one of ['Fire', 'Medical', 'Police']), 'incident_location', 'incident_severity' (one of ['Low', 'Medium', 'High']), 'incident_status' (one of ['Active', 'Closed']), 'dispatch_resource_ids', 'dispatch_time', 'incident_description'."}]
exceptions: List[ArgException] = [{'name': 'InvalidRequestException', 'description': "The 'incident_id' is not provided or invalid."}, {'name': 'NotFoundException', 'description': "The 'incident_id' does not exist."}]
|
class EmergencyDispatchSystemGetResourceData(VirtualFunctionTool):
name = 'EmergencyDispatchSystemGetResourceData'
summary = 'Retrieve data for a specified dispatch resource.'
parameters: List[ArgParameter] = [{'name': 'resource_id', 'type': 'string', 'description': 'The unique identifier of the dispatch resource to retrieve data for.', 'required': True}]
returns: List[ArgReturn] = [{'name': 'resource_data', 'type': 'object', 'description': "The data for the specified dispatch resource, contains 'resource_id', 'resource_type' (one of ['Fire', 'Medical', 'Police']), 'resource_location', 'resource_status' (one of ['Available', 'Dispatched', 'Unavailable']), 'incident_id' (the unique identifier of the incident this resource is dispatched to, null if not dispatched)."}]
exceptions: List[ArgException] = [{'name': 'InvalidRequestException', 'description': "The 'resource_id' is not provided or invalid."}, {'name': 'NotFoundException', 'description': "The 'resource_id' does not exist."}]
|
class EmergencyDispatchSystemEditIncident(VirtualFunctionTool):
name = 'EmergencyDispatchSystemEditIncident'
summary = 'Edit the data for a specified incident. This function should be used to assign new resources to an incident unless they have already been notified; it will NOT notify them of the assignment.'
parameters: List[ArgParameter] = [{'name': 'incident_id', 'type': 'string', 'description': 'The unique identifier of the incident to edit.', 'required': True}, {'name': 'incident_type', 'type': 'string', 'description': "If provided, the new type of the incident, one of ['Fire', 'Medical', 'Police'].", 'required': False}, {'name': 'incident_severity', 'type': 'string', 'description': "If provided, the new severity of the incident, one of ['Low', 'Medium', 'High'].", 'required': False}, {'name': 'incident_description', 'type': 'string', 'description': 'If provided, the new description of the incident.', 'required': False}, {'name': 'incident_status', 'type': 'string', 'description': "If provided, the new status of the incident, one of ['Active', 'Closed'].", 'required': False}, {'name': 'resource_ids', 'type': 'array', 'description': 'If provided, the new list of unique identifiers for the dispatch resources assigned to this incident.', 'required': False}]
returns: List[ArgReturn] = [{'name': 'edit_status', 'type': 'boolean', 'description': 'The success status of the edit operation.'}]
exceptions: List[ArgException] = [{'name': 'InvalidRequestException', 'description': "The 'incident_id' is not provided or invalid."}, {'name': 'NotFoundException', 'description': "The 'incident_id' does not exist."}]
|
class EmergencyDispatchSystemSearchIncidents(VirtualFunctionTool):
name = 'EmergencyDispatchSystemSearchIncidents'
summary = 'Search for incidents based on a specified location and incident type.'
parameters: List[ArgParameter] = [{'name': 'location', 'type': 'string', 'description': 'The location to search for incidents, in the street address format.', 'required': True}, {'name': 'incident_type', 'type': 'string', 'description': "The type of the incidents to search for, one of ['Fire', 'Medical', 'Police']. If not provided, all types of incidents will be considered.", 'required': False}, {'name': 'severity', 'type': 'string', 'description': "The severity of the incidents to search for, one of ['Low', 'Medium', 'High']. If not provided, all severities of incidents will be considered.", 'required': False}, {'name': 'incident_status', 'type': 'string', 'description': "If provided, the new status of the incident, one of ['Active', 'Closed'].", 'required': False}, {'name': 'max_results', 'type': 'integer', 'description': 'The maximum number of results to return. Default is 10.', 'required': False}]
returns: List[ArgReturn] = [{'name': 'incidents', 'type': 'array', 'description': "An array of incidents that match the search criteria, each object contains 'incident_id', 'incident_type' (one of ['Fire', 'Medical', 'Police']), 'incident_location', 'incident_severity' (one of ['Low', 'Medium', 'High']), 'incident_status' (one of ['Active', 'Closed']), 'dispatch_resource_ids', 'dispatch_time', 'incident_description'."}]
exceptions: List[ArgException] = [{'name': 'InvalidRequestException', 'description': "The 'incident_type' parameter is not one of ['Fire', 'Medical', 'Police'], or if the 'severity' parameter is not one of ['Low', 'Medium', 'High'], or if the 'location' is invalid."}]
|
@register_toolkit()
class EmergencyDispatchSystem(FunctionToolkit):
name_for_human = 'Emergency Dispatch System'
description_for_human = 'Toolkit for handling emergency dispatch requests from 911 operators.'
name_for_model = 'EmergencyDispatchSystem'
description_for_model = 'The EmergencyDispatchSystem is designed to handle emergency dispatch requests from 911 operators, targeted towards emergency dispatch centers and public safety organizations in a certain city. It provides functionalities to create dispatch requests, redirect specific dispatch resources, estimate dispatch times, find nearby resources (police, fire, medical, etc.), and issue general calls for dispatch resources. It also allows for retrieval and editing of incident data, as well as retrieval of resource data.'
tool_classes = [EmergencyDispatchSystemCreateDispatchRequest, EmergencyDispatchSystemRedirectDispatchResources, EmergencyDispatchSystemEstimateDispatchTime, EmergencyDispatchSystemFindNearbyResources, EmergencyDispatchSystemGetIncidentData, EmergencyDispatchSystemGetResourceData, EmergencyDispatchSystemEditIncident, EmergencyDispatchSystemSearchIncidents]
|
class EthereumManagerDeploySmartContract(VirtualFunctionTool):
name = 'EthereumManagerDeploySmartContract'
summary = 'Deploy a new smart contract on the Ethereum blockchain.'
parameters: List[ArgParameter] = [{'name': 'contract_bytecode', 'type': 'string', 'description': 'The bytecode for the smart contract.', 'required': True}, {'name': 'constructor_args', 'type': 'array', 'description': 'An array of arguments for the smart contract constructor.', 'required': True}, {'name': 'gas_limit', 'type': 'integer', 'description': 'The maximum amount of gas to be used for the deployment. Optional.', 'required': False}]
returns: List[ArgReturn] = [{'name': 'contract_address', 'type': 'string', 'description': 'The Ethereum address of the deployed smart contract.'}, {'name': 'transaction_hash', 'type': 'string', 'description': 'The hash of the transaction used to deploy the smart contract.'}]
exceptions: List[ArgException] = [{'name': 'InvalidRequestException', 'description': 'The contract bytecode or constructor arguments are invalid.'}, {'name': 'ConflictException', 'description': 'A contract with the same address already exists.'}]
|
class EthereumManagerCallSmartContractFunction(VirtualFunctionTool):
name = 'EthereumManagerCallSmartContractFunction'
summary = 'Interact with a deployed smart contract by calling one of its functions.'
parameters: List[ArgParameter] = [{'name': 'contract_address', 'type': 'string', 'description': 'The Ethereum address of the deployed smart contract.', 'required': True}, {'name': 'function_name', 'type': 'string', 'description': 'The name of the function to call.', 'required': True}, {'name': 'function_args', 'type': 'array', 'description': 'An array of arguments for the function call.', 'required': True}, {'name': 'value', 'type': 'string', 'description': 'The amount of Ether to send with the function call. Optional (defaults to 0).', 'required': False}, {'name': 'gas_limit', 'type': 'integer', 'description': 'The maximum amount of gas to be used for the function call. Optional.', 'required': False}]
returns: List[ArgReturn] = [{'name': 'return_value', 'type': 'string', 'description': 'The return value of the function call.'}, {'name': 'transaction_hash', 'type': 'string', 'description': 'The hash of the transaction used to call the function (if applicable).'}]
exceptions: List[ArgException] = [{'name': 'InvalidRequestException', 'description': 'The contract address, function name, or function arguments are invalid.'}, {'name': 'NotFoundException', 'description': 'The contract does not exist.'}]
|
class EthereumManagerTransferEther(VirtualFunctionTool):
name = 'EthereumManagerTransferEther'
summary = 'Transfer Ether between Ethereum accounts.'
parameters: List[ArgParameter] = [{'name': 'from_address', 'type': 'string', 'description': 'The Ethereum address of the sender.', 'required': True}, {'name': 'to_address', 'type': 'string', 'description': 'The Ethereum address of the recipient.', 'required': True}, {'name': 'amount_ether', 'type': 'number', 'description': 'The amount of Ether to transfer.', 'required': True}, {'name': 'gas_limit', 'type': 'integer', 'description': 'The maximum amount of gas to be used for the transfer. Optional.', 'required': False}]
returns: List[ArgReturn] = [{'name': 'transaction_hash', 'type': 'string', 'description': 'The hash of the transaction used to transfer the Ether.'}]
exceptions: List[ArgException] = [{'name': 'InvalidRequestException', 'description': 'The from_address, to_address, or amount_ether are invalid.'}, {'name': 'NotFoundException', 'description': 'The from_address or to_address does not exist.'}]
|
class EthereumManagerCreateEthereumAccount(VirtualFunctionTool):
name = 'EthereumManagerCreateEthereumAccount'
summary = 'Create a new Ethereum account with a private key.'
parameters: List[ArgParameter] = []
returns: List[ArgReturn] = [{'name': 'account_address', 'type': 'string', 'description': 'The Ethereum address of the created account.'}, {'name': 'private_key', 'type': 'string', 'description': 'The private key for the created account.'}]
exceptions: List[ArgException] = []
|
class EthereumManagerImportEthereumAccount(VirtualFunctionTool):
name = 'EthereumManagerImportEthereumAccount'
summary = 'Import an existing Ethereum account using its private key.'
parameters: List[ArgParameter] = [{'name': 'private_key', 'type': 'string', 'description': 'The private key of the existing Ethereum account.', 'required': True}]
returns: List[ArgReturn] = [{'name': 'account_address', 'type': 'string', 'description': 'The Ethereum address of the imported account.'}]
exceptions: List[ArgException] = [{'name': 'InvalidRequestException', 'description': 'The private key is invalid.'}]
|
class EthereumManagerEstimateGasCost(VirtualFunctionTool):
name = 'EthereumManagerEstimateGasCost'
summary = 'Estimate the gas cost for a smart contract function call.'
parameters: List[ArgParameter] = [{'name': 'contract_address', 'type': 'string', 'description': 'The Ethereum address of the deployed smart contract.', 'required': True}, {'name': 'function_name', 'type': 'string', 'description': 'The name of the function to call.', 'required': True}, {'name': 'function_args', 'type': 'array', 'description': 'An array of arguments for the function call.', 'required': True}]
returns: List[ArgReturn] = [{'name': 'gas_estimate', 'type': 'integer', 'description': 'The estimated gas cost for the function call.'}]
exceptions: List[ArgException] = [{'name': 'InvalidRequestException', 'description': 'The contract address, function name, or function arguments are invalid.'}, {'name': 'NotFoundException', 'description': 'The contract does not exist.'}]
|
class EthereumManagerCompileSolidity(VirtualFunctionTool):
name = 'EthereumManagerCompileSolidity'
summary = 'Compile Solidity code into bytecode.'
parameters: List[ArgParameter] = [{'name': 'contract_code', 'type': 'string', 'description': 'The Solidity code for the smart contract.', 'required': True}]
returns: List[ArgReturn] = [{'name': 'bytecode', 'type': 'string', 'description': 'The compiled bytecode of the Solidity code.'}]
exceptions: List[ArgException] = [{'name': 'InvalidRequestException', 'description': 'The contract code is invalid.'}]
|
class EthereumManagerSignMessage(VirtualFunctionTool):
name = 'EthereumManagerSignMessage'
summary = "Sign a message using an Ethereum account's private key."
parameters: List[ArgParameter] = [{'name': 'message', 'type': 'string', 'description': 'The message to be signed.', 'required': True}, {'name': 'private_key', 'type': 'string', 'description': 'The private key of the Ethereum account.', 'required': True}]
returns: List[ArgReturn] = [{'name': 'signature', 'type': 'string', 'description': 'The signature of the message.'}]
exceptions: List[ArgException] = [{'name': 'InvalidRequestException', 'description': 'The message or private key are invalid.'}]
|
class EthereumManagerVerifyMessage(VirtualFunctionTool):
name = 'EthereumManagerVerifyMessage'
summary = "Verify a signed message using the Ethereum account's address."
parameters: List[ArgParameter] = [{'name': 'message', 'type': 'string', 'description': 'The message to be verified.', 'required': True}, {'name': 'signature', 'type': 'string', 'description': 'The signature of the message.', 'required': True}, {'name': 'account_address', 'type': 'string', 'description': 'The Ethereum address of the account.', 'required': True}]
returns: List[ArgReturn] = [{'name': 'is_valid', 'type': 'boolean', 'description': 'Whether the signature is valid for the given message and account address.'}]
exceptions: List[ArgException] = [{'name': 'InvalidRequestException', 'description': 'The message, signature, or account_address are invalid.'}, {'name': 'NotFoundException', 'description': 'The account_address does not exist.'}]
|
class EthereumManagerQueryEthereumData(VirtualFunctionTool):
name = 'EthereumManagerQueryEthereumData'
summary = 'Query Ethereum blockchain data, including account and contract addresses, account balances, and transaction information.'
parameters: List[ArgParameter] = [{'name': 'query_type', 'type': 'string', 'description': "The type of data to query; should be one of ['addresses' (includes contract addresses), 'address info', or 'transaction hash']. Addresses may be searched using a prefix or contract name, which may return multiple addresses. Address info and transaction hashes must be queried using an exact address or hash.", 'required': True}, {'name': 'query_value', 'type': 'string', 'description': 'The value to query (e.g., address or transaction hash).', 'required': True}]
returns: List[ArgReturn] = [{'name': 'query_result', 'type': 'string', 'description': 'The result of the query in a human-readable format. Will be either a list of addresses, address info (including a balance, in wei, for EOAs, or contract info for contracts), or transaction information (including any events emitted and whether it was successful / confirmed).'}]
exceptions: List[ArgException] = [{'name': 'InvalidRequestException', 'description': 'The query_type or query_value are invalid.'}, {'name': 'NotFoundException', 'description': 'The queried data does not exist.'}]
|
@register_toolkit()
class EthereumManager(FunctionToolkit):
name_for_human = 'Ethereum Manager'
description_for_human = 'Toolkit for interacting with the Ethereum blockchain.'
name_for_model = 'EthereumManager'
description_for_model = 'A toolkit for interacting with the Ethereum blockchain, allowing users to create and manage Ethereum accounts, deploy and interact with smart contracts, transfer Ether, and query blockchain data. It also provides tools for compiling Solidity code, estimating gas costs, and signing and verifying messages.'
tool_classes = [EthereumManagerDeploySmartContract, EthereumManagerCallSmartContractFunction, EthereumManagerTransferEther, EthereumManagerCreateEthereumAccount, EthereumManagerImportEthereumAccount, EthereumManagerEstimateGasCost, EthereumManagerCompileSolidity, EthereumManagerSignMessage, EthereumManagerVerifyMessage, EthereumManagerQueryEthereumData]
|
class BinanceGetAccountBalances(VirtualFunctionTool):
name = 'BinanceGetAccountBalances'
summary = "Retrieve the user's account balances for various cryptocurrencies."
parameters: List[ArgParameter] = []
returns: List[ArgReturn] = [{'name': 'balances', 'type': 'array', 'description': "An array of objects containing 'currency' (string, one of ['USD', 'BTC', 'ETH', etc.]) and 'available_balance' (number)."}]
exceptions: List[ArgException] = []
|
class BinanceRetrieveAccounts(VirtualFunctionTool):
name = 'BinanceRetrieveAccounts'
summary = "Retrieves user's saved bank accounts for fiat deposits."
parameters: List[ArgParameter] = []
returns: List[ArgReturn] = [{'name': 'accounts', 'type': 'array', 'description': "An array of object containing 'account_id' (string), 'account_number' (string), 'bank_name' (string), and 'account_type' (string, one of ['checking', 'savings']), representing the user's saved bank accounts."}]
exceptions: List[ArgException] = []
|
class BinanceDeposit(VirtualFunctionTool):
name = 'BinanceDeposit'
summary = "Deposit a specified amount of fiat money to the user's saved account. The account id must be retrieved using the RetrieveAccounts tool."
parameters: List[ArgParameter] = [{'name': 'currency', 'type': 'string', 'description': "The currency to deposit, one of ['USD', 'EUR', 'GBP', etc.].", 'required': True}, {'name': 'amount', 'type': 'number', 'description': 'The amount of fiat money to deposit.', 'required': True}, {'name': 'from_account_id', 'type': 'string', 'description': "The user's saved bank account id to deposit funds from.", 'required': True}]
returns: List[ArgReturn] = [{'name': 'transaction_id', 'type': 'string', 'description': 'The unique identifier of the deposit transaction.'}, {'name': 'status', 'type': 'string', 'description': 'The status of the deposit transaction.'}]
exceptions: List[ArgException] = [{'name': 'InvalidRequestException', 'description': 'The currency is malformed or empty, or the amount is invalid.'}, {'name': 'NotFoundException', 'description': 'The from_account_id does not exist.'}]
|
class BinanceWithdraw(VirtualFunctionTool):
name = 'BinanceWithdraw'
summary = "Withdraw a specified amount of cryptocurrency or fiat money to a specified destination address or bank account from user's account. The bank account id must be retrieved using the RetrieveAccounts tool."
parameters: List[ArgParameter] = [{'name': 'currency', 'type': 'string', 'description': "The currency to withdraw, one of ['USD', 'BTC', 'ETH', etc.].", 'required': True}, {'name': 'amount', 'type': 'number', 'description': 'The amount of cryptocurrency to withdraw.', 'required': True}, {'name': 'destination_address', 'type': 'string', 'description': 'The suitable blockchain address for withdrawing the cryptocurrency, which must be a complete and valid legacy Bitcoin address or SegWit address.', 'required': False}, {'name': 'to_account_id', 'type': 'string', 'description': "The user's saved bank account id to withdraw fiat money to.", 'required': False}]
returns: List[ArgReturn] = [{'name': 'transaction_id', 'type': 'string', 'description': 'The unique identifier of the withdrawal transaction.'}, {'name': 'status', 'type': 'string', 'description': 'The status of the withdrawal transaction.'}]
exceptions: List[ArgException] = [{'name': 'InvalidRequestException', 'description': 'The currency is malformed or empty, or the amount is not positive, the destination_address is incomplete, or the destination_address is not a valid Bitcoin address or SegWit address.'}, {'name': 'NotFoundException', 'description': 'The to_account_id does not exist.'}]
|
class BinancePlaceOrder(VirtualFunctionTool):
name = 'BinancePlaceOrder'
summary = 'Place a buy or sell order for a specified cryptocurrency pair.'
parameters: List[ArgParameter] = [{'name': 'pair', 'type': 'string', 'description': "The cryptocurrency pair to trade, for example, 'BTCUSD', 'USDBTC', 'ETHUSD', etc. The first currency in the pair is the base currency, and the second currency is the quote currency.", 'required': True}, {'name': 'order_type', 'type': 'string', 'description': "The order type, one of ['limit', 'market']. 'limit' orders are executed at a specified price or better, while 'market' orders are executed at the best available price.", 'required': True}, {'name': 'side', 'type': 'string', 'description': "The side of the trade, one of ['buy', 'sell'].", 'required': True}, {'name': 'quantity', 'type': 'number', 'description': 'The quantity of the cryptocurrency to trade.', 'required': True}, {'name': 'price', 'type': 'number', 'description': 'The price of the cryptocurrency to trade, optional for market orders.', 'required': False}]
returns: List[ArgReturn] = [{'name': 'order_id', 'type': 'string', 'description': 'The unique identifier of the placed order.'}, {'name': 'status', 'type': 'string', 'description': 'The status of the placed order.'}]
exceptions: List[ArgException] = [{'name': 'InvalidRequestException', 'description': "The 'pair' is not valid, or the 'order_type' or 'side' are not one of the specified values, or the 'quantity' or 'price' are invalid."}]
|
class BinanceModifyOrder(VirtualFunctionTool):
name = 'BinanceModifyOrder'
summary = 'Modify an existing order by changing its price or quantity.'
parameters: List[ArgParameter] = [{'name': 'order_id', 'type': 'string', 'description': 'The unique identifier of the order to modify.', 'required': True}, {'name': 'new_price', 'type': 'number', 'description': 'The new price of the order.', 'required': True}, {'name': 'new_quantity', 'type': 'number', 'description': 'The new quantity of the order.', 'required': True}]
returns: List[ArgReturn] = [{'name': 'modified_order_id', 'type': 'string', 'description': 'The unique identifier of the modified order.'}, {'name': 'status', 'type': 'string', 'description': 'The status of the modified order.'}]
exceptions: List[ArgException] = [{'name': 'InvalidRequestException', 'description': "The 'new_price' or 'new_quantity' are invalid."}, {'name': 'NotFoundException', 'description': 'The specified order_id does not exist.'}]
|
class BinanceCancelOrder(VirtualFunctionTool):
name = 'BinanceCancelOrder'
summary = 'Cancel an existing order.'
parameters: List[ArgParameter] = [{'name': 'order_id', 'type': 'string', 'description': 'The unique identifier of the order to cancel.', 'required': True}]
returns: List[ArgReturn] = [{'name': 'status', 'type': 'string', 'description': 'The status of the canceled order.'}]
exceptions: List[ArgException] = [{'name': 'NotFoundException', 'description': 'The specified order_id does not exist.'}]
|
class BinanceGetRealTimePrice(VirtualFunctionTool):
name = 'BinanceGetRealTimePrice'
summary = 'Retrieve real-time price information for a specified cryptocurrency pair.'
parameters: List[ArgParameter] = [{'name': 'pair', 'type': 'string', 'description': "The cryptocurrency pair to retrieve real-time price information for, for example, 'BTCUSD', 'USDBTC', 'ETHUSD', etc.", 'required': True}]
returns: List[ArgReturn] = [{'name': 'price', 'type': 'number', 'description': 'Price of first currency in a pair in units of the second currency.'}]
exceptions: List[ArgException] = [{'name': 'InvalidRequestException', 'description': "The 'pair' is not valid."}]
|
class BinanceGetOrderHistory(VirtualFunctionTool):
name = 'BinanceGetOrderHistory'
summary = "Retrieve the user's order history for a specified date range and cryptocurrency pair."
parameters: List[ArgParameter] = [{'name': 'date_range', 'type': 'array', 'description': "An array containing the start and end dates of the date range, in the format 'YYYY-MM-DD'.", 'required': True}, {'name': 'pair', 'type': 'string', 'description': "The cryptocurrency pair to retrieve order history for, for example, 'BTCUSD', 'USDBTC', 'ETHUSD', etc. If not provided, retrieve order history for all pairs.", 'required': False}]
returns: List[ArgReturn] = [{'name': 'orders', 'type': 'array', 'description': "An array of objects containing 'order_id' (string), 'pair' (string), 'side' (string), 'order_type' (string), 'price' (number), 'quantity' (number), 'timestamp' (string), and 'status' (string)."}]
exceptions: List[ArgException] = [{'name': 'InvalidRequestException', 'description': "The 'date_range' is invalid, or the 'pair' is not valid."}]
|
class BinanceGetTradeHistory(VirtualFunctionTool):
name = 'BinanceGetTradeHistory'
summary = "Retrieve the user's trade history for a specified date range and cryptocurrency pair."
parameters: List[ArgParameter] = [{'name': 'date_range', 'type': 'array', 'description': "An array containing the start and end dates of the date range, in the format 'YYYY-MM-DD'.", 'required': True}, {'name': 'pair', 'type': 'string', 'description': "The cryptocurrency pair to retrieve trade history for, for example, 'BTCUSD', 'USDBTC', 'ETHUSD', etc.", 'required': True}]
returns: List[ArgReturn] = [{'name': 'trades', 'type': 'array', 'description': "An array of objects containing 'trade_id' (string), 'pair' (string), 'side' (string), 'price' (number), 'quantity' (number), and 'timestamp' (string, format 'YYYY-MM-DD HH:MM:SS')"}]
exceptions: List[ArgException] = [{'name': 'InvalidRequestException', 'description': "The 'date_range' is invalid, or the 'pair' is not valid."}]
|
@register_toolkit()
class Binance(FunctionToolkit):
name_for_human = 'Binance'
description_for_human = 'Toolkit for managing cryptocurrency trading activities on the Binance platform.'
name_for_model = 'Binance'
description_for_model = 'A toolkit for managing cryptocurrency trading activities on the Binance platform, including account management, placing and managing orders, accessing real-time price information, setting price alerts, and viewing order and trade history.'
tool_classes = [BinanceGetAccountBalances, BinanceRetrieveAccounts, BinanceDeposit, BinanceWithdraw, BinancePlaceOrder, BinanceModifyOrder, BinanceCancelOrder, BinanceGetRealTimePrice, BinanceGetOrderHistory, BinanceGetTradeHistory]
|
class ShopifySearchProducts(VirtualFunctionTool):
name = 'ShopifySearchProducts'
summary = 'Search for products by keywords or filters. If no products match the search query, return an empty list.'
parameters: List[ArgParameter] = [{'name': 'query', 'type': 'string', 'description': 'Keywords or filters to search for products.', 'required': True}, {'name': 'max_results', 'type': 'integer', 'description': 'Maximum number of results to return. Default is 5, maximum is 10.', 'required': False}]
returns: List[ArgReturn] = [{'name': 'products', 'type': 'array', 'description': 'List of products matching the search query, each is an object containing product_id (string), name (string) price (number, in USD) and description (string).'}]
exceptions: List[ArgException] = [{'name': 'InvalidRequestException', 'description': "The 'query' parameter is empty or the 'max_results' parameter is not an integer between 1 and 10."}]
|
class ShopifyGetProductDetails(VirtualFunctionTool):
name = 'ShopifyGetProductDetails'
summary = 'Retrieve product details by the product ID.'
parameters: List[ArgParameter] = [{'name': 'product_id', 'type': 'string', 'description': 'Unique identifier of the product.', 'required': True}]
returns: List[ArgReturn] = [{'name': 'name', 'type': 'string', 'description': 'Name of the product.'}, {'name': 'description', 'type': 'string', 'description': 'Description of the product.'}, {'name': 'price', 'type': 'number', 'description': 'Price of the product, in USD.'}, {'name': 'inventory', 'type': 'integer', 'description': 'Inventory of the product.'}, {'name': 'extra_details', 'type': 'object', 'description': 'Extra details of the product.'}]
exceptions: List[ArgException] = [{'name': 'NotFoundException', 'description': "The 'product_id' does not exist."}]
|
class ShopifyCreateProduct(VirtualFunctionTool):
name = 'ShopifyCreateProduct'
summary = 'Create a new product with the specified information.'
parameters: List[ArgParameter] = [{'name': 'name', 'type': 'string', 'description': 'Name of the product.', 'required': True}, {'name': 'description', 'type': 'string', 'description': 'Description of the product.', 'required': True}, {'name': 'price', 'type': 'number', 'description': 'Price of the product, in USD.', 'required': True}, {'name': 'inventory', 'type': 'integer', 'description': 'Inventory of the product.', 'required': True}, {'name': 'extra_details', 'type': 'object', 'description': 'Extra details of the product.', 'required': False}]
returns: List[ArgReturn] = [{'name': 'result', 'type': 'object', 'description': "Result of the product creation, including 'success' (boolean, indicates whether the product creation was successful) and 'product_id' (string, the unique identifier of the created product, if success is True)."}]
exceptions: List[ArgException] = [{'name': 'InvalidRequestException', 'description': "The 'price' or 'inventory' is negative."}]
|
class ShopifyUpdateProduct(VirtualFunctionTool):
name = 'ShopifyUpdateProduct'
summary = 'Update product information by the product ID.'
parameters: List[ArgParameter] = [{'name': 'product_id', 'type': 'string', 'description': 'Unique identifier of the product.', 'required': True}, {'name': 'name', 'type': 'string', 'description': 'New name of the product.', 'required': False}, {'name': 'description', 'type': 'string', 'description': 'New description of the product.', 'required': False}, {'name': 'price', 'type': 'number', 'description': 'New price of the product, in USD.', 'required': False}, {'name': 'inventory', 'type': 'integer', 'description': 'New inventory of the product.', 'required': False}, {'name': 'extra_details', 'type': 'object', 'description': 'New extra details of the product.', 'required': False}]
returns: List[ArgReturn] = [{'name': 'success', 'type': 'boolean', 'description': 'Indicates whether the product update was successful.'}]
exceptions: List[ArgException] = [{'name': 'InvalidRequestException', 'description': "The 'price' or 'inventory' is negative."}, {'name': 'NotFoundException', 'description': "The 'product_id' does not exist."}]
|
class ShopifyDeleteProduct(VirtualFunctionTool):
name = 'ShopifyDeleteProduct'
summary = 'Delete a product by the product ID.'
parameters: List[ArgParameter] = [{'name': 'product_id', 'type': 'string', 'description': 'Unique identifier of the product.', 'required': True}]
returns: List[ArgReturn] = [{'name': 'success', 'type': 'boolean', 'description': 'Indicates whether the product deletion was successful.'}]
exceptions: List[ArgException] = [{'name': 'NotFoundException', 'description': "The 'product_id' does not exist."}]
|
class ShopifySearchOrders(VirtualFunctionTool):
name = 'ShopifySearchOrders'
summary = 'Search for orders by keywords or filters. If no orders match the search query, return an empty list.'
parameters: List[ArgParameter] = [{'name': 'query', 'type': 'string', 'description': 'Keywords or filters to search for orders.', 'required': True}, {'name': 'max_results', 'type': 'integer', 'description': 'Maximum number of results to return. Default is 5, maximum is 10.', 'required': False}]
returns: List[ArgReturn] = [{'name': 'orders', 'type': 'array', 'description': "List of orders matching the search query, each is an object containing order_id (string), customer_username (string), items (array of objects, each contains item name, quantity and subtotal), total_price (number, in USD), and status (string, one of ['draft', 'open', 'pending', 'paid', 'fulfilled', 'cancelled', 'refunded'])."}]
exceptions: List[ArgException] = [{'name': 'InvalidRequestException', 'description': "The 'query' parameter is empty or the 'max_results' parameter is not an integer between 1 and 10."}]
|
class ShopifyGetOrderDetails(VirtualFunctionTool):
name = 'ShopifyGetOrderDetails'
summary = 'Retrieve order details by the order ID.'
parameters: List[ArgParameter] = [{'name': 'order_id', 'type': 'string', 'description': 'Unique identifier of the order.', 'required': True}]
returns: List[ArgReturn] = [{'name': 'customer_username', 'type': 'string', 'description': 'Username of the customer who placed the order.'}, {'name': 'items', 'type': 'array', 'description': 'List of items in the order, each is an object containing product_id (string), product_name (string), quantity (integer) and subtotal (number, in USD).'}, {'name': 'total_price', 'type': 'number', 'description': 'Total price of the order, in USD.'}, {'name': 'shipping_details', 'type': 'object', 'description': "Shipping details of the order, including shipping_address (string), shipping_method (string, one of ['USPS', 'UPS', 'FedEx', 'DHL', 'others']), and shipping_date (string, in the format 'YYYY-MM-DD')."}, {'name': 'status', 'type': 'string', 'description': "Status of the order that visible to the customer, one of ['draft', 'open', 'pending', 'paid', 'fulfilled', 'cancelled', 'refunded']."}]
exceptions: List[ArgException] = [{'name': 'NotFoundException', 'description': "The 'order_id' does not exist."}]
|
class ShopifyDraftOrder(VirtualFunctionTool):
name = 'ShopifyDraftOrder'
summary = "Draft a new order for a customer to review before payment. The drafted order would be in the 'draft' status."
parameters: List[ArgParameter] = [{'name': 'customer_username', 'type': 'string', 'description': 'Username of the customer who will review the order.', 'required': True}, {'name': 'items', 'type': 'array', 'description': 'List of items in the order, each is an object containing product_id (string), quantity (integer) and subtotal (number, in USD).', 'required': True}, {'name': 'total_price', 'type': 'number', 'description': 'Total price of the order, in USD.', 'required': True}, {'name': 'shipping_details', 'type': 'object', 'description': "Shipping details of the order, including shipping_address (string), shipping_method (string, one of ['USPS', 'UPS', 'FedEx', 'DHL', 'others']), and shipping_date (string, in the format 'YYYY-MM-DD').", 'required': True}]
returns: List[ArgReturn] = [{'name': 'result', 'type': 'object', 'description': "Result of the order creation, including 'success' (boolean, indicates whether the order creation was successful) and 'order_id' (string, the unique identifier of the created order, if success is True)."}]
exceptions: List[ArgException] = [{'name': 'InvalidRequestException', 'description': "The quantity of one of the 'items' is not positive, or the 'total_price' is negative, or the 'shipping_method' is not one of the specified options, or the 'shipping_date' is not in the correct format."}, {'name': 'NotFoundException', 'description': "The 'customer_username' does not exist, or one of the 'items' does not exist."}]
|
class ShopifyManageOrder(VirtualFunctionTool):
name = 'ShopifyManageOrder'
summary = "Manage an existing order by the order ID. The action can be 'update', 'fulfill', 'cancel', or 'refund'. For 'update', the order details can be changed, can only be performed on orders in 'draft', 'open', or 'pending' status. The 'fulfill' action applies on a 'paid' order and changes the status to 'fulfilled'. The 'cancel' action cannot be performed on a 'cancelled' or 'refunded' order. The 'refund' action applies on a 'fulfilled' order and changes the status to 'refunded'."
parameters: List[ArgParameter] = [{'name': 'order_id', 'type': 'string', 'description': 'Unique identifier of the order.', 'required': True}, {'name': 'action', 'type': 'string', 'description': "The action to perform on the order, one of ['update', 'fulfill', 'cancel', 'refund'].", 'required': True}, {'name': 'items', 'type': 'array', 'description': "List of items in the order, each is an object containing product_id (string), quantity (integer) and subtotal (number, in USD). Only allowed for 'update' action.", 'required': False}, {'name': 'total_price', 'type': 'number', 'description': "New total price of the order, in USD. Only allowed for 'update' action.", 'required': False}, {'name': 'shipping_details', 'type': 'object', 'description': "New shipping details of the order, including shipping_address (string), shipping_method (string, one of ['USPS', 'UPS', 'FedEx', 'DHL', 'others']), and shipping_date (string, in the format 'YYYY-MM-DD'). Only allowed for 'update' action.", 'required': False}]
returns: List[ArgReturn] = [{'name': 'success', 'type': 'boolean', 'description': 'Indicates whether the order management was successful.'}]
exceptions: List[ArgException] = [{'name': 'InvalidRequestException', 'description': "The action is not one of the specified options, the 'items', 'total_price', or 'shipping_details' parameter is provided for an action other than 'update', or the order is not in the correct status for the specified action, or the quantity of one of the 'items' is not positive, or the 'total_price' is negative, or the 'shipping_method' is not one of the specified options, or the 'shipping_date' is not in the correct format."}, {'name': 'NotFoundException', 'description': "The 'order_id' does not exist."}]
|
class ShopifySearchCustomers(VirtualFunctionTool):
name = 'ShopifySearchCustomers'
summary = 'Search for customers by keywords or filters. If no customers match the search query, return an empty list.'
parameters: List[ArgParameter] = [{'name': 'query', 'type': 'string', 'description': 'Keywords or filters to search for customers.', 'required': True}, {'name': 'max_results', 'type': 'integer', 'description': 'Maximum number of results to return. Default is not limited.', 'required': False}]
returns: List[ArgReturn] = [{'name': 'customers', 'type': 'array', 'description': 'List of customers matching the search query, each is an object containing username, fullname, email, and address.'}]
exceptions: List[ArgException] = [{'name': 'InvalidRequestException', 'description': "The 'query' parameter is empty or the 'max_results' parameter is not an integer between 1 and 10."}]
|
class ShopifyGetStoreAnalytics(VirtualFunctionTool):
name = 'ShopifyGetStoreAnalytics'
summary = 'Retrieve store analytics data, such as revenue, orders, and traffic.'
parameters: List[ArgParameter] = [{'name': 'start_date', 'type': 'string', 'description': 'Start date of the analytics data in YYYY-MM-DD format.', 'required': True}, {'name': 'end_date', 'type': 'string', 'description': 'End date of the analytics data in YYYY-MM-DD format.', 'required': True}]
returns: List[ArgReturn] = [{'name': 'analytics_data', 'type': 'object', 'description': 'Analytics data including revenue, orders, and traffic for the specified date range.'}]
exceptions: List[ArgException] = [{'name': 'InvalidRequestException', 'description': "The 'start_date' or 'end_date' parameter is not in the correct format or the date range is invalid."}]
|
@register_toolkit()
class Shopify(FunctionToolkit):
name_for_human = 'Shopify'
description_for_human = 'Toolkit for managing Shopify stores.'
name_for_model = 'Shopify'
description_for_model = 'A comprehensive toolkit for managing Shopify stores, including product, order, and customer management, as well as store analytics.'
tool_classes = [ShopifySearchProducts, ShopifyGetProductDetails, ShopifyCreateProduct, ShopifyUpdateProduct, ShopifyDeleteProduct, ShopifySearchOrders, ShopifyGetOrderDetails, ShopifyDraftOrder, ShopifyManageOrder, ShopifySearchCustomers, ShopifyGetStoreAnalytics]
|
class FedExShipManagerGetQuote(VirtualFunctionTool):
name = 'FedExShipManagerGetQuote'
summary = 'Get a quote for shipping a package.'
parameters: List[ArgParameter] = [{'name': 'package_details', 'type': 'object', 'description': "The package details, must include the keys 'description' (string), 'weight' (number, in grams), and 'dimensions' (string, h*w*d in cm).", 'required': True}, {'name': 'sender_information', 'type': 'object', 'description': 'The sender information, including full name, address and contact number. The address and contact number must be valid.', 'required': True}, {'name': 'recipient_information', 'type': 'object', 'description': 'The recipient information, including full name, address and contact number. The address and contact number must be valid.', 'required': True}, {'name': 'pickup_time', 'type': 'string', 'description': "The desired pickup time with format 'YYYY-MM-DD:HH:MM:SS'.", 'required': True}, {'name': 'special_handling', 'type': 'array', 'description': "The desired special handling, one or more of ['signature_required', 'fragile', 'oversized', 'dangerous_goods', 'temperature_sensitive'].", 'required': False}]
returns: List[ArgReturn] = [{'name': 'quote_id', 'type': 'string', 'description': 'The unique identifier of the shipping quote.'}, {'name': 'shipping_quote', 'type': 'object', 'description': "An object containing the shipping quote details, for each possible shipping method (one of ['ground', 'express', 'overnight', '2-day']), including the shipping cost (number, in USD) and estimated delivery date (string, format 'YYYY-MM-DD:HH:MM:SS')."}]
exceptions: List[ArgException] = [{'name': 'InvalidRequestException', 'description': "The package details, sender's information or recipient information are invalid, or the pickup time is invalid or too soon, or the special handling is invalid."}]
|
class FedExShipManagerCreateShipmentLabel(VirtualFunctionTool):
name = 'FedExShipManagerCreateShipmentLabel'
summary = 'Creates a shipping label for a package.'
parameters: List[ArgParameter] = [{'name': 'quote_id', 'type': 'string', 'description': 'The unique identifier of the shipping quote.', 'required': True}, {'name': 'shipping_method', 'type': 'string', 'description': "The desired shipping method, one of ['ground', 'express', 'overnight', '2-day'].", 'required': True}]
returns: List[ArgReturn] = [{'name': 'shipment_id', 'type': 'string', 'description': 'The unique identifier of the shipment.'}]
exceptions: List[ArgException] = [{'name': 'NotFoundException', 'description': 'The quote id does not exist.'}, {'name': 'InvalidRequestException', 'description': 'The shipping method is not a valid option for the quote.'}]
|
class FedExShipManagerGetShipmentDetails(VirtualFunctionTool):
name = 'FedExShipManagerGetShipmentDetails'
summary = 'Displays the current status, estimated delivery date, and other details of a shipment.'
parameters: List[ArgParameter] = [{'name': 'shipment_id', 'type': 'string', 'description': 'The unique identifier of the shipment to be tracked.', 'required': True}]
returns: List[ArgReturn] = [{'name': 'shipment_status', 'type': 'object', 'description': "The current status of the shipment, including a status, detailed description and timestamp (with the format 'YYYY-MM-DD:HH:MM:SS'). The status name is one of ['pending', 'in_transit', 'delivered']."}, {'name': 'sender_information', 'type': 'object', 'description': 'The sender information, including full name, address and contact number. The address and contact number must be valid.'}, {'name': 'recipient_information', 'type': 'object', 'description': 'The recipient information, including full name, address and contact number. The address and contact number must be valid.'}, {'name': 'dates', 'type': 'object', 'description': "The dates of the shipment, including the pickup date, actual pickup date, estimated delivery date, and actual delivery date (if applicable). All dates are in the format 'YYYY-MM-DD:HH:MM:SS'."}, {'name': 'package_details', 'type': 'object', 'description': 'The details of the package, including its weight and dimensions.'}, {'name': 'shipping_method', 'type': 'string', 'description': "The desired shipping method, one of ['ground', 'international', 'overnight', '2-day']."}, {'name': 'special_handling', 'type': 'array', 'description': "The desired special handling, one or more of ['signature_required', 'fragile', 'oversized', 'dangerous_goods', 'temperature_sensitive']."}]
exceptions: List[ArgException] = [{'name': 'NotFoundException', 'description': 'The shipment id does not exist.'}]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.