Skip to main content
Glama

yeepay_yop_product_detail_and_associated_apis

Retrieve product documentation, usage instructions, and associated API lists for Yeepay Open Platform (YOP) products to support integration development.

Instructions

通过此工具,获取易宝支付开放平台(YOP)指定产品的产品介绍,使用说明、相关的API接口列表,内容中包含链接时可以调用工具yeepay_yop_link_detail进一步获取其详细内容

Args: product_code: str - 产品编码(产品的唯一标识)

Returns: str: 易宝支付开放平台(YOP)指定产品的产品介绍,使用说明、相关的API接口列表(markdown格式)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
product_codeYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function for 'yeepay_yop_product_detail_and_associated_apis' tool, registered via @mcp.tool(). It strips the product_code, downloads content from the specific product URL, and falls back to product overview if failed. The docstring provides input/output schema.
    @mcp.tool()
    def yeepay_yop_product_detail_and_associated_apis(product_code: str) -> str:
        """
        通过此工具,获取易宝支付开放平台(YOP)指定产品的产品介绍,使用说明、相关的API接口列表,内容中包含链接时可以调用工具yeepay_yop_link_detail进一步获取其详细内容
    
        Args:
            product_code: str - 产品编码(产品的唯一标识)
    
        Returns:
            str: 易宝支付开放平台(YOP)指定产品的产品介绍,使用说明、相关的API接口列表(markdown格式)
        """
    
        product_code = product_code.strip()
        # https://open.yeepay.com/docs-v3/product/user-scan/llms.txt
        response = HttpUtils.download_content(
            "https://open.yeepay.com/docs-v3/product/" + product_code + "/llms.txt"
        )
        # 如果返回错误,则调用备用地址
        if response.startswith("HTTP请求失败"):
            return HttpUtils.download_content(
                "https://open.yeepay.com/docs-v3/product/llms.txt"
            )
        return response
  • Supporting utility method HttpUtils.download_content used by the tool handler to fetch markdown content from Yeepay YOP URLs, handling HTTP requests with httpx and error cases.
    def download_content(url: str, timeout: Optional[int] = None) -> str:
        """
        同步下载文件(无进度显示)并返回文件内容
    
        Args:
            url: 下载地址
            timeout: 超时时间(秒)
    
        Returns:
            str: 下载的文本内容
        """
        try:
            with httpx.Client(http2=True, timeout=timeout) as client:  # 启用HTTP/2加速
                response = client.get(url)
                response.raise_for_status()  # 自动检测4xx/5xx错误
                content = response.text
            print(f"已获取内容,长度: {len(content)} 字符")
            return content
        except httpx.HTTPStatusError as e:
            print(f"HTTP错误 {e.response.status_code}")
            return f"HTTP请求失败: HTTP {e.response.status_code}"
        except Exception as e:  # 保持通用异常处理以支持测试
            print(f"请求失败:{str(e)}")
            return f"HTTP请求失败: {str(e)}"
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions the tool returns markdown-formatted content and suggests calling another tool for link details, but lacks critical behavioral details: it doesn't specify if this is a read-only operation, whether it requires authentication, potential rate limits, error conditions, or what happens if the product_code is invalid. The description provides some context but is incomplete for safe agent usage.

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 appropriately sized and front-loaded: the first sentence states the core purpose, followed by a note about link handling, then parameter and return explanations. The Args/Returns sections are structured but slightly redundant with the main text. Overall efficient with minimal waste.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 1 parameter with 0% schema coverage and an output schema exists (returns str), the description is moderately complete: it explains the parameter's semantics and mentions markdown format, but lacks behavioral transparency (no annotations) and doesn't fully address usage versus siblings. For a simple lookup tool, it's adequate but has clear gaps in guidance and behavioral 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?

With 0% schema description coverage and only 1 parameter, the description compensates well: it explains that 'product_code' is '产品编码(产品的唯一标识)' (product code, the unique identifier of the product), adding meaningful semantic context beyond the schema's basic title 'Product Code'. This clarifies the parameter's role as a unique identifier for lookup.

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: '获取易宝支付开放平台(YOP)指定产品的产品介绍,使用说明、相关的API接口列表' (Get product introduction, usage instructions, and related API interface lists for specified YOP products). It specifies the verb '获取' (get) and resource '产品' (product), but doesn't explicitly differentiate from sibling tools like 'yeepay_yop_product_overview' which might serve a similar purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides implied usage context: it mentions that when content contains links, the tool 'yeepay_yop_link_detail' can be called for further details. However, it doesn't explicitly state when to use this tool versus alternatives like 'yeepay_yop_product_overview' or 'yeepay_yop_api_detail', nor does it provide exclusion criteria or prerequisites.

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/yop-platform/yop-mcp'

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