search_books_by_author
Find books in a bookstore by entering an author's name to retrieve their available works.
Instructions
Search books by author.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| author_query | Yes |
Implementation Reference
- src/bookstore_mcp/server.py:47-51 (handler)The handler function for the 'search_books_by_author' tool. It loads all books and returns those where the author name contains the given query string (case-insensitive search). The schema is inferred from the type hint (author_query: str) and docstring.@mcp.tool() def search_books_by_author(author_query: str): """Search books by author.""" books = load_books() return [book for book in books if author_query.lower() in book["author"].lower()]