Skip to main content
Glama
7robots

Micro.blog Books MCP Server

by 7robots

rename_bookshelf

Change the name of a bookshelf in your Micro.blog book collection to better organize your reading materials and track your reading goals.

Instructions

Rename a bookshelf.

Args: bookshelf_id: The ID of the bookshelf to rename name: The new name for the bookshelf

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bookshelf_idYes
nameYes

Implementation Reference

  • Core handler in MicroBooksClient that sends POST request to Micro.blog API to rename the bookshelf.
    async def rename_bookshelf(self, bookshelf_id: int, name: str) -> dict: """Rename a bookshelf.""" async with httpx.AsyncClient() as client: response = await client.post( urljoin(BASE_URL, f"/books/bookshelves/{bookshelf_id}"), headers=self.headers, data={"name": name}, ) response.raise_for_status() return {"success": True, "message": f"Bookshelf renamed to '{name}' successfully"}
  • Core handler in MicroBooksClient that sends POST request to Micro.blog API to rename the bookshelf (JavaScript implementation).
    async renameBookshelf(bookshelfId, name) { if (!Number.isInteger(bookshelfId) || bookshelfId <= 0) { throw new Error("Bookshelf ID must be a positive integer"); } if (!name || typeof name !== 'string' || name.trim().length === 0) { throw new Error("Bookshelf name is required and must be a non-empty string"); } await this.makeRequest(`/books/bookshelves/${bookshelfId}`, { method: "POST", body: new URLSearchParams({ name: name.trim() }), }); return { success: true, message: `Bookshelf renamed to '${name.trim()}' successfully` };
  • Core handler in MicroBooksClient that sends POST request to Micro.blog API to rename the bookshelf (DXT Python version).
    async def rename_bookshelf(self, bookshelf_id: int, name: str) -> dict: """Rename a bookshelf.""" async with httpx.AsyncClient() as client: response = await client.post( urljoin(BASE_URL, f"/books/bookshelves/{bookshelf_id}"), headers=self.headers, data={"name": name}, ) response.raise_for_status() return {"success": True, "message": f"Bookshelf renamed to '{name}' successfully"}
  • Core handler in MicroBooksClient that sends POST request to Micro.blog API to rename the bookshelf (Modal version).
    async def rename_bookshelf(self, bookshelf_id: int, name: str) -> dict: """Rename a bookshelf.""" async with httpx.AsyncClient() as client: response = await client.post( urljoin(BASE_URL, f"/books/bookshelves/{bookshelf_id}"), headers=self.headers, data={"name": name}, ) response.raise_for_status() return {"success": True, "message": f"Bookshelf renamed to '{name}' successfully"}
  • Input schema definition for the rename_bookshelf tool in the JS implementation.
    name: "rename_bookshelf", description: "Rename an existing bookshelf", inputSchema: { type: "object", properties: { bookshelf_id: { type: "integer", description: "The ID of the bookshelf to rename", minimum: 1, }, name: { type: "string", description: "The new name for the bookshelf", minLength: 1, }, }, required: ["bookshelf_id", "name"], },

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