Google Books API Integration
#1
by
aleche28
- opened
Google Books API Integration
This PR adds two MCP tools for integration with Google Books API.
Those tools can be tested with Gradio UI in two dedicated tabs:
- Google Books - Search: search books with filters (title, author, isbn, genre) and return a json with the list of books info. Each book has only some basic information ('lite' version of the book), but full information are available with the other tool described below.
Response object looks like this:
{
"kind": "books#volumes",
"totalItems": 1000000,
"items": [
{
"kind": "books#volume",
"id": "pZ49u0fSuGsC",
"etag": "kCfPFbplXAM",
"selfLink": "https://www.googleapis.com/books/v1/volumes/pZ49u0fSuGsC",
"volumeInfo": {
"title": "Professional Test Driven Development with C#",
"subtitle": "Developing Real World Applications with TDD",
"authors": [
"James Bender",
"Jeff McWherter"
],
...
},
...
},
...
]
}
- Google Books - Get Book By Id: this tool can be useful to retrieve a book by its Google Books ID, returning a json with all information about the book.
In case of success, the returned json looks like a single item from the previous tool's response object (plus some additional fields).
In case of non-existent book, the returned json looks like this:
{
"error": {
"code": 404,
"message": "The volume ID could not be found.",
"errors": [
{
"message": "The volume ID could not be found.",
"domain": "global",
"reason": "notFound"
}
]
}
}
gmacario
changed pull request status to
merged