Skip to main content
Glama

get_group_statistics

Retrieve comprehensive team statistics, including member count, document numbers, read counts, and interaction data, to analyze group activity and engagement on the Yuque platform.

Instructions

获取团队的汇总统计数据,包括成员人数、文档数量、阅读量和互动数据等

Input Schema

NameRequiredDescriptionDefault
accessTokenNo用于认证 API 请求的令牌
loginYes团队的登录名或唯一标识

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "accessToken": { "description": "用于认证 API 请求的令牌", "type": "string" }, "login": { "description": "团队的登录名或唯一标识", "type": "string" } }, "required": [ "login" ], "type": "object" }

Implementation Reference

  • Core implementation of getGroupStatistics that makes the API call to fetch group statistics from Yuque.
    async getGroupStatistics(login: string): Promise<any> { const response = await this.client.get(`/groups/${login}/statistics`); return response.data.data; }
  • src/server.ts:534-562 (registration)
    MCP tool registration for 'get_group_statistics', including input schema (login, optional accessToken) and wrapper handler that calls the service method.
    this.server.tool( "get_group_statistics", "获取团队的汇总统计数据,包括成员人数、文档数量、阅读量和互动数据等", { login: z.string().describe("团队的登录名或唯一标识"), accessToken: z.string().optional().describe("用于认证 API 请求的令牌"), }, async ({ login, accessToken }) => { try { Logger.log(`Fetching statistics for group: ${login}`); const yuqueService = this.createYuqueService(accessToken); const stats = await yuqueService.getGroupStatistics(login); Logger.log(`Successfully fetched statistics for group: ${login}`); return { content: [{ type: "text", text: JSON.stringify(stats, null, 2) }], }; } catch (error) { Logger.error(`Error fetching statistics for group ${login}:`, error); return { content: [ { type: "text", text: `Error fetching group statistics: ${error}`, }, ], }; } }
  • Input schema definition using Zod for the get_group_statistics tool.
    { login: z.string().describe("团队的登录名或唯一标识"), accessToken: z.string().optional().describe("用于认证 API 请求的令牌"), },

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/HenryHaoson/Yuque-MCP-Server'

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