MCPcopy Create free account
hub / github.com/Lap-Platform/LAP / test_basic

Method test_basic

tests/test_toollean.py:326–341  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

324
325class TestGenericJSONCompiler:
326 def test_basic(self):
327 tool = {
328 "name": "search",
329 "description": "Search things",
330 "parameters": {
331 "properties": {"q": {"type": "string", "description": "Query"}},
332 "required": ["q"],
333 },
334 "returns": {"result": {"type": "string", "description": "The answer"}},
335 }
336 spec = compile_generic_json(tool)
337 assert spec.name == "search"
338 assert len(spec.inputs) == 1
339 assert spec.inputs[0].name == "q"
340 assert len(spec.outputs) == 1
341 assert spec.outputs[0].name == "result"
342
343 def test_list_params(self):
344 tool = {

Callers

nothing calls this directly

Calls 1

compile_generic_jsonFunction · 0.90

Tested by

no test coverage detected