Skip to main content
Glama
hongfanmeng

Bookstore MCP Server

by hongfanmeng

search_books_by_title

Find books in the Bookstore MCP Server by entering a title query to locate specific publications from the inventory.

Instructions

Search books by title.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
title_queryYes

Implementation Reference

  • The main handler function for the 'search_books_by_title' MCP tool. It uses a @mcp.tool() decorator for registration and schema inference from type hints and docstring. Filters books by title substring match (case-insensitive).
    @mcp.tool()
    def search_books_by_title(title_query: str):
        """Search books by title."""
        books = load_books()
        return [book for book in books if title_query.lower() in book["title"].lower()]
Behavior1/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 only states the action ('Search books by title') without detailing how the search works (e.g., exact match, partial match, case sensitivity), what the output includes (e.g., list of books with details), error handling, or any constraints like rate limits or authentication needs. This leaves critical behavioral traits unspecified.

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 ('Search books by title.') that is front-loaded and wastes no words. It directly conveys the core purpose without unnecessary elaboration, making it highly concise and well-structured for its minimal content.

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 the tool's complexity (a search function with 1 parameter), lack of annotations, and no output schema, the description is incomplete. It does not cover behavioral aspects like search behavior, output format, or error conditions, leaving significant gaps for an AI agent to understand and invoke the tool correctly in context with its siblings.

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

Parameters1/5

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

The input schema has 1 parameter with 0% description coverage, and the description does not add any meaning beyond the parameter name 'title_query'. It does not explain what 'title_query' expects (e.g., full title, keywords, wildcards), formatting rules, or examples, failing to compensate for the low schema coverage.

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 'Search books by title' clearly states the verb ('Search') and resource ('books'), specifying the search criterion ('by title'). It distinguishes from siblings like 'search_books_by_author' by indicating the search field, but does not explicitly differentiate from 'get_all_books' or 'get_book_by_id' in terms of scope or method.

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 does not mention when to prefer this over 'search_books_by_author' for title-based queries, 'get_all_books' for unfiltered lists, or 'get_book_by_id' for known IDs, nor does it specify any prerequisites or exclusions for usage.

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