Skip to main content
Glama

yeepay_yop_api_detail

Retrieve detailed API specifications for Yeepay's YOP platform, including parameters, examples, error codes, and sample code in markdown format.

Instructions

通过此工具,获取易宝支付开放平台(YOP)的API接口的详细定义,包含基本信息、请求参数、请求示例、 响应参数、响应示例、错误码、回调、示例代码等信息,内容中包含链接时可以调用工具yeepay_yop_link_detail进一步获取其详细内容

Args: api_uri: str - API的URI路径, 例如:/rest/v1.0/aggpay/pre-pay, https://open.yeepay.com/docs-v3/api/post_rest_v1.0_aggpay_pre-pay.md, https://open.yeepay.com/docs-v2/apis/user-scan/post__rest__v1.0__aggpay__pre-pay/index.html

Returns: str: 易宝支付开放平台(YOP)的API接口的详细定义,包含基本信息、请求参数、请求示例、 响应参数、响应示例、错误码、回调、示例代码等信息(markdown格式)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
api_uriYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Core handler function implementing the yeepay_yop_api_detail tool logic. Processes api_uri in various formats (direct URI, full MD/HTML links), constructs appropriate documentation URLs, downloads markdown content via HttpUtils.download_content with multiple fallbacks.
    def yeepay_yop_api_detail(api_uri: str) -> str:
        """
        通过此工具,获取易宝支付开放平台(YOP)的API接口的详细定义,包含基本信息、请求参数、请求示例、
        响应参数、响应示例、错误码、回调、示例代码等信息,内容中包含链接时可以调用工具yeepay_yop_link_detail进一步获取其详细内容
    
        Args:
            api_uri: str - API的URI路径, 例如:/rest/v1.0/aggpay/pre-pay,
                https://open.yeepay.com/docs-v3/api/post_rest_v1.0_aggpay_pre-pay.md,
                https://open.yeepay.com/docs-v2/apis/user-scan/post__rest__v1.0__aggpay__pre-pay/index.html
    
        Returns:
            str: 易宝支付开放平台(YOP)的API接口的详细定义,包含基本信息、请求参数、请求示例、
                响应参数、响应示例、错误码、回调、示例代码等信息(markdown格式)
    
        """
    
        api_uri = api_uri.strip()
        response = "HTTP请求失败"
    
        if api_uri.startswith("http"):
            if api_uri.endswith(".md"):
                response = HttpUtils.download_content(api_uri)
            elif (
                api_uri.endswith(".html")
                or "/docs/apis/" in api_uri
                or "/docs-v2/apis/" in api_uri
            ):
                url_parts = api_uri.split("/")
                for part in url_parts:
                    if (
                        part.startswith("post__")
                        or part.startswith("get__")
                        or part.startswith("options__")
                    ):
                        api_id = part.replace("__", "_")
                        response = HttpUtils.download_content(
                            "https://open.yeepay.com/docs-v3/api/" + api_id + ".md"
                        )
                        break
    
        if response.startswith("HTTP请求失败") and "_" in api_uri:
            response = HttpUtils.download_content(
                "https://open.yeepay.com/docs-v3/api/" + api_uri + ".md"
            )
    
        formatted_api_uri = api_uri.replace("/", "_")
        if response.startswith("HTTP请求失败"):
            response = HttpUtils.download_content(
                "https://open.yeepay.com/docs-v3/api/" + formatted_api_uri + ".md"
            )
        if response.startswith("HTTP请求失败"):
            response = HttpUtils.download_content(
                "https://open.yeepay.com/docs-v3/api/post" + formatted_api_uri + ".md"
            )
        if response.startswith("HTTP请求失败"):
            response = HttpUtils.download_content(
                "https://open.yeepay.com/docs-v3/api/get" + formatted_api_uri + ".md"
            )
        if response.startswith("HTTP请求失败"):
            response = HttpUtils.download_content(
                "https://open.yeepay.com/docs-v3/api/options" + formatted_api_uri + ".md"
            )
    
        return response
  • yop_mcp/main.py:65-65 (registration)
    The @mcp.tool() decorator registers the yeepay_yop_api_detail function as a tool on the FastMCP server instance 'mcp'.
    @mcp.tool()
  • Input/output schema defined in the function docstring with parameter description, examples, and return type. Reinforced by type hints: api_uri: str -> str (markdown).
    """
    通过此工具,获取易宝支付开放平台(YOP)的API接口的详细定义,包含基本信息、请求参数、请求示例、
    响应参数、响应示例、错误码、回调、示例代码等信息,内容中包含链接时可以调用工具yeepay_yop_link_detail进一步获取其详细内容
    
    Args:
        api_uri: str - API的URI路径, 例如:/rest/v1.0/aggpay/pre-pay,
            https://open.yeepay.com/docs-v3/api/post_rest_v1.0_aggpay_pre-pay.md,
            https://open.yeepay.com/docs-v2/apis/user-scan/post__rest__v1.0__aggpay__pre-pay/index.html
    
    Returns:
        str: 易宝支付开放平台(YOP)的API接口的详细定义,包含基本信息、请求参数、请求示例、
            响应参数、响应示例、错误码、回调、示例代码等信息(markdown格式)
Behavior3/5

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

With no annotations provided, the description carries full burden. It describes what the tool returns (detailed API definition in markdown format) and mentions the ability to follow links with another tool. However, it doesn't disclose important behavioral traits like whether this requires authentication, rate limits, error handling, or if it makes network calls. The description is accurate but incomplete for behavioral transparency.

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 with the core purpose in the first sentence. The Args and Returns sections are clearly separated. While efficient, the Chinese text could be slightly more concise, and the repetition of content details in both description and Returns section is somewhat redundant.

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?

Given 1 parameter with 0% schema coverage but good parameter explanation in the description, plus an output schema that specifies the return type (string/markdown), the description provides adequate context. It covers what the tool does, parameter usage, return format, and relationship to sibling tools. For a documentation retrieval tool, this is reasonably complete though could benefit from more behavioral details.

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 by providing clear examples of valid api_uri values (both URI paths and full URLs). It explains what the parameter represents ('API的URI路径' - API URI path) and gives concrete examples, adding significant meaning beyond the bare schema.

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?

The description clearly states the specific action ('获取' - get/retrieve) and resource ('易宝支付开放平台(YOP)的API接口的详细定义' - detailed definition of YOP API interface). It distinguishes from siblings by specifying it retrieves API documentation details rather than certificates, SDK guides, or product overviews handled by other tools.

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?

The description provides clear context for when to use this tool: to get detailed API definitions including parameters, examples, error codes, etc. It explicitly mentions using sibling tool 'yeepay_yop_link_detail' for following links found in the content. However, it doesn't specify when NOT to use this tool or alternatives for similar documentation needs.

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