search_books_by_author
Find books by author name to locate specific titles or discover an author's complete works in the bookstore inventory.
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 main handler function for the 'search_books_by_author' tool. It loads all books and filters those containing the author_query (case-insensitive). Registered via @mcp.tool() decorator.@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()]