Skip to main content
Glama
7robots

Micro.blog Books MCP Server

by 7robots

rename_bookshelf

Change the name of an existing bookshelf in your Micro.blog book collection to better organize your reading materials and reflect updated categorization.

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • MCP tool call handler for 'rename_bookshelf' that extracts parameters and delegates to the MicroBooksClient.renameBookshelf method.
    case "rename_bookshelf": {
      const { bookshelf_id, name } = args;
      const result = await client.renameBookshelf(bookshelf_id, name);
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    }
  • Core helper method in MicroBooksClient that validates inputs and makes the HTTP POST request to the Micro.blog API to rename a bookshelf.
    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` };
    }
  • Tool registration entry in the list of available tools, including name, description, and input schema for MCP listTools response.
      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"],
      },
    },
  • Python FastMCP tool handler for 'rename_bookshelf' using decorator, delegates to client method (Modal variant).
    async def rename_bookshelf(bookshelf_id: int, name: str) -> str:
    	"""Rename a bookshelf.
    	
    	Args:
    		bookshelf_id: The ID of the bookshelf to rename
    		name: The new name for the bookshelf
    	"""
    	try:
    		result = await client.rename_bookshelf(bookshelf_id, name)
    		return json.dumps(result, indent=2)
    	except Exception:
  • Core helper in MicroBooksClient for Modal implementation that performs the API POST request.
    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"}
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('rename') but doesn't cover critical aspects like required permissions, whether the change is reversible, rate limits, or error conditions (e.g., invalid ID or duplicate names). This is a significant gap for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded, starting with the core purpose followed by parameter details. It avoids unnecessary fluff, though the 'Args:' section could be integrated more seamlessly into the flow.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (a simple mutation with 2 parameters) and the presence of an output schema, the description is somewhat complete but lacks depth. It covers the basic action and parameters but misses behavioral context and usage guidelines, which are crucial since no annotations are provided.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds minimal semantics beyond the input schema, which has 0% coverage. It names the parameters ('bookshelf_id' and 'name') and gives basic explanations, but doesn't provide format details (e.g., ID constraints or name length limits). With low schema coverage, this partially compensates but leaves gaps.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('rename') and resource ('bookshelf'), making it immediately understandable. However, it doesn't differentiate this tool from potential alternatives among its siblings, such as whether 'update_reading_goal' might also involve renaming or if 'add_bookshelf' handles similar operations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an existing bookshelf), exclusions, or how it relates to sibling tools like 'add_bookshelf' or 'update_reading_goal', leaving usage context unclear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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