Skip to main content
Glama

alipay_build_pay_url

Create an Alipay payment redirect URL for PC or mobile website orders offline, without sending a request. Provide order details, product type, and optional return URLs to generate the link.

Instructions

支付宝生成支付跳转链接(离线,不发起请求):product=page 电脑网站 alipay.trade.page.pay;wap 手机网站 alipay.trade.wap.pay。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
credNo凭证(可省略,改用环境变量;PEM 字段可直接传 PEM 全文或 .pem 文件路径)
orderYes
productYes
quitUrlNo
sandboxNo
notifyUrlNo
returnUrlNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full transparency burden. It explicitly discloses that the tool is offline and does not initiate a request, and it reveals the internal mapping of the product parameter to Alipay trade methods. However, it does not disclose credential requirements, signing behavior, or error handling, so it is not fully transparent.

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?

The description is a single dense sentence that front-loads the tool's purpose and offline behavior before enumerating the product-to-API mapping. Every phrase earns its place; there is no repetition or filler.

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?

The tool has moderate complexity with nested order and cred objects, seven parameters, and no output schema, yet the description says nothing about the return value, how to consume the generated URL, sandbox behavior, or failure cases beyond the product mapping. The offline note helps, but the overall context is too thin for an agent to invoke the tool confidently without further assumptions.

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?

Schema description coverage is only 14%, so the description must compensate. It adds crucial semantics for the product enum by linking each value to a specific Alipay API, and clarifies cred omission via environment variables. But it does not explain order fields (outTradeNo, amountYuan, subject) or URL-related parameters like notifyUrl, returnUrl, quitUrl, and sandbox, leaving a significant portion of the schema unexplained.

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 names the specific verb (生成/generate) and resource (支付宝支付跳转链接/Alipay payment redirect URL), and adds the key qualifier '离线,不发起请求' (offline, no request), which separates it from network-issuing payment tools. It even maps product values to the exact Alipay APIs (page → alipay.trade.page.pay, wap → alipay.trade.wap.pay), making the purpose unmistakable even among sibling Alipay tools.

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 implies when to use the tool: when you need an offline Alipay payment redirect URL. It does not explicitly name alternatives or state when not to use it, such as when an actual Alipay request or order creation is required, so the guidance is present but only implicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.