Agents are just tools and loops. Stop overthinking it.
Strip the marketing. An AI agent is a model with a set of typed tools, a planner, and a stopping rule. Treat it that way and shipping gets boring (good).
Gautam Manak
Founder, doc2mcp

There's a version of "AI agent" that involves orchestration diagrams, swarm topologies, and a 6-month migration plan. Then there's the version that actually ships and makes money. It's smaller than you think.
Three pieces. That's it.
- Tools. Typed inputs, typed outputs, a clear description. This is your MCP server.
- A loop. Read the user message, decide which tools to call, call them, observe results, decide again.
- A stopping rule. Either "I have an answer" or "I tried N times and need to escalate".
What you don't need (yet)
- A vector DB. Most agents do better with a tool that calls a real search service.
- A framework. The loop is twenty lines of code. Writing it yourself is faster than learning someone else's abstractions.
- A custom model. The frontier ones are good enough. Spend the time on better tools.
The loop, in 20 lines
ts
async function run(userMessage: string) {
const messages = [systemPrompt, { role: "user", content: userMessage }];
for (let step = 0; step < MAX_STEPS; step++) {
const reply = await llm.complete({ messages, tools });
messages.push(reply);
if (!reply.toolCalls?.length) {
return reply.content; // done
}
for (const call of reply.toolCalls) {
const result = await tools[call.name](call.args);
messages.push({ role: "tool", id: call.id, content: result });
}
}
return "I tried and got stuck. Escalating.";
}Stopping rules matter more than planning
A bad agent loops forever or quits too early. MAX_STEPS is a blunt fix. Better: track per-tool success rate inside the loop, and stop when you've made three consecutive "useless" calls (returned no new information).
Shipping should be boring
The agents that make money in 2026 are the ones with five well-described tools and a 25-line loop, not the ones with 50 tools and a hand-tuned planner.
doc2mcp focuses on the first part — making tool definitions that the model can actually use without copy-paste. The loop is yours. Keep it small.
Try it
Paste a docs URL. Get an MCP server in 90 seconds.
Free tier included. Works with Cursor, Claude, Windsurf, VS Code, Codex, and Zed.
Generate your MCP
