Working with Documentation
How to leverage documentation effectively in Cursor through prompting, external sources, and internal context
Why documentation matters
Documentation provides current, accurate context. Without it, models use outdated or incomplete training data. Documentation helps models understand things like:
- Current APIs and parameters
- Best practices
- Organization conventions
- Domain terminology
And much more. Read on to learn how to use documentation right in Cursor without having to context switch.
Model knowledge cutoff
Large language models are trained on data up to a specific point in time, called a “knowledge cutoff.” This means:
- Recent library updates might not be reflected
- New frameworks or tools may be unknown
- API changes after the cutoff date are missed
- Best practices may have evolved since training
For example, if a model’s knowledge cutoff is early 2024, it won’t know about features released in late 2024, even for popular frameworks.
Which tool should I use?
Use this decision tree to help decide which tool to use
Mental model
Tool | Mental Model |
---|---|
@Docs | Like browsing and reading official documentation |
@Web | Like searching for solutions on the internet |
MCP | Like accessing your internal documentation |
Public documentation
External documentation covers publicly available information that models might have limited or outdated knowledge about. Cursor provides two primary ways to access this information.
Using @Docs
@Docs
connects Cursor to official documentation from popular tools and frameworks. Use it when you need current, authoritative information about:
- API references: Function signatures, parameters, return types
- Getting started guides: Setup, configuration, basic usage
- Best practices: Recommended patterns from the source
- Framework-specific debugging: Official troubleshooting guides
Using @Web
@Web
searches the live internet for current information, blog posts, and community discussions. Use it when you need:
- Recent tutorials: Community-generated content and examples
- Comparisons: Articles comparing different approaches
- Recent updates: Very recent updates or announcements
- Multiple perspectives: Different approaches to problems
Internal documentation
Internal documentation includes information specific to your organization that AI models have never encountered during training. This might be:
- Internal APIs: Custom services and microservices
- Company standards: Coding conventions, architecture patterns
- Proprietary systems: Custom tools, databases, workflows
- Domain knowledge: Business logic, compliance requirements
Accessing internal docs with MCP
Model Context Protocol (MCP) provides a standardized way to bring your private documentation and systems into Cursor. MCP acts as a thin layer between Cursor and your internal resources.
Why MCP matters:
- Models can’t guess your internal conventions
- API documentation for custom services isn’t publicly available
- Business logic and domain knowledge is unique to your organization
- Compliance and security requirements vary by company
Common MCP integrations
Integration | Access | Examples |
---|---|---|
Confluence | Company Confluence spaces | Architecture documentation, API specifications for internal services, coding standards and guidelines, process documentation |
Google Drive | Shared documents and folders | Specification documents, meeting notes and decision records, design documents and requirements, team knowledge bases |
Notion | Workspace databases and pages | Project documentation, team wikis, knowledge bases, product requirements, technical specifications |
Custom | Internal systems and databases | Proprietary APIs, legacy documentation systems, custom knowledge bases, specialized tools and workflows |
Custom solutions
For unique needs, you can build custom MCP servers that:
- Scrape internal websites or portals
- Connect to proprietary databases
- Access custom documentation systems
- Pull from internal wikis or knowledge bases
Example custom MCP server for scraping internal docs:
Keeping docs up to date
Documentation becomes stale quickly. Cursor can help you maintain current, useful documentation by generating and updating it based on your actual code and development conversations.
From existing code
Use Cursor to create documentation directly from your codebase:
From chat sessions
Your conversations with Cursor contain valuable intent that can be turned into documentation.
After solving a complex problem:
After solving a complex problem:
After architectural decisions:
After debugging sessions:
Takeaways
- Documentation as context makes Cursor more accurate and current
- Use
@Docs
for official documentation and@Web
for community knowledge - MCP bridges the gap between Cursor and your internal systems
- Generate documentation from code and conversations to keep knowledge current
- Combine external and internal documentation sources for comprehensive understanding