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

Method test_dict_args_not_string

tests/planning/test_executor.py:1288–1304  ·  view source on GitHub ↗

Arguments already parsed as dict (not JSON string).

(self)

Source from the content-addressed store, hash-verified

1286 assert _extract_tool_call({}) is None
1287
1288 def test_dict_args_not_string(self):
1289 """Arguments already parsed as dict (not JSON string)."""
1290 response = {
1291 "tool_calls": [
1292 {
1293 "id": "call_1",
1294 "type": "function",
1295 "function": {
1296 "name": "test_tool",
1297 "arguments": {"key": "value"},
1298 },
1299 }
1300 ],
1301 }
1302 result = _extract_tool_call(response)
1303 assert result is not None
1304 assert result["args"] == {"key": "value"}
1305
1306 def test_invalid_json_arguments(self):
1307 """Malformed JSON in arguments defaults to empty dict."""

Callers

nothing calls this directly

Calls 1

_extract_tool_callFunction · 0.90

Tested by

no test coverage detected