MCPcopy Create free account
hub / github.com/IBM/mcp-cli / test_with_metadata

Method test_with_metadata

tests/chat/test_tool_processor_extended.py:1407–1422  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1405class TestOnToolStart:
1406 @pytest.mark.asyncio
1407 async def test_with_metadata(self):
1408 tm = DummyToolManager()
1409 ctx = DummyContext(tool_manager=tm)
1410 ui = DummyUIManager()
1411 tp = ToolProcessor(ctx, ui)
1412
1413 tp._call_metadata["c1"] = ToolCallMetadata(
1414 llm_tool_name="my_tool",
1415 execution_tool_name="my_tool",
1416 display_name="my_tool",
1417 arguments={"key": "val"},
1418 )
1419
1420 call = CTPToolCall(id="c1", tool="echo", arguments={"key": "val"})
1421 await tp._on_tool_start(call)
1422 assert ("my_tool", {"key": "val"}) in ui._start_calls
1423
1424 @pytest.mark.asyncio
1425 async def test_without_metadata(self):

Callers

nothing calls this directly

Calls 6

_on_tool_startMethod · 0.95
ToolProcessorClass · 0.90
ToolCallMetadataClass · 0.90
DummyToolManagerClass · 0.70
DummyContextClass · 0.70
DummyUIManagerClass · 0.70

Tested by

no test coverage detected