Token-Efficient Documentation
Never Repeat Results
Overview
Ref MCP Server gives your AI coding assistant instant access to up-to-date technical documentation for APIs, libraries, frameworks, and services - while using minimal tokens to keep your context window clean and your AI sharp. The Problem: Traditional documentation tools dump 10k-20k+ tokens of mostly irrelevant content into your context. This makes models measurably worse and wastes money on expensive API calls. The Solution: Ref intelligently searches documentation, filters results based on your session history, and returns only the ~500-5k most relevant tokens. The result? 60-95% fewer tokens, better AI responses, and faster development. Perfect for:- API integration and implementation
- Library documentation lookup without leaving your AI assistant
- Framework reference and best practices
- Debugging with context from documentation
- Third-party SDK integration
- Private codebase documentation search
- Technical decision-making research
- Learning new technologies efficiently
- Smart Search: Search 1000+ indexed documentation sites
- Session Awareness: Never returns duplicate results in the same conversation
- Intelligent Filtering: Returns ~5k relevant tokens from large pages (vs 20k+ with traditional fetch)
- Public Documentation: APIs, libraries, frameworks, databases (free tier)
- Private Documentation: GitHub repos, PDFs, internal wikis (Pro tier)
- URL-to-Markdown: Convert any web page to clean markdown
- Fallback Web Search: Find content not in indexed docs
Why Ref vs Alternatives?
vs Context7 and Similar Tools
vs Context7 and Similar Tools
- Look up a library → automatically returns 10k most relevant tokens
- 2 libraries = 20k tokens dumped into context
- No filtering or de-duplication
- Full documentation dumps whether you need them or not
- Session-aware search → finds exact context needed
- Returns ~500-5k tokens depending on query specificity
- Smart de-duplication across searches prevents repetition
- Progressive refinement without token waste
- Average 60% fewer tokens, up to 95% reduction
vs Manual Web Scraping (fetch)
vs Manual Web Scraping (fetch)
- Large documentation pages = 20k+ tokens dumped into context
- Mostly irrelevant content included (nav, footers, sidebars)
- No de-duplication between searches
- Context rot from excessive tokens
- Models get measurably worse as context fills up
- Pre-indexed documentation sites (instant search)
- Smart relevance filtering based on your query
- Session history prevents duplicate results
- Clean markdown conversion
- Returns only the ~5k most relevant tokens
Private Documentation Support
Private Documentation Support
- Private GitHub repositories
- Custom PDF documentation
- Internal wiki pages
- Proprietary codebases
- Enterprise internal tools documentation
- Private SDK documentation
- Custom framework references
- Confidential API documentation
- Company knowledge bases
- Upgrade to Pro plan ($29/mo)
- Email [email protected] with repository URLs or PDF files
- Grant read access to specified repositories
- Wait 24-48 hours for indexing
- Search with natural language (Ref automatically searches private docs)
Session-Aware De-Duplication
Session-Aware De-Duplication
- “How do I authenticate with the Stripe API?” → Returns authentication overview
- “Show me code examples for payment intents” → Returns payment intent examples (NO repetition of auth info)
- “What about error handling for declined payments?” → Returns error handling (NO repetition of previous results)
- Progressive refinement without duplication
- Cleaner context window
- More room for relevant information
- Better AI responses
Quick Start
Get Your API Key
- Unlimited searches (fair use)
- Access to 1000s of public documentation sites
- GitHub public repository search
- Smart token-efficient retrieval
- Session-aware de-duplication
- URL-to-markdown conversion
- Check your email and verify your account
- Navigate to ref.tools/dashboard
- Copy your API key from the dashboard
Add to NimbleBrain Studio
- Navigate to MCP Servers in the sidebar
- Click Add Server or Browse Registry
- Search for “Ref” in the server registry
- Click Add to Workspace
- In the configuration dialog:
- Server Name: Ref
- Environment Variables:
- Key:
REF_API_KEY - Value: [Paste your API key]
- Key:
- Click Save & Enable
Test the Connection
Supported Documentation
Ref indexes 1000+ documentation sites and public repositories, including:Languages
- Python
- JavaScript/TypeScript
- Go
- Rust
- Java
- Ruby
- PHP
- C#/.NET
- Swift
- Kotlin
-
- many more
Frameworks
- React/Next.js
- Vue/Nuxt
- Angular/Svelte
- Django/Flask
- FastAPI
- Rails
- Express/NestJS
- Spring Boot
- Laravel
- ASP.NET Core
Cloud & APIs
- AWS Services
- Google Cloud
- Azure
- Stripe
- Twilio
- SendGrid
- OpenAI
- Anthropic
- GitHub
- Firebase/Supabase
Tools & Databases
- Docker
- Kubernetes
- Terraform
- PostgreSQL
- MongoDB
- Redis
- Elasticsearch
- Git
- n8n
- Figma API
Available Tools
ref_search_documentation - Search Technical Documentation
ref_search_documentation - Search Technical Documentation
- Searches across indexed documentation sites and GitHub
- Intelligently ranks results by relevance to your query
- Filters out duplicate content from your session history
- Returns concise summaries with source URLs
- Uses minimal tokens (~54 tokens for a typical query)
- Session-aware: never returns results you’ve already seen
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | Yes | Full sentence or question about documentation you need. Include programming language and framework/library names for best results. |
- List of relevant documentation pages
- Brief overview/excerpt of each result
- URL for each result (use with
ref_read_urlto read full content) - Module ID for tracking
- Filtered to remove results from previous searches in this session
- “How do I handle authentication in the Figma REST API?”
- “What’s the endpoint for sending SMS with Twilio?”
- “How do I create a Stripe payment intent?”
- “React useEffect cleanup function best practices”
- “Python asyncio error handling patterns”
- “How do I use React Query for data fetching?”
- “Next.js server-side rendering vs static generation”
- “Django authentication with JWT tokens”
- “FastAPI dependency injection examples”
- “Solutions for ‘Cannot read property of undefined’ in React”
- “Python asyncio event loop already running error”
- “PostgreSQL connection pool exhausted”
ref_src=private to query for private docs)API endpoints:
“Find the Twilio endpoint for sending SMS messages”Code examples:
“Show me code examples for PostgreSQL connection pooling in Node.js”ref_read_url - Fetch and Convert Documentation
ref_read_url - Fetch and Convert Documentation
- Fetches the web page content
- Converts HTML to clean markdown
- Uses session search history to filter irrelevant sections
- Returns ~5k most relevant tokens from large pages
- Prevents 20k+ token dumps that cause context rot
- Preserves code blocks and formatting
| Parameter | Type | Required | Description |
|---|---|---|---|
url | string | Yes | Full URL of the documentation page to read. Should be a URL from ref_search_documentation results for best filtering. |
- Markdown-formatted content
- Intelligently filtered to most relevant sections (~5k tokens)
- Preserves code blocks, syntax highlighting, and formatting
- Includes page metadata
- Clean, LLM-optimized output
-
Use with search results:
- First: Search for documentation
- Then: Read the most relevant result URL
- Benefit: Context-aware filtering gives you exactly what you need
-
Works on any URL:
- Documentation sites
- GitHub READMEs
- Blog posts
- Stack Overflow answers
- Tutorial sites
-
Progressive reading:
- Read one URL at a time
- Ask follow-up questions
- Read additional URLs as needed
- Session awareness prevents duplication
- Search: “Stripe payment intent documentation” → Returns list of relevant pages (~54 tokens)
-
Read: Use
ref_read_urlon the most relevant result → Returns filtered markdown (~385 tokens) - Total: ~439 tokens for complete context → Traditional tool: 10,000+ tokens → Savings: 95%
Tool Selection Logic
- “How do I…” / “What is…” / “Show me…” →
ref_search_documentation - “Read this URL…” / “Fetch this page…” →
ref_read_url - “Search for…” →
ref_search_documentation
Authentication & Configuration
Getting Your API Key
Create Account
Verify Email
Get API Key
Add to Studio
- Go to Settings → MCP Servers → Ref
- Add environment variable:
REF_API_KEY= [your key] - Save changes
Rate Limits & Pricing
| Plan | Searches | Features | Price |
|---|---|---|---|
| Free | Unlimited* | Public docs, GitHub public repos, URL reading, session awareness | $0 |
| Pro | Unlimited | + Private GitHub repos, PDF docs, priority indexing | $29/mo |
| Team | Unlimited | + Team sharing, admin controls, usage analytics | $99/mo |
| Enterprise | Unlimited | + Custom indexing, SLA, dedicated support, on-premise | Custom |
- Average search: ~54 tokens
- Average read: ~385-5,000 tokens (intelligently filtered)
- No duplicate results in same session
- 60-95% more efficient than alternatives
- Pulls 10k tokens per library lookup
- 2 libraries = 20k tokens = $0.30 per conversation
- 10 step conversation = $3.00 in documentation tokens
- Search + read = ~500-5k tokens per lookup
- 2 libraries = ~2k tokens = $0.03 per conversation
- 10 step conversation = $0.30 in documentation tokens
Managing Your API Key in Studio
Your API key is securely stored in NimbleBrain Studio’s environment variables. To update your API key:- Go to Settings → MCP Servers
- Find “Ref” in your server list
- Click Edit Configuration
- Update the
REF_API_KEYenvironment variable - Click Save
- Restart the server if needed (Studio usually does this automatically)
Private Documentation Setup
To index private GitHub repositories or PDF documentation:Upgrade to Pro Plan
Contact Ref Team
- Your Ref account email
- GitHub organization name (if applicable)
- Repository URLs to index
- PDF documentation files to upload (if any)
- Internal wiki URLs (if crawlable)
Grant Access
- Add Ref bot as a collaborator (they’ll provide the bot account)
- Or provide a fine-grained personal access token with read access
- Upload files via the process Ref provides
- Or email them directly (if not too large)
Wait for Indexing
- Initial indexing: 24-48 hours
- Incremental updates: Automatic
- Re-indexing frequency: Configurable
Search Private Docs
- “Search my private company docs for authentication patterns”
- “Find documentation in our internal repos about payment processing”
- Add
ref_src=privateto explicitly search only private docs - Or use “all” to search both public and private
Security Best Practices
Protect Your API Key
Protect Your API Key
- ✅ Store key securely in Studio environment variables
- ✅ Never commit keys to version control
- ✅ Rotate keys periodically (every 90 days recommended)
- ✅ Use separate keys for different environments (dev/staging/prod)
- ✅ Monitor usage for unexpected activity in dashboard
- ❌ Share your API key publicly
- ❌ Hardcode keys in source code
- ❌ Use production keys in development
- ❌ Share keys between team members (use Team plan)
Private Repository Security
Private Repository Security
- Only grant read access to necessary repositories
- Use fine-grained personal access tokens (not full repo access)
- Regularly audit indexed repositories in dashboard
- Remove access when team members leave
- Monitor search queries for sensitive data exposure
- Ref only indexes repositories you explicitly authorize
- Never stores repository credentials
- Doesn’t re-share your private documentation
- Complies with GitHub’s data usage policies
- Can delete indexed data on request
Context Window Management
Context Window Management
- Track total tokens in conversation (Studio shows this)
- Clear context when switching to unrelated topics
- Use specific queries to reduce reads needed
- Let Ref’s de-duplication work (don’t start new conversations unnecessarily)
- Monitor for context rot indicators (AI giving worse responses)
- AI responses become less relevant
- AI starts ignoring instructions
- Responses reference wrong information
- Increased latency in responses
- Start a new conversation
- Use more specific queries
- Read fewer URLs per conversation
- Trust Ref’s filtering
Example Workflows
- API Integration
- Library Research
- Debugging Errors
- Framework Migration
- SDK Implementation
- Private Codebase
- Dependency Update
- Architecture Decision
- Security Audit
- Performance Optimization
- Learning New Tech
- Searches Stripe documentation
- Returns relevant API endpoints and overview
- Includes authentication requirements
- Shows brief code examples
- ~54 tokens used
- Fetches Stripe API reference page
- Converts to clean markdown
- Filters to relevant sections (~385 tokens)
- Preserves code examples in multiple languages
- Ready to implement
- Searches for error handling (no repetition of Step 1/2 results!)
- Returns error codes and handling strategies
- Context-aware: focuses on what you haven’t seen yet
Real-World Token Savings
Simple API Lookup
- Traditional: $0.15 (Claude Opus)
- Ref: $0.007
- Save $0.143 per lookup
Library Comparison
- Traditional: $0.30
- Ref: $0.023
- Save $0.277 per comparison
Migration Research
- Traditional: $0.45
- Ref: $0.045
- Save $0.405 per migration
Debugging Session
- Traditional: $0.225
- Ref: $0.03
- Save $0.195 per debug session
- 3 API integrations
- 2 library comparisons
- 1 debugging session
- 1 migration research
- (3 × 10k) + (2 × 20k) + (1 × 15k) + (1 × 30k) = 115,000 tokens
- Cost: $1.73 (Claude Opus)
- Context: Severely degraded, multiple conversations needed
- (3 × 500) + (2 × 1.5k) + (1 × 2k) + (1 × 3k) = 9,500 tokens
- Cost: $0.143
- Context: Clean, single conversation possible
- Savings: 92% tokens, 92% cost, better AI responses
Troubleshooting
No Results Found
No Results Found
-
Documentation site not yet indexed
- Ref indexes 1000+ sites but may not have yours yet
- Check supported documentation list
- Request indexing by emailing [email protected]
-
Query too specific or using wrong terminology
- Try broader search terms
- Use official library/framework names
- Include programming language in query
-
Very new or obscure library
- Recently released libraries may not be indexed yet
- Obscure/niche libraries may need manual indexing
-
Typo in library name
- Double-check spelling
- Try alternate names (e.g., “nodejs” vs “node.js”)
- Try broader terms: “React hooks” instead of “React useEffect cleanup unmount”
- Include framework: “Python asyncio” instead of just “async/await”
- Use official names: “Vue.js” instead of “Vue3”
- Request indexing: Email [email protected] with documentation URL
- Use web search: Ref will automatically fall back to web search if needed
Invalid API Key
Invalid API Key
-
API key not set in Studio
- Environment variable
REF_API_KEYmissing or empty - Typo in environment variable name
- Environment variable
-
Invalid or expired API key
- Key was regenerated in dashboard
- Key was revoked
- Copy/paste error (extra spaces, missing characters)
-
Email not verified
- Ref requires email verification before API access
- Check your email for verification link
- Go to Settings → MCP Servers → Ref
- Click Edit Configuration
- Check that
REF_API_KEYenvironment variable exists - Verify the key value (no quotes, no spaces)
- Log in to ref.tools/dashboard
- Find API Keys section
- Copy your current key OR regenerate new key
- Update in Studio
- Check your email for verification link from Ref
- Click verification link
- Wait 5 minutes for activation
- Try again
- Try a simple search: “React documentation”
- If it works, your key is valid
Incomplete Documentation
Incomplete Documentation
- Remove duplicate information from your session history
- Filter irrelevant sections based on your query context
- Keep token usage minimal (~5k max per read)
- Prevent context rot from excessive tokens
- Return only what’s needed for your specific question
- Better AI responses: Less noise = more accurate answers
- Faster development: Get to relevant info immediately
- Cost savings: 60-95% fewer tokens = lower API costs
- Cleaner context: Your AI stays focused
-
Ask more specific follow-up questions
- “Show me error handling for this API”
- “What are the authentication options?”
- “How do I handle rate limits?”
-
Read additional URLs
- Search returns multiple results
- Read the next most relevant URL
- Each read is context-aware
-
Request the full page
- “Read the complete documentation for [specific topic]”
- Use
ref_read_urldirectly on specific URL - Accept higher token usage for completeness
-
Trust the filtering
- Ref’s AI knows what’s relevant
- You probably don’t need the omitted sections
- Follow-up questions fill in gaps as needed
ref_read_url on the specific page URL and ask for “complete” content. But consider whether you really need all 20k tokens or if 5k filtered tokens will suffice.Private Docs Not Found
Private Docs Not Found
-
Not on Pro plan
- Private documentation requires Pro ($29/mo) or higher
- Free tier only includes public documentation
-
Repository not indexed yet
- Indexing takes 24-48 hours after setup
- Check email for indexing confirmation
-
Repository access not granted
- Ref bot needs read access to repository
- Personal access token may have expired
-
Query not specifying private docs
- By default, Ref searches public docs only
- Need to include
ref_src=privatein query
- Log in to ref.tools/dashboard
- Check your subscription status
- Upgrade if needed
- Check email for indexing completion notification
- Or email [email protected] to check status
- Wait full 24-48 hours before troubleshooting
- Go to GitHub repository settings
- Check that Ref bot has read access
- Or verify personal access token is still valid
- Include: “Search my private docs for [topic]”
- Or add:
ref_src=privateto query - Or use: “Search all docs” to search both public and private
- Pro plan active
- Repository URL sent to [email protected]
- Read access granted to Ref
- Received indexing confirmation email
- Waited 24-48 hours
- Using
ref_src=privatein queries
Repeated Results (Unexpected)
Repeated Results (Unexpected)
-
New conversation started
- Session tracking is per-conversation
- New conversation = fresh session
- This is expected behavior
-
Different query about same topic
- If query is significantly different, may return overlapping results
- This is rare but can happen
-
Server issue or bug
- Rare session tracking issue
- May need to report to Ref team
- Note the specific queries that caused repetition
- Check if you accidentally started a new conversation
- Try clearing conversation and testing again
- Report to [email protected] with:
- Your query sequence
- Results that repeated
- Your Ref account email
- Start a new conversation (intentionally)
- Or explicitly ask: “Show me that earlier result about X again”
- Or use
ref_read_urlon the same URL again
- Phrase your follow-up questions more distinctly
- Ask for “different approach” or “alternative methods”
- Use
ref_read_urlfor specific URLs
URL Fetch Fails
URL Fetch Fails
-
URL not publicly accessible
- Behind login wall
- Requires authentication
- VPN or firewall protected
-
Site blocks automated access
- Bot protection (Cloudflare, etc.)
- Rate limiting
- User-agent filtering
-
URL doesn’t exist or moved
- 404 Not Found
- Redirect to different domain
- Site temporarily down
-
Network/connectivity issues
- Your internet connection
- Site’s servers down
- DNS issues
- Open the URL in your web browser
- Can you access it without logging in?
- Does it load successfully?
- Ensure URL is complete (includes https://)
- No typos in URL
- No special characters breaking the URL
- Search for the topic instead of reading specific URL
- Use public documentation alternative
- Check if there’s a PDF version
- Add to private documentation index (Pro plan)
- Or manually copy content for private use
- Or find public equivalent documentation
- ❌ Pages behind login walls
- ❌ Paywalled content (Medium, news sites)
- ❌ Captcha-protected sites
- ❌ Sites blocking bots/scrapers
- ❌ Local URLs (localhost, 192.168.x.x)
- ❌ Internal company URLs (intranet)
Slow Response Time
Slow Response Time
- Simple search: less than 1 second
- Document read: 1-2 seconds
- Complex research: 2-3 seconds
- Web fallback: 2-4 seconds
-
Ref API experiencing high load
- Peak usage times
- Temporary infrastructure issues
-
Your internet connection
- Slow or unstable connection
- High latency to Ref servers
-
Complex query requiring multiple sources
- Searching many documentation sites
- Large page requiring processing
-
Studio connection issues
- MCP server connection problems
- Studio performance issues
- Visit status.ref.tools (if available)
- Check Ref Twitter/X for status updates
- Or check #ref channel in NimbleBrain Discord
- Run speed test
- Check latency to ref.tools
- Try different network
- Start with simpler, more specific query
- Break complex research into smaller questions
- Search one library at a time
- Restart Studio if needed
- Check Studio status page
- Try disabling/re-enabling Ref server
- If consistently slow (>10 seconds)
- Email [email protected] with:
- Your location/region
- Example slow queries
- Your Ref account email
Server Connection Failed
Server Connection Failed
-
Studio server not enabled
- Ref server disabled in Studio settings
- Server configuration error
-
Network/firewall blocking
- Firewall blocking api.ref.tools
- Corporate proxy issues
- VPN interference
-
Ref API temporarily down
- Rare infrastructure issues
- Maintenance window
-
Invalid configuration
- Wrong URL in server config
- Missing required settings
- Go to Settings → MCP Servers
- Find “Ref” in server list
- Check if enabled (toggle should be on)
- Look for error indicators
- In MCP Servers settings
- Click “Ref” server
- Click Disable, wait 5 seconds
- Click Enable
- Try your query again
- Click Edit Configuration on Ref server
- Check server URL: https://api.ref.tools/mcp
- Verify
REF_API_KEYenvironment variable exists - Save if you made changes
- Test connection to api.ref.tools in browser
- Check firewall settings
- Try different network (phone hotspot)
- Disable VPN temporarily
- Go to Studio Settings
- Find Clear Cache or similar option
- Restart Studio
- Re-enable Ref server
- Email [email protected]
- Include error message
- Include your OS and Studio version
Content Format Issues
Content Format Issues
-
Complex source formatting
- Some documentation sites have complex layouts
- Tables, diagrams, custom elements
- JavaScript-rendered content
-
Studio rendering issue
- Markdown renderer in Studio
- Special characters not escaped
-
Source site structure changed
- Documentation site was redesigned
- Ref parser needs updating
- Clean markdown output
- Preserved code blocks with syntax highlighting
- Working links
- Readable headers and lists
- Tables formatted correctly
- Visit the source URL in your browser
- Compare with Ref’s output
- Determine if issue is source or conversion
- Email [email protected] with:
- The URL with formatting issues
- Screenshot of problem
- Expected vs actual output
- Your Ref account email
- Search for same information from different site
- Use official documentation vs community tutorials
- Try GitHub README instead of external docs
- Visit URL directly
- Copy relevant content manually
- Use AI to help extract key information
- Heavy JavaScript-rendered content may not convert well
- Complex interactive documentation may lose functionality
- Diagrams and images are not included (markdown only)
- Some tables may render suboptimally
Links & Resources
GitHub Repository
Ref.tools Website
Sign Up
Dashboard
Report Issues
Email Support
Related MCP Servers
GitHub
Tavily
Echo
Learning Resources
Token Efficiency Best Practices
Token Efficiency Best Practices
- ✅ “React useEffect cleanup function”
- ✅ “Stripe payment intent error handling”
- ❌ “React hooks” (too broad)
- ❌ “Stripe documentation” (too vague)
- Don’t repeat similar questions
- Build on previous searches with follow-ups
- Trust the de-duplication
- Avoid starting new conversations unnecessarily
- Start with overview: “What is Zustand?”
- Then specifics: “How do I use Zustand middleware?”
- Then edge cases: “Zustand with TypeScript?”
- Each query builds without repetition
- Ref knows what’s relevant for your query
- Don’t request “complete documentation”
- Follow up with specific questions if needed
- Remember: less tokens = better AI responses
- Track total tokens in conversation (Studio shows this)
- Start fresh conversation when context feels full
- Watch for declining AI response quality
- Clear context when switching topics
- ❌ Starting new conversations unnecessarily
- ❌ Asking the same question multiple ways
- ❌ Requesting full documentation dumps
- ❌ Ignoring Ref’s smart filtering
- ❌ Over-reading URLs (read one at a time)
- Search with specific query → ~54 tokens
- Read most relevant URL → ~385 tokens
- Follow-up question → ~54 tokens (new search)
- Read second URL if needed → ~385 tokens
Query Writing Tips
Query Writing Tips
- Include library/framework name
- Mention programming language
- State your goal or use case
- Include version if relevant
- “How do I…” → Implementation guidance
- “What is…” → Concept explanation
- “Show me…” → Code examples
- “Compare…” → Feature comparison
- “What’s the best way to…” → Best practices
- Mention your environment (Node.js, browser, etc.)
- Include relevant technologies (TypeScript, React, etc.)
- State constraints (performance, security, etc.)
- What are you trying to accomplish?
- What problem are you solving?
- What feature are you building?
- ✅ “How do I authenticate with the Stripe API using API keys?”
- ✅ “What’s the endpoint for creating Twilio SMS messages?”
- ❌ “Stripe” (too vague)
- ❌ “API documentation” (not specific)
- ✅ “How do I use React Query for data fetching?”
- ✅ “Python asyncio error handling best practices”
- ❌ “React Query” (no clear goal)
- ❌ “Python async” (too broad)
- ✅ “Next.js server-side rendering vs static site generation”
- ✅ “Django authentication with JWT tokens”
- ❌ “Next.js features” (too broad)
- ❌ “Django security” (too vague)
- ✅ “Solutions for TypeError Cannot read property map of undefined in React”
- ✅ “How to fix Python asyncio event loop already running error”
- ❌ “Error in my code” (no context)
- ❌ “Help with bug” (not specific)
- ✅ “React performance optimization for large lists”
- ✅ “PostgreSQL connection pooling best practices for Node.js”
- ❌ “Make app faster” (too vague)
- ❌ “Database optimization” (too broad)
- ✅ “What changed in Express 5 from Express 4 breaking changes”
- ✅ “How to migrate Vue 2 filters to Vue 3”
- ❌ “New version” (no context)
- ❌ “Upgrade help” (not specific)
Session Management
Session Management
-
Session creation
- Each new conversation creates a session
- Session tracks all your searches and reads
- Persists for the entire conversation
- Automatically cleared when you start new conversation
-
De-duplication
- Ref remembers every search result returned
- Filters out results you’ve already seen
- Allows query refinement without repetition
- Keeps context clean and focused
-
Progressive refinement
- Each search builds on previous ones
- Follow-up questions get new information only
- No manual management needed
- Automatic and transparent
- “Python async/await syntax” → Returns basic intro to async/await
- “Python async error handling” → Returns error handling (NO repeat of basics)
- “Python async performance best practices” → Returns performance tips (NO repeat of previous results)
- “How do I use asyncio.gather?” → Returns gather() documentation (NO repeat of anything)
- Completely different topic/library
- Want to see previous results again
- Context window getting full
- AI responses degrading in quality
- Switching projects or tasks
- ❌ Think you’ll get better results (won’t)
- ❌ Want to “reset” search quality (unnecessary)
- ❌ Afraid of context bloat (Ref prevents this)
- ❌ Just finished one query (use same session!)
- Cleaner context: No repeated information
- Better AI: More room for relevant content
- Faster research: Ask follow-ups without waste
- Cost savings: 60-95% fewer tokens
- Natural flow: Works like human conversation
Private Documentation Setup
Private Documentation Setup
- Pro plan or higher ($29/mo)
- GitHub repositories (public or private)
- Or PDF documentation files
- Read access to repositories
- Log in to ref.tools/dashboard
- Click Upgrade or Billing
- Choose Pro plan ($29/mo)
- Enter payment information
- Confirm upgrade
- https://github.com/yourorg/repo1
- https://github.com/yourorg/repo2
- https://github.com/yourorg/internal-docs
- [Attach PDFs or provide download links]
- https://wiki.yourcompany.com
- [Provide access credentials if needed]
- Any special instructions or requirements
- Preferred re-indexing frequency
- Specific branches to index (default: main/master)
- Go to repository Settings → Collaborators
- Add Ref bot account (they’ll provide username)
- Grant Read access only
- Go to GitHub Settings → Developer settings → Personal access tokens → Fine-grained tokens
- Create new token
- Set repository access to only needed repos
- Grant “Contents: Read-only” permission
- Send token to [email protected] (securely)
- Initial indexing: 24-48 hours
- Email confirmation when complete
- Incremental updates: Automatic (usually daily)
- Re-indexing on significant changes
- “Search my private docs for authentication patterns”
- “Find documentation in our internal repos about API gateway”
- Include
ref_src=privatein query to search only private docs - Or use
ref_src=allto search both public and private
- Use clear README.md files in each repo
- Organize docs/ folders with logical structure
- Use meaningful file names
- Include code examples in documentation
- Keep documentation up to date
- Index only necessary repositories
- Use fine-grained tokens (not full repo access)
- Regularly audit indexed repositories
- Remove access when team members leave
- Monitor search queries for sensitive data
- Update documentation regularly
- Notify Ref of major doc restructures
- Request re-indexing after big changes
- Use conventional commit messages
- Keep important docs in main/master branch
Supported Documentation Types
Supported Documentation Types
- Framework docs (React, Vue, Angular, Django, etc.)
- Language references (Python, JavaScript, Go, Rust, etc.)
- Library documentation (npm, PyPI, crates.io, etc.)
- API references (Stripe, Twilio, AWS, GCP, etc.)
- Database documentation (PostgreSQL, MongoDB, Redis, etc.)
- Tool guides (Docker, Kubernetes, Terraform, etc.)
- README.md files
- docs/ folders
- Wiki pages
- Code examples
- Issue discussions (limited)
- Tutorial sites
- Blog posts
- Stack Overflow (via web search fallback)
- Community forums
- Technical articles
- Company internal libraries
- Proprietary frameworks
- Internal API documentation
- Custom tool guides
- Architecture documentation
- Code example repositories
- API specifications
- Technical manuals
- Internal wiki exports
- Product documentation
- Design system guides
- Architecture diagrams with text
- Confluence pages
- Notion docs
- GitHub wikis (private)
- Custom internal wikis
- ❌ Content behind login walls
- ❌ Paywalled documentation sites
- ❌ SSO-protected wikis (unless added as private docs)
- ❌ Sites requiring JavaScript to render
- ❌ Interactive documentation playgrounds
- ❌ Content generated client-side
- ❌ Captcha-protected sites
- ❌ Video content (YouTube, courses)
- ❌ Audio podcasts
- ❌ Images without text
- ❌ Diagrams without descriptions
- ❌ Sites blocking automated access
- ❌ Rate-limited APIs without key
- ❌ Geofenced content
- ❌ Content violating ToS to scrape
- Email [email protected]
- Include: Full URL to documentation site
- Briefly explain why it’s useful
- Most requests added within 1 week
- ✅ 1000+ documentation sites
- ✅ All major frameworks and languages
- ✅ Top 100 npm packages
- ✅ Top 50 PyPI packages
- ✅ Major cloud providers (AWS, GCP, Azure)
- ✅ Popular APIs (Stripe, Twilio, SendGrid, etc.)
Integration with Other Tools
Integration with Other Tools
- Ref: Search API documentation
- GitHub: Read actual code from repositories
- Workflow: Understand API → See implementation examples
- Ref: “How do I authenticate with GitHub API?” → Returns authentication documentation
- GitHub: “Show me authentication code in example-repo” → Returns real implementation
- Implement with both docs and code examples
- Ref: Technical documentation and API references
- Tavily: General web search and research
- Workflow: Technical specs → Broader context
- Ref: “Stripe payment intent API documentation” → Returns official API reference
- Tavily: “Stripe payment intent best practices 2025” → Returns blog posts, tutorials, discussions
- Combine official docs with community wisdom
- Ref: PostgreSQL documentation
- PostgreSQL: Execute queries and analyze
- Workflow: Learn syntax → Test queries
- Ref: “PostgreSQL JSON functions documentation” → Returns JSONB operators and functions
- PostgreSQL: Execute test queries with JSONB → See real results and performance
- Optimize based on docs and actual performance
- Ref: Get documentation and examples
- Code Server: Test code immediately
- Workflow: Read docs → Write code → Test → Refine
- Ref: “Stripe payment intent creation”
- Ref: “PostgreSQL transaction best practices”
- Code: Write payment processing function
- PostgreSQL: Test database schema and queries
- Ref: “Stripe webhook handling”
- Code: Implement webhook endpoint
- Test end-to-end
- Specialized capabilities: Each server does one thing well
- Complementary features: Tools work together naturally
- Flexible workflows: Combine as needed for your task
- Context sharing: AI maintains context across servers
- Single conversation: No switching between interfaces