Skip to main content
Glama
moria97
by moria97

get-group-topic-detail

Retrieve detailed information about a specific Douban group discussion topic using its unique identifier to access content and participant data.

Instructions

get group topic detail

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesdouban group topic id, e.g. "1234567890"

Implementation Reference

  • The core handler function that fetches the group topic detail data from the Douban Frodo API using the shared requestFrodoApi utility.
    // 获取小组话题详情
    export async function getGroupTopicDetail(params: {
      id: string
    }) {
      const res: Douban.TopicDetail = await requestFrodoApi(`/group/topic/${params.id}`)
    
      return res
    }
  • TypeScript interface defining the structure of the group topic detail response from the API.
    interface TopicDetail extends Topic {
      like_count: number
      comments_count: number
      collections_count: number
      reshares_count: number
      content: string
      abstract: string
    }
  • src/index.ts:237-261 (registration)
    Registers the MCP tool 'get-group-topic-detail' with description, Zod input schema (id: string), and handler that fetches data, formats it to markdown, and returns as text content.
    server.tool(
      TOOL.GET_GROUP_TOPIC_DETAIL,
      "get group topic detail",
      {
        id: z.string().describe('douban group topic id, e.g. "1234567890"')
      },
      async (args) => {
        if (!args.id) {
          throw new McpError(ErrorCode.InvalidParams, "douban group topic id must be provided")
        }
    
        const topic = await getGroupTopicDetail({ id: args.id })
        if (!topic?.id) throw new McpError(ErrorCode.InvalidRequest, "request failed")
    
        const tService = new TurndownService()
        const text = `title: ${topic.title}
    tags: ${topic.topic_tags.map(_ => _.name).join('|')}
    content:
    ${tService.turndown(topic.content)}
    `
        return {
          content: [{ type: "text", text }]
        }
      }
    );
  • Utility function to make authenticated requests to the Douban Frodo API, used by getGroupTopicDetail.
    const requestFrodoApi = async (url: string) => {
      const fullURL = 'https://frodo.douban.com/api/v2' + url;
      const date = dayjs().format('YYYYMMDD')
    
      const rParams = {
        os_rom: 'android',
        apiKey: '0dad551ec0f84ed02907ff5c42e8ec70',
        _ts: date,
        _sig: getFrodoSign(fullURL, date),
      };
    
      const oUrl = new URL(fullURL)
    
      for (let key in rParams) {
        // @ts-ignore
        oUrl.searchParams.set(key, rParams[key])
      }
    
    
      const req = await fetch(oUrl.toString(), {
        headers: {
          'user-agent': getUA(),
          cookie: process.env.COOKIE || ''
        }
      })
    
      return req.json()
    }
  • Enum constant defining the tool name string used in registration.
    GET_GROUP_TOPIC_DETAIL = 'get-group-topic-detail'
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 only states the action without any details on traits like whether it's read-only, requires authentication, has rate limits, or what the output format might be. For a tool with zero annotation coverage, this lack of behavioral context is inadequate.

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 concise with just three words, but this brevity results in under-specification rather than efficiency. It fails to front-load critical information and doesn't use its limited space to add value, making it too sparse to be helpful. Conciseness should not come at the cost of clarity.

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 (1 parameter, no output schema, no annotations), the description is incomplete. It doesn't explain what 'detail' entails, behavioral aspects, or how it fits with sibling tools, leaving gaps in understanding. While the schema covers parameters well, the description should provide more context to compensate for the lack of annotations and output schema.

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 input schema has 100% description coverage, with the single parameter 'id' clearly documented as a 'douban group topic id' with an example. The description adds no additional meaning beyond what the schema provides, such as format constraints or usage tips. Given the high schema coverage, a baseline score of 3 is appropriate as the schema handles the parameter documentation effectively.

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 'get group topic detail' is a tautology that essentially restates the tool name with minimal elaboration. It specifies the verb 'get' and resource 'group topic detail', but lacks specificity about what constitutes 'detail' (e.g., content, metadata, comments) and doesn't distinguish it from sibling tools like 'list-group-topics'. This makes the purpose vague beyond the basic action implied by the name.

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 doesn't mention prerequisites (e.g., needing a topic ID), exclusions, or how it differs from related tools such as 'list-group-topics', leaving the agent without context for tool selection. This absence of usage instructions is misleading in practice.

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