Skip to main content
Glama

get-sspai-rank

get-sspai-rank

Retrieve ranked technology and lifestyle content from SSPAI, including product reviews, app recommendations, and productivity tips. Filter results by tags and limit entries as needed.

Instructions

获取少数派热榜,包含数码产品评测、软件应用推荐、生活方式指南及效率工作技巧的优质中文科技生活类内容

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagNo
limitNo

Implementation Reference

  • Core handler logic that executes 'get-sspai-rank' by proxying the request to the external xiaobenyang API endpoint with the tool name and parameters.
    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 passed to tool registration, prepares arguments with toolName='get-sspai-rank' and calls 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:55-64 (registration)
    Registers the tool 'get-sspai-rank' (name from fetched config) with dynamic schema and generic handler on the MCP server.
    server.registerTool(
        name,
        {
            title: name,
            description: desc,
            inputSchema: params,
        }
        ,
        async (args: Record<string, any>) => handleXiaoBenYangApi(args, name)
    )
  • Dynamically builds Zod input schema for 'get-sspai-rank' based on fetched tool description JSON schema.
    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();
        }
    });
  • src/mcp.ts:90-132 (registration)
    Dynamically fetches tool list for mcpID and registers each tool including 'get-sspai-rank'.
    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);
    }
Behavior2/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. It states the tool fetches a '热榜' (hot ranking), implying a read-only operation that returns trending content, but lacks details on rate limits, authentication needs, data freshness, pagination, error handling, or output format. 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 action ('获取少数派热榜') and elaborates with content details. It avoids redundancy and wastes no words, though it could be slightly more structured by separating purpose from context.

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 moderate complexity (2 parameters, no annotations, no output schema), the description is incomplete. It adequately states the purpose but lacks usage guidelines, parameter semantics, and behavioral details needed for an AI agent to invoke it correctly without guesswork. The absence of an output schema further increases the need for more descriptive context.

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

Parameters2/5

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

The schema description coverage is 0%, so the description must compensate for two undocumented parameters ('tag' and 'limit'). It adds no information about these parameters—not explaining what 'tag' filters (e.g., content categories), what 'limit' controls (e.g., number of items), or their default behaviors. This fails to address the schema's lack of descriptions.

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 as '获取少数派热榜' (get SSPAI ranking), specifying it retrieves a ranking of content from the Chinese tech/lifestyle platform SSPAI. It distinguishes from siblings by mentioning the specific source (SSPAI) and content types (digital product reviews, software recommendations, lifestyle guides, efficiency tips), but doesn't explicitly contrast with similar tools like 'get-smzdm-rank' or 'get-zhihu-trending' beyond the source 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 when SSPAI content is preferred over other Chinese tech sources (e.g., vs. 'get-smzdm-rank' for deals or 'get-zhihu-trending' for Q&A), nor does it specify any prerequisites, exclusions, or contextual triggers for selection among the many sibling tools listed.

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