Skip to main content
Glama

add_credential

Add a named system credential with encrypted fields. Use env:VAR references for sensitive values to avoid exposing secrets in conversation.

Instructions

添加一个系统凭据(名称唯一)。敏感字段值支持 'env:VAR_NAME' 形式——写入时从服务进程环境变量读取实际值,推荐这种方式以避免密钥经过对话内容。所有字段以 AES-256-GCM 加密后落盘。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes唯一名称,如 github-prod
tagsNo
fieldsYes凭据字段。常用键名: username 与 password(basic、oauth-password 流程)、clientId 与 clientSecret(client-credentials 流程)、apiKey、token、key(静态密钥)。值为 'env:VAR' 时从环境变量解析。允许任意自定义字段。
systemNo所属系统/平台标识,如 github、内部 API 网关
authTypeYesbasic — 用户名和密码(HTTP Basic);可配置令牌端点换取访问令牌;api-key — 静态访问密钥(API Key / Bearer Token);oauth-password — OAuth2 资源所有者口令流程;oauth-client-credentials — OAuth2 客户端凭据流程;custom — 自定义令牌端点(body 模板用 {{field}} 引用凭据字段)
endpointsNo可选端点配置。仅允许公网 http/https 地址(环回/私有/保留网段默认拒绝,防 SSRF;可信内网目标需用户在插件设置中开启 allowPrivateEndpoints)
ttlSecondsNo令牌有效期(秒);端点未返回 expires_in 时使用,默认 3600
descriptionNo用途说明(给人和 AI 看)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations available, the description carries the full behavioral disclosure burden. It clearly reveals that sensitive field values are read from the service process environment variable at write time, that this is recommended to avoid secrets passing through conversation content, and that all fields are AES-256-GCM encrypted before being stored. These are meaningful security-relevant behaviors beyond what the schema conveys.

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 three short sentences with no filler. It front-loads the purpose, immediately adds the critical env-var pattern, and closes with the encryption guarantee. Every sentence contributes useful information.

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 the rich input schema, the description is largely complete for invocation: it covers the creation intent, uniqueness, secret handling, and persistence encryption. It does not describe return values or error behavior, and there is no output schema, but for a create operation these are not significant enough to lower the score further.

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 description coverage is high (88%), so the baseline is 3. The description adds extra meaning by specifying that 'env:VAR_NAME' is resolved from the service process environment variable at write time, recommends this pattern for security, and notes that every field is encrypted at rest. These details enhance the semantics of the fields parameter beyond the schema's own explanation.

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 states a specific verb and resource: '添加一个系统凭据' (add a system credential), with a clear uniqueness constraint. It distinguishes itself from siblings like update_credential and delete_credential by the action 'add', though it does not explicitly name or contrast those alternatives.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives no guidance on when to use add_credential versus update_credential, verify_login, get_token, or reveal_secret. It only implies creation by the word '添加' and suggests using 'env:VAR' for sensitive values, but does not state prerequisites, exclusions, or when to use an alternative.

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