GitHub - mcp-use/mcp-use: mcp-use is the easiest way to interact with mcp servers with custom agents
mcp-use is the easiest way to interact with mcp servers with custom agents - mcp-use/mcp-use
This section explains that LLMs are stateless functions and that high-quality outputs depend on carefully engineered context, not just standard chat-style message formats.
It argues for explicitly managing the entire context window—prompts, retrieved documents, past tool calls, history, and output schemas—and, when needed, replacing default message schemas with custom, token-efficient context representations. It illustrates how to serialize an internal event/thread model into a single structured prompt string, giving the model a compact, fully explicit view of “what has happened so far” to decide the next step.