Skip to main content
Glama
7robots

Micro.blog Books MCP Server

by 7robots

add_bookshelf

Create a new bookshelf in your Micro.blog book collection to organize and categorize books for better management and tracking.

Instructions

Add a new bookshelf.

Args: name: The name of the new bookshelf

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Core implementation of addBookshelf in MicroBooksClient: validates name, POSTs to Micro.blog /books/bookshelves endpoint, returns success message.
    async addBookshelf(name) {
      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", {
        method: "POST",
        body: new URLSearchParams({ name: name.trim() }),
      });
      
      return { success: true, message: `Bookshelf '${name.trim()}' created successfully` };
  • JSON schema definition for the add_bookshelf tool input: object with required 'name' string property.
    name: "add_bookshelf",
    description: "Create a new bookshelf",
    inputSchema: {
      type: "object",
      properties: {
        name: {
          type: "string",
          description: "The name of the new bookshelf",
          minLength: 1,
        },
      },
      required: ["name"],
    },
  • Registration of tools list including add_bookshelf via MCP ListToolsRequestHandler.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: tools,
      };
  • Core handler in MicroBooksClient for adding bookshelf via HTTP POST to Micro.blog API.
    async def add_bookshelf(self, name: str) -> dict:
        """Add a new bookshelf."""
        async with httpx.AsyncClient() as client:
            response = await client.post(
                urljoin(BASE_URL, "/books/bookshelves"),
                headers=self.headers,
                data={"name": name},
            )
            response.raise_for_status()
            return {"success": True, "message": f"Bookshelf '{name}' created successfully"}
  • FastMCP tool registration and wrapper handler for add_bookshelf, calls client method and returns JSON.
    async def add_bookshelf(name: str) -> str:
        """Add a new bookshelf.
        
        Args:
            name: The name of the new bookshelf
        """
        try:
            result = await client.add_bookshelf(name)
            return json.dumps(result, indent=2)
        except Exception:
            logger.exception("Failed to add bookshelf")
            raise
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states 'Add a new bookshelf,' which implies a write/mutation operation, but doesn't disclose any behavioral traits such as whether this requires authentication, what happens on success/failure, if there are rate limits, or if the bookshelf is immediately available for use. For a mutation tool with zero annotation coverage, this is a significant gap in transparency.

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

Conciseness5/5

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

The description is appropriately sized and front-loaded, with the core purpose stated in the first sentence ('Add a new bookshelf.') and parameter details following in a clear 'Args:' section. Every sentence earns its place by directly contributing to understanding the tool's function and inputs, with no redundant or verbose language.

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 low complexity (one parameter) and the presence of an output schema (which handles return values), the description is minimally complete. It covers the basic purpose and parameter meaning but lacks behavioral context (e.g., side effects, error handling) and usage guidelines. For a simple creation tool, this is adequate but leaves clear gaps that could hinder optimal agent use.

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

Parameters4/5

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

The description adds meaningful semantics beyond the input schema, which has 0% description coverage. It explains that the 'name' parameter is 'The name of the new bookshelf,' providing context that the schema's title ('Name') alone lacks. Since there's only one parameter and the schema coverage is low, the description effectively compensates by clarifying the parameter's purpose, though it doesn't detail constraints like length or allowed characters.

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 verb ('Add') and resource ('a new bookshelf'), making the purpose immediately understandable. It distinguishes this tool from siblings like 'rename_bookshelf' or 'get_bookshelves' by specifying creation rather than modification or retrieval. However, it doesn't explicitly mention what system or context this bookshelf belongs to (e.g., a personal library vs. a shared system), which prevents a perfect score.

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., whether you need permissions or an existing library), when not to use it (e.g., for updating existing bookshelves), or direct alternatives among siblings like 'rename_bookshelf' for modification. This lack of contextual guidance leaves the agent to infer usage from the tool name alone.

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