News for hackers. Stuff that matters.
Re:Apideck CLI – An AI-agent interface with much lower conte... by gertjandewilde on Monday March 16, 2026 @11:25AM (#47400262)
We built a unified API with a large surface area and ran into a problem when building our MCP server: tool definitions alone burned 50,000+ tokens before the agent touched a single user message.

The fix that worked for us was giving agents a CLI instead. ~80 tokens in the system prompt, progressive discovery through --help, and permission enforcement baked into the binary rather than prompts.

The post covers the benchmarks (Scalekit's 75-run comparison showed 4-32x token overhead for MCP vs CLI), the architecture, and an honest section on where CLIs fall short (streaming, delegated auth, distribution).

Re:Apideck CLI – An AI-agent interface with much lower conte... by OsrsNeedsf2P on Monday March 16, 2026 @11:37AM (#47400423)
How is progressive discovery not more expensive due to the increased number of steps?
Re:Apideck CLI – An AI-agent interface with much lower conte... by BeefySwain on Monday March 16, 2026 @11:44AM (#47400523)
I assume because the discovery is branching. If the an agent using the CLI for for GitHub needs to make an issue, it can check the help message for the issue sub-command and go from there, doesn't need to know anything about pull requests, or pipelines, or account configuration, etc, so it doesn't query those subcommands.

Compare this to an MCP, where my understanding is that the entire API usage is injected into the context.

Re:Apideck CLI – An AI-agent interface with much lower conte... by zamalek on Monday March 16, 2026 @11:41AM (#47400487)
In short: JSON. Plan prose or markdown is way more token efficient than JSON. I think that responding in JSON was always a mistake in the spec; it should have been free-form text (which could then be JSON if required).
Re:Apideck CLI – An AI-agent interface with much lower conte... by iamjackg on Monday March 16, 2026 @11:42AM (#47400495)
It depends on what your "currency" is: inference cost vs. models getting dumber/slower with a fuller context.
Re:Apideck CLI – An AI-agent interface with much lower conte... by lelanthran on Tuesday March 17, 2026 @05:36AM (#47410422)
> How is progressive discovery not more expensive due to the increased number of steps?

Why not run the discovery (whether MCP or CLI) in a subagent that returns only the relevant tools. I mean, discovery can be done on a local model, right?