Max thinks

About programmatic tool calling

There have been a lot of discussions recently around MCP vs code execution.

The latest trend: MCP bad, code good. Apparently, after Peter Steinberger code execution, that gave the OpenClaw its allmightiness.

I can totally understand the arguments for the power of code execution over MCP-backed tool chaining, filtering, sorting, and all the flexibility. However, this implies giving an agent too much control over the environment. The PocketOS's case confirms that.

Tool calling in its current form has many limitations, indeed. I'm in favor of improving it instead of ditching it.

I think Anthropic's programmatic tool calling is a real deal. It still uses tools, which gives you control over what is being done, while allowing the model to orchestrate how it is being done. The model generates Python code that calls tools and can juggle those calls however it sees fit.

Python is working towards that on their side with Monty.

And researchers are suggesting dedicated languages for that: Pel, Quasar, AskIt.

I particularly like the idea behind it: you can't write something dangerous because there's no way to express it.

I think that simple tool calling will stay — it's foundational. I think that general-purpose-language code execution will stay — it's niche. I think that programmatic tool calling with a special-purpose language is the best approach for most use cases.