Skip to main content
Glama

yeepay_yop_java_sdk_user_guide

Retrieve the YOP Java SDK user guide, including links to detailed descriptions for each component.

Instructions

通过此工具,获取易宝支付开放平台(YOP)的yop-java-sdk的使用说明,内容中包含链接时可以调用工具yeepay_yop_link_detail进一步获取其详细内容

Returns: str: 易宝支付开放平台(YOP)的yop-java-sdk的使用说明(markdown格式)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The tool handler function yeepay_yop_java_sdk_user_guide() that fetches the yop-java-sdk usage guide. It first retrieves platform version info from an API endpoint, then uses that version to construct the URL for the Java SDK guide HTML page. On failure, it falls back to a static markdown URL.
    @mcp.tool()
    def yeepay_yop_java_sdk_user_guide() -> str:
        """
        通过此工具,获取易宝支付开放平台(YOP)的yop-java-sdk的使用说明,内容中包含链接时可以调用工具yeepay_yop_link_detail进一步获取其详细内容
    
        Returns:
            str: 易宝支付开放平台(YOP)的yop-java-sdk的使用说明(markdown格式)
    
        """
        try:
            platform_info = json.loads(
                HttpUtils.download_content(
                    "https://open.yeepay.com/apis/commons/doc/platform/info"
                )
            )
            platform_version = platform_info.get("data").get("docVersion")
            return HttpUtils.download_content(
                "https://open.yeepay.com/apis/docs/platform/"
                + platform_version
                + "/sdk_guide/java-sdk-guide.html"
            )
        except (ValueError, TypeError, ConnectionError):
            return HttpUtils.download_content(
                "https://open.yeepay.com/docs-v3/platform/201.md"
            )
  • The tool is registered via the @mcp.tool() decorator on line 171, which registers yeepay_yop_java_sdk_user_guide as an MCP tool with the FastMCP server instance.
    @mcp.tool()
    def yeepay_yop_java_sdk_user_guide() -> str:
  • The HttpUtils.download_content() static method is the helper used by the handler to make HTTP requests and retrieve content from URLs.
    @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 docstring serves as the schema/description for this tool. It describes that the tool retrieves the yop-java-sdk usage guide from the YOP platform and mentions that links can be followed with yeepay_yop_link_detail.
    """
    通过此工具,获取易宝支付开放平台(YOP)的yop-java-sdk的使用说明,内容中包含链接时可以调用工具yeepay_yop_link_detail进一步获取其详细内容
    
    Returns:
        str: 易宝支付开放平台(YOP)的yop-java-sdk的使用说明(markdown格式)
  • The tool is imported in the test file on line 18, confirming it's exported from the yop_mcp.main module for use by the MCP framework and tests.
    from yop_mcp.main import (
        yeepay_yop_api_detail,
        yeepay_yop_download_cert,
        yeepay_yop_gen_key_pair,
        yeepay_yop_java_sdk_user_guide,
        yeepay_yop_link_detail,
        yeepay_yop_overview,
        yeepay_yop_parse_certificates,
        yeepay_yop_product_detail_and_associated_apis,
        yeepay_yop_product_overview,
        yeepay_yop_sdk_and_tools_guide,
    )
Behavior4/5

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

描述说明了返回格式为markdown,且隐含了输出可能包含链接。无注解配置,但工具行为简单,无副作用或隐藏行为。

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

Conciseness5/5

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

两句话,第一句直接点明用途,第二句补充与兄弟工具的关系,无冗余信息,结构高效。

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?

对于无参数、有输出schema的简单工具,描述提供了足够的信息(用途、输出格式、关联工具)。但未详细说明输出内容结构,略微不足。

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?

无参数,schema覆盖100%,描述无需添加参数信息。描述本身简洁有效,未遗漏任何必要说明。

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

描述明确表明工具用于获取易宝支付yop-java-sdk的使用说明,动词'获取'和资源'使用说明'清晰。同时提及内容中包含链接时可调用兄弟工具yeepay_yop_link_detail,有效区分了兄弟工具。

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

Usage Guidelines4/5

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

描述给出了具体使用场景:当需要获取链接详细内容时使用yeepay_yop_link_detail,提供了清晰的上下文。但未明确说不应使用本工具的情形或替代方案,由于工具简单,该信息足够。

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