search_books_by_title
Search for books in a bookstore inventory by entering a title query to find specific publications and availability information.
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 core handler function for the 'search_books_by_title' tool. It is registered via the @mcp.tool() decorator and implements the search logic by filtering books whose titles contain the given query string (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()]