Skip to main content
Glama

实时数据/虎扑步行街热榜

Access trending discussions from Hupu's Walking Street forum to monitor popular community topics and stay informed about current conversations.

Instructions

实时数据/虎扑步行街热榜

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core handler function that executes the tool logic by making a POST request to 'https://xiaobenyang.com/api' using the provided arguments and API key. This is used by all dynamically registered tools, including the target tool.
    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();
    }
  • Dynamic registration loop that adds each tool from the fetched apiDescList, using apiDesc.title as the tool name (which includes '实时数据/虎扑步行街热榜' for the target tool), description, generated schema, and shared execute handler.
    for (const apiDesc of apiDescList) {
        addToolXiaoBenYangApi(apiDesc.apiId.toString(),
            apiDesc.title,
            apiDesc.description ? apiDesc.description : apiDesc.title,
            convertParamsToZ(apiDesc.params));
    }
  • Function that registers a single tool with FastMCP server, setting name to title, parameters to generated Zod schema, and execute to call the shared handler with 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);
            }
        });
    }
  • Generates Zod schema for tool parameters by converting Java types from apiDesc.params to Zod objects.
    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);
    }
  • Helper function to convert Java type strings (with generics) to Zod schemas, used in parameter schema generation.
    function convertJavaTypeToZod(javaType) {
        // 解析泛型(如处理 "List<Integer>" 这种格式)
        const {base: baseType, generics} = parseGenericType(javaType);
    
        // 优先匹配全类名(如 "java.lang.String")
        if (JAVA_TO_ZOD_MAP[baseType]) {
            return JAVA_TO_ZOD_MAP[baseType](...generics);
        }
    
        // 若全类名未匹配,提取简单类名再匹配(如 "String" 从 "java.lang.String" 提取)
        const simpleTypeName = baseType.split('.').pop();
        if (JAVA_TO_ZOD_MAP[simpleTypeName]) {
            return JAVA_TO_ZOD_MAP[simpleTypeName](...generics);
        }
    
        // 未匹配的类型默认视为自定义对象(返回 z.object(),需手动补充)
        return z.object({});
    }
Behavior1/5

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

With no annotations provided, the description carries full responsibility for behavioral disclosure, but it provides none. It doesn't indicate whether this is a read or write operation, what data format is returned, whether there are rate limits, authentication requirements, or any other behavioral characteristics. The description is completely silent on all operational aspects.

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?

While technically concise (it's just the tool name repeated), this represents under-specification rather than effective brevity. The description fails to provide any useful information that would help an AI agent understand or use the tool. Every sentence should earn its place, but here there's essentially no content to evaluate for structural effectiveness.

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 that this is a data retrieval tool (implied by '实时数据' and '热榜') with no annotations, no output schema, and a completely unhelpful description, the description is severely incomplete. The agent cannot understand what the tool returns, how to interpret results, or how it differs from similar tools. For a tool in a crowded sibling space with no structured metadata, this description provides inadequate context.

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 zero parameters (schema description coverage is 100%), so there are no parameters requiring semantic explanation. The description doesn't need to compensate for any parameter documentation gaps. A baseline score of 4 is appropriate since the absence of parameters means there's no parameter semantics burden on the description.

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 absolutely no guidance on when to use this tool versus its many siblings (e.g., 实时数据/微博热搜, 实时数据/知乎热榜). There's no indication of what makes '虎扑步行街热榜' distinct from other hot list tools, nor any context about when this specific platform's data would be needed. The agent receives zero usage direction.

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