MCPcopy Create free account
hub / github.com/MiniMax-AI/Mini-Agent / to_openai_schema

Method to_openai_schema

mini_agent/tools/base.py:46–55  ·  view source on GitHub ↗

Convert tool to OpenAI tool schema.

(self)

Source from the content-addressed store, hash-verified

44 }
45
46 def to_openai_schema(self) -> dict[str, Any]:
47 """Convert tool to OpenAI tool schema."""
48 return {
49 "type": "function",
50 "function": {
51 "name": self.name,
52 "description": self.description,
53 "parameters": self.parameters,
54 },
55 }

Callers 7

_convert_toolsMethod · 0.80
test_multiple_toolsFunction · 0.80
test_tool_with_enumFunction · 0.80
demo_tool_schema_methodsFunction · 0.80

Calls

no outgoing calls

Tested by 5

test_multiple_toolsFunction · 0.64
test_tool_with_enumFunction · 0.64