Skip to content

Conversation

@danbarr
Copy link
Collaborator

@danbarr danbarr commented Dec 6, 2025

Description

Adds a new concept guide explaining when and why to use tool filtering and overrides to optimize LLM context and reduce context pollution. The guide follows the Diataxis "explanation" framework, focusing on understanding concepts rather than step-by-step instructions.

The guide covers:

  • The context pollution problem with concrete examples (100+ tools across multiple servers)
  • Tool filtering: what it is, when to use it, and seven use cases
  • Tool overrides: what they are, when to use them, and five scenarios
  • Combined usage patterns with "Why this works" explanations
  • Decision framework for choosing between features
  • Trade-offs and considerations (configuration overhead, maintenance burden, etc.)
  • Measuring optimization impact (performance, accuracy, token consumption)
  • Best practices for implementation

Also updates sidebar labels for both the new guide and the Groups guide to be more outcome-oriented and descriptive.

Related issues/PRs

Closes #361

Screenshots

N/A - text-only documentation

Merge checklist

Content

  • New pages include a frontmatter section with title and description at a minimum
  • Sidebar navigation (sidebars.ts) updated for added, deleted, reordered, or renamed files
  • Redirects added to vercel.json for moved, renamed, or deleted pages (i.e., if the URL slug changed) (N/A - no moved/renamed/deleted pages)

Reviews

  • Content has been reviewed for technical accuracy
  • Content has been reviewed for spelling, grammar, and style

Copilot AI review requested due to automatic review settings December 6, 2025 02:06
@vercel
Copy link

vercel bot commented Dec 6, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
docs-website Ready Ready Preview Comment Dec 6, 2025 2:32pm

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a comprehensive concept guide explaining tool filtering and overrides in ToolHive, designed to help users optimize LLM context and reduce context pollution. The guide follows the Diataxis "explanation" framework, focusing on understanding concepts rather than step-by-step instructions.

Key changes:

  • New concept guide covering tool filtering, overrides, and their combined usage patterns
  • Updated sidebar labels for both the new guide and the existing Groups guide to be more outcome-oriented
  • Comprehensive decision framework and best practices for implementing these optimization features

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
docs/toolhive/concepts/tool-optimization.mdx New 392-line concept guide explaining when and why to use tool filtering and overrides, including use cases, patterns, trade-offs, and best practices
sidebars.ts Added the new tool-optimization guide to the concepts section between groups and registry-criteria
docs/toolhive/concepts/groups.mdx Updated sidebar_label from "Groups" to "Organizing MCP servers" for consistency with outcome-oriented naming pattern

Signed-off-by: Dan Barr <6922515+danbarr@users.noreply.github.com>
@danbarr
Copy link
Collaborator Author

danbarr commented Dec 6, 2025

@JAORMX thanks for the review. I've addressed the items you pointed out, also tightened it up quite a bit overall - cut out about 1/3 of the overall length.

@danbarr danbarr merged commit 4701149 into main Dec 6, 2025
6 checks passed
@danbarr danbarr deleted the add-tool-optimization-concept branch December 6, 2025 14:55
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.

New concept guide: tool filtering and overrides for optimizing LLM context

3 participants