Comment

Comment by jmcodes

So this is a first pass to capture the workflow part (mix code and MCP calls).

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.

parent jmcodes 1 year ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton