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

Function test_tool_to_schema

tests/test_tool_schema.py:137–148  ·  view source on GitHub ↗

Test Tool.to_schema() method.

()

Source from the content-addressed store, hash-verified

135
136
137def test_tool_to_schema():
138 """Test Tool.to_schema() method."""
139 tool = MockWeatherTool()
140 schema = tool.to_schema()
141
142 assert isinstance(schema, dict)
143 assert schema["name"] == "get_weather"
144 assert schema["description"] == "Get weather information"
145 assert "input_schema" in schema
146 assert schema["input_schema"]["type"] == "object"
147 assert "location" in schema["input_schema"]["properties"]
148 assert schema["input_schema"]["required"] == ["location"]
149
150
151def test_tool_to_openai_schema():

Callers

nothing calls this directly

Calls 2

MockWeatherToolClass · 0.85
to_schemaMethod · 0.80

Tested by

no test coverage detected