Skip to main content
Glama
7robots

Micro.blog Books MCP Server

by 7robots

change_book_cover

Update a book's cover image in your Micro.blog collection by providing the bookshelf ID, book ID, and new cover URL.

Instructions

Change the cover for a book.

Args: bookshelf_id: The ID of the bookshelf book_id: The ID of the book cover_url: URL to the new cover image

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bookshelf_idYes
book_idYes
cover_urlYes

Implementation Reference

  • MCP tool handler for change_book_cover: wraps the MicroBooksClient method and serializes the result to JSON.
    @mcp.tool() async def change_book_cover(bookshelf_id: int, book_id: int, cover_url: str) -> str: """Change the cover for a book. Args: bookshelf_id: The ID of the bookshelf book_id: The ID of the book cover_url: URL to the new cover image """ try: result = await client.change_book_cover(bookshelf_id, book_id, cover_url) return json.dumps(result, indent=2) except Exception: logger.exception("Failed to change book cover") raise
  • MicroBooksClient helper method that makes HTTP POST request to Micro.blog API to update the book cover.
    async def change_book_cover(self, bookshelf_id: int, book_id: int, cover_url: str) -> dict: """Change the cover for a book.""" async with httpx.AsyncClient() as client: response = await client.post( urljoin(BASE_URL, f"/books/bookshelves/{bookshelf_id}/cover/{book_id}"), headers=self.headers, data={"cover_url": cover_url}, ) response.raise_for_status() return {"success": True, "message": "Book cover updated successfully"}

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/7robots/micro-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server