Skip to main content
Glama
hongfanmeng

Bookstore MCP Server

by hongfanmeng

search_books_by_author

Find books in a bookstore by entering an author's name to retrieve their available works.

Instructions

Search books by author.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
author_queryYes

Implementation Reference

  • The handler function for the 'search_books_by_author' tool. It loads all books and returns those where the author name contains the given query string (case-insensitive search). The schema is inferred from the type hint (author_query: str) and docstring.
    @mcp.tool()
    def search_books_by_author(author_query: str):
        """Search books by author."""
        books = load_books()
        return [book for book in books if author_query.lower() in book["author"].lower()]
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states it's a search operation, implying read-only behavior, but doesn't disclose any behavioral traits such as pagination, result format, error handling, or rate limits. This leaves significant gaps for an agent to understand how to use it effectively.

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 a single, efficient sentence with zero waste. It's appropriately sized and front-loaded, making it easy to parse quickly without unnecessary details.

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

Completeness2/5

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

Given no annotations, 0% schema coverage, no output schema, and multiple sibling tools, the description is incomplete. It lacks details on behavior, parameters, and usage context, making it inadequate for an agent to select and invoke this tool correctly among alternatives.

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

Parameters2/5

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

Schema description coverage is 0%, and the description doesn't add any meaning beyond the schema. It mentions 'by author' but doesn't explain the 'author_query' parameter's semantics, such as expected format (e.g., full name, partial match) or examples. With low coverage, the description fails to compensate.

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

Purpose3/5

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

The description 'Search books by author' clearly states the verb ('search') and resource ('books'), but it's vague about scope and doesn't distinguish from siblings like 'search_books_by_title' or 'get_all_books'. It's functional but lacks specificity about what kind of search it performs.

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?

No guidance is provided on when to use this tool versus alternatives like 'search_books_by_title' or 'get_all_books'. The description implies usage for author-based searches but doesn't specify exclusions, prerequisites, or comparison with siblings.

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/hongfanmeng/bookstore-mcp'

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