Skip to main content
Glama

instance_add_key

Uploads your SSH public key to your account so SSH access works for GPU instances created afterward. Run once before first SSH use; only applies to new instances in local mode.

Instructions

上传 SSH 公钥到账户(仅本地模式有意义;首次用 SSH 前执行)。 identity_file 为私钥路径(默认 ~/.ssh/id_ed25519,CLI 只上传公钥;无密钥时 CLI 会引导生成)。 公钥只对上传之后创建的实例生效。托管模式请改用 SSH_PRIVATE_KEY 注入既有私钥。

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": "instance_add_key"
  }
}

Input Schema

NameRequiredDescriptionDefault
identity_fileNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.5/5.0
Behavior4/5

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

No annotations exist, so the description carries the full behavioral burden and does well: it discloses that the key only affects instances created after upload, that the CLI uploads only the public half, and that it will guide key generation if none exists. It omits whether re-uploading replaces an existing key and any auth/permission requirements, which keeps it short of a 5.

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?

Purpose is front-loaded in the first sentence, followed by parameter semantics and then the timing/mode caveats. Three tight sentences with no filler, though the nested parentheticals make it slightly denser than necessary.

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?

For a single-parameter key-upload tool with no annotations and no output schema, this covers the essentials: mode applicability, the effect timing relative to instance creation, and how the key file is interpreted. Missing only overwrite behavior and result/failure reporting, which is acceptable at this complexity.

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?

With 0% schema coverage, the description must supply meaning and largely does: identity_file is the private key path defaulting to ~/.ssh/id_ed25519, and importantly the CLI derives and uploads only the public key from it, preventing an agent from passing a .pub path. It does not explicitly say that a null value falls back to the default, which is a minor residual gap.

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 opens with a specific verb+resource: uploading an SSH public key to the account, and scopes it to local mode. None of the listed siblings (instance_create, instance_connect, etc.) performs key upload, so an agent can identify this tool's unique role immediately.

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

Usage Guidelines5/5

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

It states explicitly when to call it (before first SSH use) and when NOT to: in hosted/managed mode the agent should instead inject an existing private key via SSH_PRIVATE_KEY. Both the trigger condition and the alternative are spelled out.

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