Skip to main content
Glama

otp_code

Retrieve the current one-time password for authorized PKU web logins. Use it immediately; codes expire in about 30 seconds and must not be saved to files or logs.

Instructions

当前手机令牌口令(OTP),供用户本人授权的北大网页登录使用。约 30 秒内有效,不要写进文件或日志。

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "otp_code"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A3.7/5.0
Behavior3/5

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

With zero annotations the description carries the whole burden, and it does disclose two real behavioral traits: a ~30-second validity window and a handling constraint (do not write to files or logs). It says nothing about what happens after expiry (error vs. empty value) or about prerequisites such as an established authenticated session, which matters for a credential-issuing tool.

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?

Two short sentences, front-loaded with what the value is, then the validity window and the security constraint. Every clause carries information; nothing is padded or repeated.

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 structure needs no explanation, and with zero parameters the definition only has to convey purpose, lifetime, and handling. Those are present; only the preconditions and post-expiry behavior are absent, which is a modest gap for a simple getter.

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?

The tool takes no parameters, so there is nothing for the description to disambiguate and the baseline of 4 applies. Schema coverage is also 100%, leaving no gap for the description to fill.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description identifies the exact resource returned — the current mobile-token OTP — and names its scope (PKU web login authorized by the user themselves). It is far more specific than a title restatement, but it never contrasts with the related sibling tools auth_setup/auth_status, so an agent must infer the boundary on its own.

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?

It states a use context ('供用户本人授权的北大网页登录使用'), which tells the agent this is for web-login authorization rather than general API auth. It offers no when-not guidance and does not say whether auth_setup or auth_status must come first, so the call sequence is only implied.

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