Skip to main content

MCP Tool Search Module

The MCP Server V2 provides a powerful tool search capability as an extension method (tools/search). This is not part of the core MCP spec but provides valuable server-side filtering.

Overview

Tool search supports:
  • Text query: Search in name, description, and tags
  • Category filter: Filter by tool category
  • Tags filter: Filter by one or more tags
  • Annotation filter: Filter by readOnlyHint
  • Pagination: Results are paginated like tools/list

Code Usage

Search by Category

Search by Read-Only Hint

Search by Tags

Combined Filters

Server Handler

The MCP server exposes search via the tools/search method:

Request Parameters

Response Format

Search Algorithm

The search implementation:
  1. Query matching: Case-insensitive search in:
    • Tool name
    • Tool description
    • Tool tags (if any)
  2. Filter application: All filters are AND-ed together
  3. Sorting: Results are sorted by name for deterministic ordering
  4. Pagination: Applied after filtering and sorting

Example: Tool Discovery

See Also