Skip to main content
Glama

实时数据/虎嗅热榜

Access trending news and articles from Huxiu's hot topics list to stay informed about current events and popular discussions in Chinese media.

Instructions

实时数据/虎嗅热榜

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Dynamically registers tools from the fetched apiDescList. Each tool uses apiDesc.title as the name (e.g., "实时数据/虎嗅热榜"), apiDesc.apiId as the internal aid, converted params as schema, and a wrapper around calcXiaoBenYangApi as handler.
    for (const apiDesc of apiDescList) {
        addToolXiaoBenYangApi(apiDesc.apiId.toString(),
            apiDesc.title,
            apiDesc.description ? apiDesc.description : apiDesc.title,
            convertParamsToZ(apiDesc.params));
    }
  • Core handler logic for all dynamic tools: sends POST request to https://xiaobenyang.com/api with API key, aid (tool-specific), and user args.
    const calcXiaoBenYangApi = async function (fullArgs) {
        // 发起 GET 请求
        let response = await fetch('https://xiaobenyang.com/api', {
            method: 'POST',
            headers: {
                'APIKEY': process.env.API_KEY,
                'aid': fullArgs.aid
            },
            body: new URLSearchParams(fullArgs)
        });
        return await response.text();
    }
  • Registers a specific tool on the MCP server with given name/title (e.g., "实时数据/虎嗅热榜"), description, parameters schema, and execute handler that injects the tool's aid.
    const addToolXiaoBenYangApi = function (aid, title, desc, params) {
        server.addTool({
            name: title,
            description: desc,
            parameters: params,
            execute: async (args) => {
                // 合并用户输入 args 和工具专属 aid
                const fullArgs = {...args, aid: aid};
                return calcXiaoBenYangApi(fullArgs);
            }
        });
    }
  • Converts Java-style parameter descriptions (from API) to Zod schema objects used in tool parameters.
    const convertParamsToZ = function (params) {
        let zParams = {};
        for (const param of params) {
            let zodType = convertJavaTypeToZod(param.type)
            if (param.description) {
                zodType = zodType.describe(param.name);
            }
            if (param.required) {
                zodType = zodType.optional();
            }
    
            zParams[param.name] = zodType;
        }
        return z.object(zParams);
    }
  • Fetches the list of tools descriptions from the remote API, populating apiDescList with titles like "实时数据/虎嗅热榜" for dynamic registration.
    fetch('https://xiaobenyang.com/api/' + process.env.MCP_ID, {
        method: 'GET',
    }).then((res) => {
        if (!res.ok) throw new Error(`请求失败:${res.status}`);
        return res.json(); // 解析响应体为 JSON(假设返回 { apiDescList: [...] })
    })
        .then((data) => {
            const apiDescList = data.tools;
Behavior1/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure but offers none. It doesn't indicate whether this is a read-only operation, if it requires authentication, has rate limits, or what the output might look like. The description is too vague to infer any behavioral traits, failing to compensate for the lack of annotations.

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 a single phrase that restates the tool name, which is overly concise to the point of under-specification. While it lacks wasted words, it fails to provide any meaningful content, making it inefficient in conveying necessary information. Conciseness should not come at the cost of clarity, so this scores low for being too brief without substance.

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 complexity implied by the tool name (likely fetching trending data from a specific source) and the lack of annotations and output schema, the description is severely incomplete. It doesn't explain what the tool does, how to use it, or what to expect in return. For a tool with no parameters but potential behavioral nuances, this description fails to provide the necessary context for effective use.

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

Parameters4/5

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

The tool has 0 parameters, and the schema description coverage is 100%, meaning there are no parameters to document. The description doesn't need to add parameter semantics in this case. A baseline score of 4 is appropriate as the absence of parameters is adequately handled by the schema, and the description doesn't introduce confusion or unnecessary details.

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?

Tautological: description restates name/title.

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 its siblings, such as '实时数据/36氪热榜' or '实时数据/知乎热榜'. There is no mention of context, alternatives, or exclusions. This leaves the agent with no information to distinguish between similar tools, making it impossible to make an informed choice based on the description alone.

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/xiaobenyang-com/mcp-tools'

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