Skip to main content
Glama
srgsanky

Personal Library MCP Server

by srgsanky

list_books

Retrieve books from your personal library database. Filter to show only unread books using the unread_only parameter for focused reading management.

Instructions

Lists books in the library. Set unread_only=True to see only the books you haven't read yet.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
unread_onlyNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • server.py:52-66 (handler)
    The `list_books` tool handler, implemented in `server.py`, interacts with an SQLite database to return a JSON list of books, optionally filtered by read status.
    @mcp.tool()
    def list_books(unread_only: bool = False) -> str:
        """
        Lists books in the library. 
        Set unread_only=True to see only the books you haven't read yet.
        """
        conn = get_db_connection()
        cursor = conn.cursor()
        if unread_only:
            cursor.execute("SELECT isbn, name, owned, read FROM books WHERE read = 0")
        else:
            cursor.execute("SELECT isbn, name, owned, read FROM books")
        books = [dict(row) for row in cursor.fetchall()]
        conn.close()
        return json.dumps(books, indent=2)
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 tool lists books but doesn't mention whether this is a read-only operation, if it requires authentication, how results are paginated or sorted, or what the output format entails. This is a significant gap for a tool with potential behavioral nuances.

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 extremely concise with two sentences that directly address the tool's function and key parameter usage. It's front-loaded with the core purpose and wastes no words, making it easy for an agent to parse quickly.

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 adequate. However, it lacks context on behavioral traits like authentication needs or result limitations, and doesn't differentiate from siblings, leaving gaps in overall completeness.

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 context for the 'unread_only' parameter by explaining its effect ('to see only the books you haven't read yet'), which goes beyond the schema's basic title and type. Since schema description coverage is 0% and there's only one parameter, this compensation is effective, though it could specify default behavior more explicitly.

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 ('Lists') and resource ('books in the library'), making it immediately understandable. However, it doesn't explicitly distinguish this from sibling tools like 'search_books' or 'update_book_status', which would require mentioning that this is a basic listing operation without filtering beyond unread status.

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 like 'search_books' or 'add_book'. It mentions the 'unread_only' parameter but doesn't explain broader usage contexts, prerequisites, or exclusions, leaving the agent to infer when this tool is appropriate.

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/srgsanky/mcp-demo'

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