Skip to main content
Glama

get_token

Issue short-lived tokens for specified credentials to enable authenticated API calls. Requires a purpose for audit and returns token value, header usage, and expiry.

Instructions

为指定凭据签发(或复用缓存的)临时令牌供后续调用使用。必须在 purpose 中说明本次用途,便于审计统计。返回令牌值、携带方式(请求头)、有效期。令牌仅缓存在内存中,过期自动重新签发。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes凭据名称或 id
purposeYes本次使用用途,如 '查询生产订单服务状态'
refreshNotrue 时强制重新登录签发,忽略缓存

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations provided, the description carries the full disclosure burden. It discloses that tokens are cached in memory, expire, and are automatically re-issued, plus the return payload (token value, header, validity). It does not mention error conditions or authorization requirements, but the core behavioral traits are well-covered.

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 two concise sentences, front-loaded with the core function and purpose requirement. Every clause earns its place, and the return details are compactly listed. No fluff.

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?

Given 3 parameters and no output schema, the description adequately covers the return value, caching, and expiration. It does not explain error scenarios or token scope, but for a token issuance tool the essentials are present. Slightly more detail on error handling would elevate it, but it's complete enough for an agent to invoke correctly.

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. The description adds value by explaining the purpose parameter's audit purpose and implying the refresh behavior via '或复用缓存的' (or reuse cached). It also describes the return format, enriching the schema without repeating it.

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 clearly states the verb '签发/复用' (issue/reuse) and the resource '凭据' (credential), explicitly distinguishing it as a token provisioning tool. It also mentions the purpose requirement and return format, which separates it from sibling tools like verify_login or list_credentials.

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?

The description implies when to use it: when a temporary token is needed for subsequent calls. It explicitly requires a purpose for audit, which is a clear precondition. However, it does not name alternative tools or exclusion conditions, though the context makes it obvious this is the go-to for token acquisition.

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