Skip to main content
Glama

wechat_build_authorization

Builds WeChat Pay V3 Authorization headers offline using RSA-SHA256 signing, enabling authenticated HTTP calls without network requests.

Instructions

微信支付V3:离线构造 Authorization 请求头(RSA-SHA256 签名),不发起网络请求。用于自建 HTTP 调用。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes接口路径(不含域名),如 /v3/pay/transactions/native
bodyNo请求体原文(GET 传空串)
credNo凭证(可省略,改用环境变量;PEM 字段可直接传 PEM 全文或 .pem 文件路径)
nonceNo
methodYesHTTP 方法,如 GET/POST
timestampNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description must carry the behavioral disclosure burden. It clearly discloses the offline behavior and signature algorithm, which is valuable. However, it does not mention what happens for omitted nonce/timestamp, whether credentials are required, or error behavior, leaving some important traits unspecified.

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 sentence with no filler. It front-loads the core purpose, then adds the key safety distinction and intended use.

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?

There is no output schema and no annotations, so the description needs to explain the return value and usage details. It omits what the constructed header looks like, how to attach it to a request, and how optional parameters behave. For a tool with six parameters and a nested cred object, this is insufficient.

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

Parameters2/5

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

The schema covers url, body, cred, and method, but nonce and timestamp have no descriptions. The description adds no parameter-level meaning beyond mentioning RSA-SHA256 signing, and with 67% schema coverage it should compensate for the uncovered parameters but does not.

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 states a specific verb and resource: it constructs an offline WeChat Pay V3 Authorization header using RSA-SHA256 signing. It explicitly says no network request is made, which differentiates it clearly from network-calling siblings like wechat_create_native_order and wechat_verify_callback.

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 tells the agent this is for self-built HTTP calls, giving a clear context for when to use it. It does not name alternatives or provide explicit when-not-to-use guidance, but the offline/no-network statement separates it from sibling network tools.

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