Many [1] models expect (MCP) tool calls to be formatted as a JSON. So if you expose code execition as an MCP tool to such model, it will have to generate the code escaped as a JSON string. I would exepct this to tank code generation quality.
[1] Not all, some use different formats, e.g. GLM uses plain text with special tokens to denote param names and values.
[1] Not all, some use different formats, e.g. GLM uses plain text with special tokens to denote param names and values.