328 karma · joined August 6, 2012
The remarks about code comments are little too extreme in my opinion. Some code can be difficult to understand at face value. Like I’m writing a Vite plugin and it has code like this:
const moduleId = "virtual:mypkg";
const resolvedModuleId = "\0" + moduleId;
Unless you’ve written Vite/rollup plugins, which many folks haven’t, you’re going to appreciate a comment that at least points to some docs.If anything, succinct code comments that explain obscure conventions or describe relevant critical requirements are worth their weight in gold because they are valuable tokens for a coding assistant.
It probably needs better wording because it's sort of the wrong complexity metric. Many customers have gigantic OpenAPI documents with large numbers of deep and wide JSON Schemas that contain things like allOf/oneOf/anyOf sub-schemas, all of which need to be parsed into an object model for use by downstream tooling (e.g. code generation). For those customers, we want generation time to be super speedy and since this is a core aspect of Speakeasy, it made a ton of sense to us to take full control of OpenAPI parsing and optimize it.
I initially worked on a code generator for OpenAPI -> MCP in January but very quickly we found issues relating to poor quality operation (tool) names and descriptions. Not to mention that each API endpoint does not cleanly map to an MCP tool and yet it all gets dumped into the context window - sometimes exhausting it if you have hundreds of schemas and endpoints.
Gram is our attempt to make better use of API by adding a curation layer:
- You upload your OpenAPI document, or any number of other OpenAPI documents. - You then subset them into "toolsets" by selecting only the ones relevant to a domain (e.g. reading stripe charges) or business process (e.g. understanding customer health by reading info from your CRM, data warehouse and so on). - Optionally, you create custom tools (these are prompt templates under the hood) that describe how to make a series of tool calls to solve a problem. - Finally, every toolset is automatically exposed as a hosted/managed MCP server. No waiting for build or deploy steps. - You can edit the names and descriptions of all imported tools and they are instantly reflected in the MCP server.
The net result is you have a rapid iteration loop to create effective tools from your API.
I hope you have a chance to try it out. Will be around to answer any questions in the mean time :)
By sticking to this I’m able to avoid Homebrew’s mess and Nix’s complexity. I use mise (https://mise.jdx.dev/) to manage the binaries and languages I have on my machine. It handles installing multiple versions and is directory-aware.
On the topic itself, I am very cautious about my use of LLMs. It breaks down into three categories for me: 1. replacing Google, 2. get a first review of my work and 3. taking away mundane tasks around code editing.
Point 3. is where I can become most complacent and increasingly miscategorize tasks as mundane. I often reflect after a day working with an LLM on coding tasks because I want to understand how my behavior is changing in its presence. However, I do not have a proper framework to work out "did i get better because of it or not".
I still believe we need to get better as professionals and it worries me that even this virtue is called into question nowadays. Research like this will be helpful to me personally.
https://www.epicai.pro/using-mcp-sampling-in-vs-code-insider...
Some context: Speakeasy lets you generate SDKs from OpenAPI 3.x specs and now every user that generates a TypeScript SDK gets a Model Context Protocol (MCP) server bundled with it. This is available to users on both free and paid tiers.
I've been the primary maintainer of TypeScript SDK codegen and since launching it early last year, I made a bet on Zod for defining models and tying static TypeScript types to runtime validation. During that time, LLM function calling became a widespread feature and we saw that lots of folks preferred defining function arguments using Zod schemas and having something like `zod-to-json-schema` convert them to JSON Schema.
Fast forward to MCP's release and we noticed that the TypeScript SDK also accepts Zod schemas for defining tool arguments. The "gap" between generating a TypeScript SDK and going further to generate an MCP server was so small for us that we jumped right on it.
In terms of other interesting bits, the server is built out into a single JavaScript file using Bun's bundler. We also use stricli (https://bloomberg.github.io/stricli/) for type-safe CLI argument parsing and code structuring. We're also looking at building MCP servers out into standalone binaries which would remove the pre-requisite for node.js and npx when installing them. It's also possible to register additional custom tools and resources on top of what we generate so you're not locked out just because it's generated code. The generated tool themselves are also regular ES modules. You can skip over most things and import them from the SDK and into your own MCP server if you're building one yourself.
If you’re using a bundler then your’re not to going benefit from it in the medium term. It’s possible this will unlock faster build times with them in the future.
Makes sense. You can emulate that behavior by having an object literal with const assertion AND a union type of the same name derived from the object literal.
I could probably revise my use of Tailscale. My vague recollection is that I had networking issues when my laptop woke up and Tailscale didn’t have the same issues. Probably a debugging skill issue on my part.
Now I know what all the WSL users experience seamlessly with their setups. Glad I have something that comes close.