Skip to main content
Glama

Start platform login

login

Authenticate DingTalk or WeCom by returning a QR code for inline display or starting browser/device-code authorization, then verify completion through the status-check tool.

Instructions

发起平台登录(无需终端):企业微信返回可直接渲染的扫码二维码(图片内容 + 绝对路径 markdown,贴进回复即可内联显示);钉钉拉起浏览器授权,无头/远程环境用 mode=device 走设备码。完成后调用 login_status 确认。

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "provider": "<provider>"
    },
    "name": "login"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNo钉钉登录方式:browser=本机浏览器授权(默认),device=设备码;企业微信固定扫码
providerYesIM 平台标识:dingtalk=钉钉,wecom=企业微信

Output Schema

NameRequiredDescriptionDefault
okYes
hintNo
errorNo
qrPathNo二维码 PNG 的本地绝对路径
runningNo
exitCodeNo
markdownNo可直接贴进回复的 Markdown 图片语法
providerYes
userCodeNo设备码流程的验证码(钉钉 device 模式)
outputTailNo登录进程最近输出
displayNameNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.6.6

TDQS

A4.4/5.0
Behavior4/5

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

注解已声明 readOnlyHint=false 和 openWorldHint=true;该描述在此基础上补充了真正的附加价值:企业微信返回的精确返回形态(图片内容 + markdown 绝对路径,可内联嵌入),以及钉钉会打开浏览器、需要手动步骤这一副作用。没有披露 token、会话生命周期,或调用失败时会发生什么。

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?

单个紧凑的句子,以目的开头,随后是各 provider 分支和后续调用。多个用分号分隔的子句承载很多信息,但有些密集;可拆成项目符号列表以提升可读性,不过没有浪费内容。

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

对于只有 2 个参数、参数 enum 已有文档说明、且存在输出 schema 的工具,该描述已涵盖其需要涵盖的内容:各 provider 模式下的行为、环境变量选择,以及下一步。agent 无需打开其它材料即可正确调用。

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%,两个枚举的参数都已有文档说明,因此基线为 3。该描述补充了 schema 中未说明的操作条件——`mode=device` 适用于无头/远程环境,并说明企业微信无论 `mode` 如何都固定走扫码流程。

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?

使用具体的动词和资源(“发起平台登录”),并立即详述两种模式下会发生什么:“企业微信返回可直接渲染的扫码二维码”,而“钉钉拉起浏览器授权”。这使该工具既能与兄弟工具 `login_status` 区分开,也能在同一个工具内区分其两种 provider 模式。

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?

明确给出环境适用的使用指导:“无需终端”,当“无头/远程环境”时选择 `mode=device`。它还指出流程的下一步:“完成后调用 login_status 确认”。没有说明何时不应使用,但模式选择和后续路由都已明确。

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

Deploy Server

Other Tools