Skip to main content
Glama

get-smzdm-rank

get-smzdm-rank

Retrieve trending shopping recommendations, deals, buying guides, product reviews, and consumer insights from SMZDM's popular Chinese shopping platform.

Instructions

获取什么值得买热门,包含商品推荐、优惠信息、购物攻略、产品评测及消费经验分享的实用中文消费类资讯

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
unitNo

Implementation Reference

  • Core handler function that proxies the tool execution to the remote API at https://mcp.xiaobenyang.com/api, using the tool name 'get-smzdm-rank' as the 'func' header value and args as body. Returns the response as MCP content.
    const calcXiaoBenYangApi = async function (fullArgs: Record<string, any>) {
        // 发起 POST 请求
        let response = await fetch('https://mcp.xiaobenyang.com/api', {
            method: 'POST',
            headers: {
                'XBY-APIKEY': apiKey,
                'func': fullArgs.toolName,
                'mcpid': mcpID
            },
            body: new URLSearchParams(fullArgs)
        });
        const apiResult = await response.text();
    
        return {
            content: [
                {
                    type: "text",
                    text: apiResult // 将字符串结果放入 content 中
                }
            ]
        } as { [x: string]: unknown; content: [{ type: "text"; text: string }] };
    };
  • Wrapper handler called by the registered tool handler lambda. Adds the toolName ('get-smzdm-rank') to args and invokes the core API proxy.
    const handleXiaoBenYangApi = async (args: Record<string, any>, toolName: string) => {
        // 校验aid是否存在
        if (toolName === undefined || toolName === null) {
            throw new Error("缺少必要参数 'aid'");
        }
        // 合并参数
        const fullArgs = {...args, toolName: toolName};
        // 调用API
        return calcXiaoBenYangApi(fullArgs);
    };
  • src/mcp.ts:50-65 (registration)
    Helper function to register a tool with the MCP server, using the generic handler. Called for each tool including 'get-smzdm-rank'.
    const addToolXiaoBenYangApi = function (
        name: string,
        desc: string,
        params: Record<string, ZodType>
    ) {
        server.registerTool(
            name,
            {
                title: name,
                description: desc,
                inputSchema: params,
            }
            ,
            async (args: Record<string, any>) => handleXiaoBenYangApi(args, name)
        )
    };
  • src/mcp.ts:90-133 (registration)
    Dynamic registration loop that fetches tool list from remote (https://mcp.xiaobenyang.com/getMcpDesc?mcpId=1777316659328003), builds Zod schema, and registers each tool (including get-smzdm-rank) via addToolXiaoBenYangApi.
    for (const apiDesc of apiDescList) {
        let inputSchema = JSON.parse(apiDesc.inputSchema);
        const zodDict: Record<string, z.ZodTypeAny> = {};
    
        Object.entries(inputSchema.properties).forEach(([name, propConfig]) => {
            let zodType;
            let pt = (propConfig as { type: string }).type;
            switch (pt) {
                case 'string':
                    zodType = z.string();
                    break;
                case 'number':
                    zodType = z.number();
                    break;
                case 'boolean':
                    zodType = z.boolean();
                    break;
                case 'integer':
                    zodType = z.int32();
                    break;
                case 'array':
                    zodType = z.array(z.any());
                    break;
                case 'object':
                    zodType = z.object(z.any());
                    break;
                default:
                    zodType = z.any();
            }
    
            if (inputSchema.required?.includes(name)) {
                zodDict[name] = zodType;
            } else {
                zodDict[name] = zodType.optional();
            }
        });
    
    
        addToolXiaoBenYangApi(
            apiDesc.name,
            apiDesc.description ? apiDesc.description : apiDesc.name,
            zodDict);
    }
    isRegistered = true;
  • Fetches the remote tool descriptions including schemas for the mcpID, used to dynamically generate input schemas for tools like get-smzdm-rank.
    const res = await fetch('https://mcp.xiaobenyang.com/getMcpDesc?mcpId=' + mcpID, {
        method: 'GET',
    });
    
    if (!res.ok) {
        throw new Error(`请求失败:${res.status}`);
    }
    
    const data = await res.json();
    const apiDescList = data.tools;
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It describes what content types are included but doesn't mention how results are returned (format, pagination, rate limits), whether it's a read-only operation, or any authentication requirements. For a tool with no annotation coverage, this leaves significant behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose ('获取什么值得买热门') followed by specific content details. There's no wasted text, though it could be slightly more structured for readability.

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 has no annotations, no output schema, and 0% parameter schema coverage, the description is incomplete. While it clearly states what content is fetched, it doesn't address how results are structured, what the parameter does, or any operational constraints. For a tool in this context, more information is needed.

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

Parameters1/5

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

The description provides zero information about the 'unit' parameter. With 0% schema description coverage and no parameter details in the description, the agent has no guidance on what this parameter means, what values it accepts, or whether it's required. This is inadequate for a tool with one parameter.

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 the tool's purpose: '获取什么值得买热门' (get SMZDM trending/hot content) followed by a detailed list of content types (product recommendations, discount info, shopping guides, product reviews, consumer experience sharing). It specifies the resource (SMZDM platform) and content scope, though it doesn't explicitly differentiate from sibling tools beyond the platform name.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention any specific use cases, prerequisites, or comparisons to sibling tools that fetch trending content from other platforms (like get-zhihu-trending or get-weibo-trending). The agent must infer usage from the platform name 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/1777316659328003'

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