Skip to content

feat: add context control tips and improve pagination guidance#197

Closed
bryankthompson wants to merge 5 commits intobrave:mainfrom
bryankthompson:main
Closed

feat: add context control tips and improve pagination guidance#197
bryankthompson wants to merge 5 commits intobrave:mainfrom
bryankthompson:main

Conversation

@bryankthompson
Copy link

Summary

This PR enhances the Brave Search MCP Server with context control tips and improved pagination guidance to help MCP clients optimize token usage.

Changes

🐛 Bug Fix

  • Fixed incorrect offset reference in Images tool count parameter description (Images tool doesn't support pagination)

✨ Tool Description Enhancements

Added comprehensive context control tips to all 6 tool descriptions:

  • Web Search: Start with count=5 for efficiency, pagination limits explained
  • News: Optimal counts for headlines vs comprehensive coverage, freshness filtering tips
  • Videos: Compact metadata allows slightly higher counts, clear pagination examples
  • Images: No pagination available, optimal count ranges for discovery
  • Local: Rich metadata requires smaller counts, Pro plan requirements noted
  • Summarizer: Highlighted as most context-efficient option, no pagination needed

📝 Parameter Description Improvements

Enhanced count and offset parameter descriptions across all tools:

  • Added recommendations for initial queries vs comprehensive results
  • Clear examples showing how pagination works (e.g., "offset=10 gets results 11-20")
  • Consistent guidance across all tools for optimal usage

🔧 Additional Changes

  • Added CLAUDE.md to .gitignore (personal project documentation)

Benefits

  • Improved Developer Experience: Clear guidance on optimal result counts and pagination strategies
  • Context Efficiency: Helps MCP clients like Claude minimize token usage while maintaining information quality
  • Better Documentation: Parameter descriptions now include actionable examples and recommendations
  • Consistency: All tools now follow the same documentation pattern

Testing

  • Successfully built with npm run build
  • Docker container rebuilt and tested
  • Health endpoint verified: http://localhost:10670/ping
  • All TypeScript compilation successful

🤖 Generated with Claude Code

web-flow and others added 4 commits December 18, 2025 08:59
The Images tool does not support pagination via offset parameter, but the
count parameter description incorrectly mentioned combining with offset.
Updated to accurately reflect available functionality and suggest optimal
count values for context efficiency.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Enhanced all 6 Brave Search tool descriptions with comprehensive context
control advice to help MCP clients optimize token usage:

- Web Search: Start with count=5, pagination limits, result filtering tips
- News: Optimal counts for headlines vs coverage, freshness filtering
- Videos: Compact metadata allows higher counts, pagination guidance
- Images: No pagination available, optimal count ranges for discovery
- Local: Rich metadata requires smaller counts, Pro plan requirements
- Summarizer: Most context-efficient option, no pagination needed

These improvements help MCP clients like Claude make informed decisions
about result counts and pagination strategies to minimize context usage
while maintaining information quality.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Enhanced count and offset parameter descriptions across all tools:

- Count parameters: Added recommendations for initial queries vs comprehensive results
- Offset parameters: Added clear examples showing how pagination works
- Consistent guidance: All tools now provide actionable advice for optimal usage

Examples:
- Web: "Start with 5 for context efficiency, use 10-15 for comprehensive results"
- News: "Start with 5-10 for breaking news, use 20 for comprehensive coverage"
- Videos: "offset=10 with count=10 gets videos 11-20"

These improvements make pagination behavior more transparent and help
users make better decisions about result retrieval strategies.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Personal project documentation file should not be tracked in repository.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add FORK.md documenting triepod-ai enhancements
- Add fork notice to README.md with links to upstream
- Add EXPOSE 8080 directive to Dockerfile for HTTP deployments
- Update .gitignore to exclude local deployment files
- Remove docker-compose.yml from repository (keep local only)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@bryankthompson
Copy link
Author

Closing in favor of #198 which contains only the enhancement commits without fork-specific changes (FORK.md, CLAUDE.md gitignore, Dockerfile changes). The clean PR #198 has the same core improvements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants