Skip to content

Commit 7906a2c

Browse files
kingpanther13claude
andcommitted
fix: resolve generic types in _python_type_to_json
Use origin type for type_map lookup so list[str] -> "array", dict[str, int] -> "object", etc. instead of falling back to "string". Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 2998414 commit 7906a2c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/ha_mcp/tools/tool_proxy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ def _python_type_to_json(python_type: Any) -> str:
255255
dict: "object",
256256
list: "array",
257257
}
258-
return type_map.get(python_type, "string")
258+
return type_map.get(origin or python_type, "string")
259259

260260

261261
def discover_proxy_tools(

0 commit comments

Comments
 (0)