feat: improve tool descriptions with pagination guidance and MCP annotations#198
Open
bryankthompson wants to merge 3 commits intobrave:mainfrom
Open
feat: improve tool descriptions with pagination guidance and MCP annotations#198bryankthompson wants to merge 3 commits intobrave:mainfrom
bryankthompson wants to merge 3 commits intobrave:mainfrom
Conversation
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>
paulhumphrey1001-arch
approved these changes
Dec 23, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR improves the tool descriptions and parameter documentation across all 6 Brave Search tools to help LLMs make better use of the API.
Changes
MCP Tool Annotations: Added proper hints to all tools:
readOnlyHint: true- All tools only read dataidempotentHint: true- Same request yields same resultsopenWorldHint: true- Tools access external Brave Search APIContext Control Tips: Added guidance to tool descriptions with:
countvalues for different use casesPagination Parameter Examples: Enhanced
countandoffsetdescriptions with concrete examples:Bug Fix: Removed incorrect offset reference from Images tool count parameter (Images doesn't support pagination via offset)
Files Changed
src/tools/*/index.ts- Tool annotations and context control tipssrc/tools/*/params.ts- Enhanced parameter descriptions with examplessrc/tools/images/schemas/input.ts- Removed incorrect offset mentionTesting
npm run build)npm run format:check)🤖 Generated with Claude Code