Skip to main content
Glama
moria97
by moria97

browse

Open your browser to view detailed information about a specific Douban book using its unique ID.

Instructions

open default browser and browse douban book detail

Input Schema

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

Implementation Reference

  • Handler function that validates the book ID, opens the Douban book detail page in the default browser using the 'open' package, and returns a confirmation message.
    async (args) => {
      if (!args.id) {
        throw new McpError(ErrorCode.InvalidParams, "douban book id must be provided")
      }
    
      await open(`https://book.douban.com/subject/${args.id}/`);
    
      return {
        content: [{
          type: "text",
          text: `The Douban Book Page has been opened in your default browser`,
        }]
      }
    }
  • Zod schema for the tool input, defining the required 'id' parameter as a string.
    {
      id: z.string().describe('douban book id, e.g. "1234567890"')
    },
  • src/index.ts:183-203 (registration)
    Registers the 'browse' tool on the MCP server with name TOOL.BROWSE, description, input schema, and handler function.
    server.tool(
      TOOL.BROWSE,
      "open default browser and browse douban book detail",
      {
        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")
        }
    
        await open(`https://book.douban.com/subject/${args.id}/`);
    
        return {
          content: [{
            type: "text",
            text: `The Douban Book Page has been opened in your default browser`,
          }]
        }
      }
    );
  • TypeScript enum TOOL defining the constant BROWSE = 'browse' used as the tool name in 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'
    }

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

B3.1/5.0
Behavior2/5

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

The description discloses that it opens a browser, but it does not explain the return value, whether it blocks, or any side effects beyond launching the browser. With no annotations, the description carries the full burden and falls short.

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 sentence with no filler, front-loaded with the action 'open'. It is highly concise and easy to parse.

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

Completeness3/5

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

For a simple tool with one parameter, the description is minimally adequate, but it lacks information about what the tool returns or does after opening the browser. No output schema exists, so this information should be in the description.

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?

The schema already fully describes the single 'id' parameter as a Douban book ID. The description adds no additional semantic detail, so baseline 3 is appropriate.

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 clearly states it opens the default browser to browse a Douban book detail page, which is a specific action and resource. It distinguishes from sibling tools that search or fetch data, though 'browse' is somewhat generic.

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-book or get-movie-detail. It does not mention use cases, prerequisites, or exclusions.

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