`Input validation error: None is not of type 'string' when using MCP HassTurnOn tool

, ,

Hi all,

I’m using the MCP integration in Home Assistant and trying to call the HassTurnOn tool. When I list tools with:

curl -X POST \
  http://xxxxx:8123/api/mcp \
  -H "Authorization: Bearer eyJhbGxxxxx" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/list"
  }'

I see that HassTurnOn has this input schema:

{
  "name": {"type": "string"},
  "area": {"type": "string"},
  "floor": {"type": "string"},
  "domain": {"type": "array", "items": {"type": "string"}},
  "device_class": {"type": "array", "items": {"type": "string"}}
}

Then I use and LLM and it calls the tool like this:

{
  "name": "h611a",
  "area": "living room",
  "domain": ["light"]
}

But every time I execute it, I get:

{
  "output": "meta=None content=[TextContent(type='text', text=\"Input validation error: None is not of type 'string'\", annotations=None, meta=None)] structuredContent=None isError=True"
}

I don’t understand why this validation error occurs, the input seems correct.

Has anyone seen this before or can explain what might be going wrong with HassTurnOn via MCP? Any pointers on how to fix or debug this would be greatly appreciated.