search_books_by_title
Find books in the Bookstore MCP Server by entering a title query to locate specific publications from the inventory.
Instructions
Search books by title.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title_query | Yes |
Implementation Reference
- src/bookstore_mcp/server.py:40-44 (handler)The main handler function for the 'search_books_by_title' MCP tool. It uses a @mcp.tool() decorator for registration and schema inference from type hints and docstring. Filters books by title substring match (case-insensitive).@mcp.tool() def search_books_by_title(title_query: str): """Search books by title.""" books = load_books() return [book for book in books if title_query.lower() in book["title"].lower()]