Skip to main content
Glama

generate_urllink

为小程序页面生成 URL Link(微信外可打开的标准链接)。

用户想获得某个页面(通常是活动详情页)的可分享链接时调用。
生成的 https://wxaurl.cn/ 链接可在短信、邮件、网页、AI 应用等微信外场景打开,
点击后唤起微信小程序对应页面。

Args:
    activity_id: 活动 ID。提供时自动映射到活动详情页(path=pages/activity/detail, query=id=xxx)。
    path: 小程序页面路径,如 "pages/index/index"。提供 activity_id 时忽略。
    query: 页面参数(urlencode 后的字符串),如 "id=act_001"。提供 activity_id 时忽略。

Returns:
    JSON 字符串,包含 URL Link、页面路径和参数

Input Schema

NameRequiredDescriptionDefault
pathNo小程序页面路径,默认 pages/home/home(首页)。一般不用传
queryNo附加到路径上的查询参数,如 a=1&b=2。一般不用传
activity_idNo活动 ID。传了则生成该活动详情页的小程序链接

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / activity_id / description
      Added value: +"活动 ID。传了则生成该活动详情页的小程序链接"
    • addedInput schema / properties / path / description
      Added value: +"小程序页面路径,默认 pages/home/home(首页)。一般不用传"
    • addedInput schema / properties / query / description
      Added value: +"附加到路径上的查询参数,如 a=1&b=2。一般不用传"
  2. First observed

TDQS

A4.2/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully discloses that the result is an https://wxaurl.cn/ link that opens outside WeChat and invokes the mini-program page, plus the return shape. However, it omits important behavioral traits of URL Link generation such as link validity/expiry and API quota consumption, which affect how an agent should use the output.

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?

Front-loaded purpose sentence, then a usage sentence, then compact Args/Returns blocks. Every line adds information and nothing duplicates the schema defaults verbatim.

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?

An output schema exists, so return values need not be explained further, and the three optional parameters are fully covered with precedence rules. The remaining gap is operational context around link lifetime/quota, which is relevant but secondary for a correctly formed call.

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 coverage is 100%, so the baseline is 3, but the description adds real semantics: activity_id auto-maps to path=pages/activity/detail with query id=xxx, and path/query are ignored when activity_id is provided. That precedence rule is not expressed in the schema and prevents misuse.

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 first line states a specific verb and artifact: generate a URL Link for a mini-program page, explicitly noting it is a standard link openable outside WeChat. This is unmistakable against siblings (check_in, create_activity, query_activities) which operate on activities/venues, not link generation.

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?

It gives a clear trigger condition: call when the user wants a shareable link to a page, usually an activity detail page. It does not state when NOT to use it or name alternatives, but no sibling tool overlaps with this capability, so the guidance is sufficient in practice.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources