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

Method to_schema

mini_agent/tools/base.py:38–44  ·  view source on GitHub ↗

Convert tool to Anthropic tool schema.

(self)

Source from the content-addressed store, hash-verified

36 raise NotImplementedError
37
38 def to_schema(self) -> dict[str, Any]:
39 """Convert tool to Anthropic tool schema."""
40 return {
41 "name": self.name,
42 "description": self.description,
43 "input_schema": self.parameters,
44 }
45
46 def to_openai_schema(self) -> dict[str, Any]:
47 """Convert tool to OpenAI tool schema."""

Callers 8

_convert_toolsMethod · 0.80
_run_turnMethod · 0.80
test_tool_to_schemaFunction · 0.80
test_tool_schema_complexFunction · 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_tool_to_schemaFunction · 0.64
test_tool_schema_complexFunction · 0.64
test_multiple_toolsFunction · 0.64
test_tool_with_enumFunction · 0.64