Skip to main content
Glama
hongfanmeng

Bookstore MCP Server

by hongfanmeng

get_all_books

Retrieve the complete inventory of books from the bookstore database to view available titles and manage stock.

Instructions

Get all books.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the get_all_books tool. Decorated with @mcp.tool() for registration and implementation. Returns the result of load_books().
    @mcp.tool()
    def get_all_books():
        """Get all books."""
        return load_books()
  • Helper function used by get_all_books to load the list of books from the JSON data file, handling errors gracefully.
    def load_books() -> list[dict]:
        try:
            with open(DATA_PATH, "r") as f:
                return json.load(f)
        except (FileNotFoundError, json.JSONDecodeError):
            return []
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. 'Get all books' implies a read operation but doesn't specify if it's safe, requires authentication, has rate limits, returns paginated results, or what format the output takes. This is inadequate for a tool with no annotation coverage.

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 ('Get all books.'), consisting of a single, front-loaded sentence with no wasted words. It efficiently communicates the core action, though this brevity contributes to gaps in other dimensions.

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 simplicity (0 parameters, no output schema), the description is minimal but incomplete. It lacks context on behavior, usage relative to siblings, and output details, making it insufficient for an agent to fully understand how to invoke and interpret results without additional inference.

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 input schema has 0 parameters with 100% description coverage, so no parameter documentation is needed. The description doesn't add parameter details, which is appropriate, but it also doesn't compensate for any gaps since there are none. A baseline of 4 is applied for zero parameters.

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 'Get all books' states a clear verb ('Get') and resource ('books'), making the basic purpose understandable. However, it lacks specificity about what 'all' means (e.g., all books in a catalog, library, or database) and doesn't distinguish it from siblings like 'get_books_in_stock' or 'search_books_by_author', leaving ambiguity about scope and differentiation.

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 use cases like retrieving a complete list versus filtered searches, prerequisites, or exclusions, leaving the agent to infer usage from the tool name alone among multiple sibling tools.

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