Skip to main content
Glama
moria97
by moria97

list-book-reviews

Retrieve user reviews for a specific book by providing its Douban ID to analyze reader feedback and opinions.

Instructions

list book reviews

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesdouban book id, e.g. "1234567890"

Implementation Reference

  • src/index.ts:58-86 (registration)
    MCP tool registration for 'list-book-reviews', including description, Zod input schema, and execution handler that fetches reviews and formats them as a markdown table.
    server.tool(
      TOOL.LIST_BOOK_REVIEWS,
      "list book reviews",
      {
        id: z.string().describe('douban book id, e.g. "1234567890"')
      },
      async (args) => {
        if (!args.id) {
          throw new McpError(ErrorCode.InvalidParams, "douban book id must be provided")
        }
    
        const reviews = await getBookReviews({ id: args.id })
        const text = json2md({
          table: {
            headers: ['title', 'rating', 'summary', 'id'],
            rows: reviews.reviews.map(_ => ({
              id: _.id,
              title: _.title,
              rating: `${_.rating?.value || 0} (${_.rating?.count || 0}人)`,
              summary: _.abstract
            }))
          }
        })
    
        return {
          content: [{ type: 'text', text }]
        }
      }
    )
  • Core implementation of fetching book reviews from Douban's Frodo API (`/book/{id}/reviews`), returning structured response with reviews list.
    export async function getBookReviews(params: {
      id: string
    }) {
      const res: {
        count: number
        start: number
        total: number
        reviews: Douban.BookReview[]
      } = await requestFrodoApi(`/book/${params.id}/reviews`)
      return res
    }
  • Input validation schema using Zod, requires 'id' string parameter.
    {
      id: z.string().describe('douban book id, e.g. "1234567890"')
    },
  • TOOL enum defining the constant name 'list-book-reviews' used for registration.
    export enum TOOL {
      SEARCH_BOOK = 'search-book',
      LIST_BOOK_REVIEWS = 'list-book-reviews',
      SEARCH_MOVIE = 'search-movie',
      LIST_MOVIE_REVIEWS = 'list-movie-reviews',
      BROWSE = 'browse',
      LIST_GROUP_TOPICS = 'list-group-topics',
      GET_GROUP_TOPIC_DETAIL = 'get-group-topic-detail'
    }
  • Type definition for Douban.BookReview, used in the response typing for getBookReviews.
    interface BookReview {
      rating: {
        count: number;
        max: number;
        star_count: number;
        value: number;
      } | null;
      useful_count: number;
      sharing_url: string;
      title: string;
      url: string;
      abstract: string;
      uri: string;
      ad_info: null;
      topic: null;
      photos: any[];
      reactions_count: number;
      comments_count: number;
      user: {
        kind: string;
        name: string;
        url: string;
        uri: string;
        avatar: string;
        is_club: boolean;
        type: string;
        id: string;
        uid: string;
      };
      create_time: string;
      reshares_count: number;
      type: string;
      id: string;
      subject: {
        press: string[];
        type: string;
        pubdate: string[];
        title: string;
      };
    
    }
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. However, it offers no information about behavioral traits such as read/write nature, authentication requirements, rate limits, pagination, or response format. The description is minimal and fails to compensate for the lack of annotations, leaving critical operational details unspecified.

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

Conciseness2/5

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

The description is overly concise to the point of under-specification, consisting of only three words. While it avoids waste, it fails to provide necessary context and structure. A more effective description would be front-loaded with key details, but this one lacks any substantive content, making it inefficient rather than appropriately concise.

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

Completeness1/5

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

Given the lack of annotations and output schema, the description is incomplete for a tool with one required parameter. It does not explain what the tool returns, how results are formatted, or any behavioral aspects. For a list operation, details like pagination, sorting, or error handling are missing, making the description inadequate for effective tool use.

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

Parameters3/5

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

Schema description coverage is 100%, with the single parameter 'id' fully documented in the schema as 'douban book id, e.g. "1234567890"'. The description adds no additional meaning beyond what the schema provides, such as format constraints or usage examples. With high schema coverage, the baseline score of 3 is appropriate, as the description does not compensate but also does not detract.

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

Purpose2/5

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

The description 'list book reviews' is a tautology that essentially restates the tool name without adding meaningful context. It specifies the verb 'list' and resource 'book reviews', but lacks any differentiation from sibling tools like 'list-movie-reviews' or 'list-tv-reviews' beyond the resource type. No additional scope, filtering capabilities, or purpose details are provided.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/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-not scenarios, prerequisites, or comparisons to sibling tools such as 'search-book' or 'browse'. There is no implied context or explicit usage instructions, leaving the agent with no direction on tool selection.

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/moria97/douban-mcp'

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