Why AI Agents Now Need You to Be Their Librarian
The emergence of tools like Timescale's pg-aiguide and Upstash's Context7 reveals a hard truth: AI code generation is only as good as the context you feed it. Welcome to your new job description.
I've spent fifteen years watching developer tools evolve, but I've never seen a shift quite like this one. The newest critical skill for developers isn't learning another framework or mastering a new language—it's learning how to teach AI agents about your codebase, your database, and your architecture.
Two recent tools make this shift impossible to ignore. Timescale's pg-aiguide MCP server has accumulated 878 stars on GitHub by solving a simple problem: AI coding tools generate terrible PostgreSQL code. Upstash's Context7 MCP server, with over 40,000 stars, tackles an even broader issue—LLMs generate outdated code because they don't know which version of a library you're actually using.
These aren't just productivity tools. They're evidence of a fundamental realization: the quality of AI-generated code depends almost entirely on the quality of context you provide.
The Context Problem Nobody Talks About
When Timescale tested Claude Code with and without pg-aiguide, the results were stark. Without proper database documentation fed into the AI's context, developers got generic SQL. With pg-aiguide providing PostgreSQL-specific knowledge, the generated schemas included 4× more constraints, 55% more indexes (including partial and expression indexes), and modern PostgreSQL 17 features like GENERATED ALWAYS AS IDENTITY.
The difference wasn't the AI model. It was the context.
Context7 attacks the same problem from a different angle. According to the project's documentation, LLMs "rely on outdated or generic information about the libraries you use," leading to hallucinated APIs and code examples based on year-old training data. Context7 pulls "up-to-date, version-specific documentation and code examples straight from the source" directly into your prompt.
Both tools implement the Model Context Protocol (MCP), an open standard from Anthropic for connecting AI applications to external systems. MCP lets AI agents access documentation, search databases, and retrieve code examples—but someone needs to structure that information correctly.
That someone is you.
What This Means for Your Day-to-Day Work
Here's the part that matters for your career: providing context to AI agents is becoming a core developer responsibility, not an optional productivity hack.
Think about what these tools actually do:
The pattern is clear: AI agents need structured, searchable, version-aware documentation. They need clear schema definitions. They need examples that reflect current best practices, not generic patterns from their training data.
The developers who understand how to provide this context will see dramatically different results from AI coding assistants.
The New Skills That Actually Matter
This isn't about prompt engineering tricks. It's about fundamental shifts in how you structure knowledge:
Write Documentation for Machine Consumption
Your API docs need to be semantically searchable. That means consistent structure, clear examples, and explicit version information. The informal README that worked fine for human developers won't cut it when an AI agent needs to find "how to implement authentication in version 2.4."
Design Schemas with AI Readability in Mind
Database schemas are now consumed by both humans and AI agents. Clear naming conventions, comprehensive constraints, and well-documented relationships help AI tools generate better queries and migrations. pg-aiguide's "skills" are essentially codified best practices that AI agents can reference—your internal standards should be equally explicit.
Maintain Architecture Decision Records
When an AI agent asks "how should I implement caching in this codebase," it needs to know your architectural patterns. Architecture Decision Records (ADRs) that document the why behind technical choices give AI agents the context to generate code that fits your system, not generic solutions.
Version Your Documentation as Aggressively as Your Code
Context7's entire value proposition is version-specific documentation. If your internal libraries and services don't maintain clear documentation for each version, AI tools will generate code that mixes incompatible APIs. This was always good practice—now it's essential.
The Trade-Offs Nobody Mentions
Here's the hard part: maintaining this level of documentation quality takes time. Real time, not "we'll document it later" time.
I've talked to engineering leaders who worry that AI coding tools will make documentation less important—developers will just ask the AI for help. The reality appears to be the opposite. Good documentation becomes more valuable, not less, because it multiplies the effectiveness of every developer using AI assistance.
But creating "AI-ready" documentation requires discipline:
Many teams already struggle with documentation. Adding "make it AI-friendly" to the requirements won't make it easier.
What This Means for Your Career
I'm not going to tell you this is a skill you might want to develop. Based on the adoption patterns I'm seeing with MCP servers—Context7's 40,000+ stars suggest serious momentum—providing context to AI agents is becoming table stakes.
The developers who thrive in the next few years will be the ones who understand that their job isn't just writing code anymore. It's creating an environment where AI agents can write good code. That means:
This isn't a new career path. It's a new dimension of software engineering.
The tools are already here—pg-aiguide for database knowledge, Context7 for library documentation, and the broader MCP ecosystem for connecting AI agents to your systems. The question isn't whether you'll need these skills. The question is whether you'll develop them proactively or scramble to catch up when your team's AI coding results start lagging behind competitors who figured this out first.
The Bottom Line
AI code generation isn't about replacing developers. It's about giving developers superpowers—but only if you feed the AI the right context. That context doesn't appear magically. It requires structured documentation, clear schemas, explicit architectural decisions, and disciplined knowledge management.
You're not just a developer anymore. You're also your AI agent's librarian, curator, and teacher. The sooner you accept that role, the better your code—and your AI's code—will become.