Skip to main content
Glama

yeepay_yop_link_detail

Fetch detailed content from YOP platform subpages or external links by providing a URL. Recursively retrieve details from links found in the content.

Instructions

通过此工具,获取易宝支付开放平台(YOP)的各个子页面或者外部链接的详细内容,内容中包含链接时可以调用工具yeepay_yop_link_detail进一步获取其详细内容

Args: url: str - 易宝支付开放平台(YOP)的子页面的URL地址

Returns: str: 易宝支付开放平台(YOP)的各个子页面的详细内容

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main handler function for the yeepay_yop_link_detail tool. It accepts a URL, uses HttpUtils.download_content to fetch the content of the page. If the URL starts with 'http' it uses it as-is; otherwise it prepends 'https://open.yeepay.com/' to form the full URL. On failure, it returns an error message.
    @mcp.tool()
    def yeepay_yop_link_detail(url: str) -> str:
        """
        通过此工具,获取易宝支付开放平台(YOP)的各个子页面或者外部链接的详细内容,内容中包含链接时可以调用工具yeepay_yop_link_detail进一步获取其详细内容
    
        Args:
            url: str - 易宝支付开放平台(YOP)的子页面的URL地址
    
        Returns:
            str: 易宝支付开放平台(YOP)的各个子页面的详细内容
    
        """
        try:
            if url.startswith("http"):
                return HttpUtils.download_content(url)
    
            url = ("https://open.yeepay.com/" + url).replace("//", "/")
            return HttpUtils.download_content(url)
        except (ValueError, TypeError, ConnectionError):
            return "HTTP请求失败, url: " + url
  • The tool is registered as an MCP tool via the @mcp.tool() decorator on line 149. The mcp instance is a FastMCP server created on line 11.
    @mcp.tool()
  • The HttpUtils.download_content static method used by the handler to fetch the URL content via HTTP GET using httpx (HTTP/2 enabled).
    @staticmethod
    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)}"
  • The function signature defines the schema: a single required parameter 'url' of type str as input, and returns a str.
    def yeepay_yop_link_detail(url: str) -> str:
        """
        通过此工具,获取易宝支付开放平台(YOP)的各个子页面或者外部链接的详细内容,内容中包含链接时可以调用工具yeepay_yop_link_detail进一步获取其详细内容
    
        Args:
            url: str - 易宝支付开放平台(YOP)的子页面的URL地址
    
        Returns:
            str: 易宝支付开放平台(YOP)的各个子页面的详细内容
Behavior2/5

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

No annotations are provided, so the description must fully disclose behavior. It states the tool returns detailed content but does not mention side effects, authentication needs, rate limits, or error conditions. The read-only nature is assumed but not stated.

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 concise, with the purpose stated in the first sentence and Args/Returns clearly separated. It uses minimal words, though the Chinese phrasing is somewhat repetitive on the platform name.

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

Completeness4/5

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

For a simple tool with one parameter and an output schema, the description covers the essential functionality. It could mention the output format (e.g., plain text or HTML) but is generally complete given the tool's simplicity.

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

Parameters3/5

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

The schema has 0% description coverage, but the description provides a brief explanation for the 'url' parameter ('易宝支付开放平台(YOP)的子页面的URL地址'), adding meaning beyond the type. However, it does not specify URL format or constraints.

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 states the tool retrieves detailed content of subpages or external links of YeePay Open Platform, which is clear. However, it does not explicitly differentiate from sibling tools like 'yeepay_yop_api_detail', so a distinction is implied but not explicit.

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 mentions recursive usage when content contains links, but no guidance on when not to use this tool or alternatives. For example, it does not clarify when to use yeepay_yop_link_detail vs yeepay_yop_product_detail_and_associated_apis.

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