Skip to main content
Glama
moria97
by moria97

list-movie-reviews

Retrieve movie reviews from Douban by providing the movie ID to analyze audience feedback and critical perspectives.

Instructions

list movie reviews

Input Schema

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

Implementation Reference

  • MCP tool handler for 'list-movie-reviews': validates input ID, fetches movie reviews via getMovieReviews, formats results as a markdown table, and returns structured text content.
    async (args) => {
      if (!args.id) {
        throw new McpError(ErrorCode.InvalidParams, "douban movie id must be provided")
      }
    
      const reviews = await getMovieReviews({ id: args.id })
      const text = json2md({
        table: {
          headers: ['title', 'rating', 'summary', 'id'],
          rows: reviews.map(_ => ({
            id: _.id,
            title: _.title,
            rating: `${_.rating?.value || 0} (有用:${_.useful_count || 0}人)`,
            summary: _.abstract
          }))
        }
      })
    
      return {
        content: [{ type: "text", text }]
      }
    }
  • Zod schema for input parameters of the 'list-movie-reviews' tool, requiring a douban movie ID.
    {
      id: z.string().describe('douban movie id, e.g. "1234567890"')
    },
  • src/index.ts:122-149 (registration)
    Registration of the 'list-movie-reviews' tool in the MCP server using server.tool, specifying name from TOOL enum, description, input schema, and handler function.
      TOOL.LIST_MOVIE_REVIEWS,
      "list movie reviews",
      {
        id: z.string().describe('douban movie id, e.g. "1234567890"')
      },
      async (args) => {
        if (!args.id) {
          throw new McpError(ErrorCode.InvalidParams, "douban movie id must be provided")
        }
    
        const reviews = await getMovieReviews({ id: args.id })
        const text = json2md({
          table: {
            headers: ['title', 'rating', 'summary', 'id'],
            rows: reviews.map(_ => ({
              id: _.id,
              title: _.title,
              rating: `${_.rating?.value || 0} (有用:${_.useful_count || 0}人)`,
              summary: _.abstract
            }))
          }
        })
    
        return {
          content: [{ type: "text", text }]
        }
      }
    )
  • Helper function that performs the actual API request to fetch movie reviews from Douban's Frodo API endpoint.
    export async function getMovieReviews(params: {
      id: string
    }) {
      const res = await requestFrodoApi(`/movie/${params.id}/reviews`);
      return res?.reviews ? res.reviews : []
    }
  • TypeScript interface defining the expected structure of individual movie reviews returned by the API.
    interface MovieReview {
      id: string
      title: string
      alt: string
      subject_id: string
      author: {
        id: string
        name: string
        uid: string
        signature: string
        alt: string
        avatar: string
      }[]
      rating: {
        max: number
        numRaters: number
        average: string
        min: number
      }
      summary: string
    }

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.0.0
    • addedInput schema / $schema
      Added value: +"http://json-schema.org/draft-07/schema#"
    • addedInput schema / additionalProperties
      Added value: +false
  2. First observed

TDQS

C2.2/5.0
Behavior2/5

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

With no annotations available, the description carries full responsibility for behavioral disclosure. 'List' implies a read-only operation, but it does not disclose pagination, ordering, response format, error behavior, or whether the id parameter must correspond to an existing movie.

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 extremely brief, but it is under-specified rather than concise. It merely repeats the tool name and omits any valuable context, so its brevity is not a strength.

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?

Despite the simple one-parameter input, there is no output schema and no mention of return values, ordering, or limits. The description leaves the agent guessing about what data a 'movie review' listing actually contains, making it incomplete.

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%: the only parameter, 'id', is documented as 'douban movie id' with an example. The tool description does not add parameter-level meaning, but the schema already provides adequate semantics, so baseline 3 applies.

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 movie reviews' is a verb+resource statement, but it exactly restates the tool name, adding no new specificity. It does not explain what constitutes a review, scope, or how it differs from similarly named tools like list-tv-reviews or get-movie-detail.

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 about when to use this tool versus alternatives. There is no mention of prerequisites (e.g., needing a movie id), no exclusions, and no comparison to sibling tools like search-movie or get-movie-detail.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.