|
|
|
|
|
by gavmor
259 days ago
|
|
> LLMs are much better at writing code than at tool calling. Wait, really? This is harder to get right: ```
{
"jsonrpc": "2.0",
"id": 102,
"method": "tools/call",
"params": {
"name": "book_flight",
"arguments": {
"origin": "SFO",
"destination": "JFK",
"departureDate": "2025-10-15",
"returnDate": "2025-10-18",
"passengers": 2,
"cabinClass": "business"
}
}
}
``` Than the equivalent... but with `method: "POST"` boilerplate, etc? Or is it literally the chaining of tools that's missing from—and fundamentally faulty in—MCP client implementations? |
|
The fetch code isn't any better than the tool code I agree, but typescript code is more common so I'd guess this would be too?
But anyway I think the real power comes with the type-safety part that I left out this morning (working on it now). From what I understand Cloudflare is essentially generating an SDK for the LLM to write code against.
Instead of writing that fetch call. The LLM would generate
``` const redditResults = await redditMCP_getTopPosts(subreddit); const insertMutation = await duckdb_Insert("SQL STUFF", redditResults.map(...)); const results = await duckDb_Query(args: duckDb_QueryArgs); return resultsInSomeNiceFormat; ```
Where the method names come from the MCP server tools, and the argument types are autogenerated from the MCP schemas themselves.
No idea if this is a valuable workflow or not personally. I just thought it was cool and wanted to tinker with it.