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:

ToolParameter

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]

to_gemini()[source]#

Converts the tool definition to the format expected by Google Gemini.

Returns:

The tool definition in Gemini’s format.

Return type:

Dict[str, Any]

to_openai()[source]#

Converts the tool definition to the format expected by OpenAI and vLLM.

Returns:

The tool definition in OpenAI’s format.

Return type:

Dict[str, Any]