Skip to main content
Glama

Add SSH key to webspace

webspace_add_ssh_key

Add an SSH public key to a webspace's ~/.ssh/authorized_keys, so its owner can log in over SSH and SFTP as the site user. Accepts ssh-ed25519, ssh-rsa and ecdsa-sha2-nistp256/384/521 keys. Returns the key with its keyId, the SHA-256 fingerprint that webspace_delete_ssh_key takes. Host, port and username for the login come from webspace_get_ssh_info. For a VPS use vps_upload_ssh_key.

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": {
      "id": "<id>",
      "publicKey": "<publicKey>"
    },
    "name": "webspace_add_ssh_key"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesThe webspace ID
labelNoComment stored with the key, e.g. the person or device it belongs to
publicKeyYesOne public key line: '<type> <base64> [comment]', e.g. the content of id_ed25519.pub

Schema Changelog

Changes observed during successful MCP inspections.

No schema history has been recorded yet.

TDQS

A4.9/5.0
Behavior5/5

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

Annotations only declare it is a non-read-only, non-destructive write. The description goes well beyond them: it names the file written (~/.ssh/authorized_keys), the security consequence (owner can log in over SSH/SFTP as the site user), accepted key algorithms, and the return payload including keyId and SHA-256 fingerprint.

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?

Four tight sentences with the core action first, then constraints, then return value, then routing pointers. No filler and nothing redundant with the schema.

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?

For a three-parameter mutation with no output schema, the description covers the effect, the accepted input formats, the returned identifiers, and the companion tools needed to actually use the login. Nothing an agent needs to call it correctly is missing.

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 still adds value by constraining publicKey to ssh-ed25519, ssh-rsa and ecdsa-sha2-nistp256/384/521, which the schema does not enumerate, and by clarifying that the returned keyId/fingerprint is what the delete tool consumes.

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?

States a specific verb and resource (add an SSH public key to a webspace) and immediately names the sibling it is not (vps_upload_ssh_key), so an agent can disambiguate from the VPS variants without opening a schema.

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?

Explicitly routes: use this for webspaces, use vps_upload_ssh_key for a VPS, use webspace_get_ssh_info for host/port/username, and webspace_delete_ssh_key consumes the fingerprint returned here. That is when-to-use plus alternatives plus follow-up linkage.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.