orkes.shared.ToolDefinition#
- pydantic model orkes.shared.ToolDefinition[source]#
A universal schema for defining a tool that can be used by an LLM.
This schema provides methods to convert the tool definition to different provider-specific formats, such as for OpenAI, Google Gemini, and Anthropic Claude.
- name#
The name of the tool.
- Type:
str
- description#
A description of what the tool does.
- Type:
str
- parameters#
The schema for the parameters that the tool accepts.
- Type:
- Fields:
description (str)name (str)parameters (orkes.shared.schema.ToolParameter)
- field description: str [Required]#
- field name: str [Required]#
- field parameters: ToolParameter [Required]#
- to_claude()[source]#
Converts the tool definition to the format expected by Anthropic Claude.
- Returns:
The tool definition in Claude’s format.
- Return type:
Dict[str, Any]