Skip to main content
Glama

key_locker

Stores SSH key passphrases and sudo/login passwords in an encrypted local vault and autofills them in launched terminal panes while keeping secrets hidden from the assistant.

Instructions

Purpose: Manage credentials the terminal autofills for you (SSH key passphrases, sudo / login passwords). Secrets are entered once into the locker's own secure dialog and stored encrypted on this machine (Windows DPAPI, current user); these stored secrets are NEVER shown to the assistant or sent to this tool — this covers what the locker holds, not every password on the machine. Details: action='save' pre-seeds a credential for a binding URI (ssh://user@host:22, sudo://host/root, https-cred://host:443, sshkey:SHA256:…): it opens the locker's secure entry dialog and stores the secret; the first save also shows a one-time enable confirmation. action='list' shows saved bindings (metadata only, never secrets). action='forget' deletes a binding and its secret. action='set_policy' toggles per-binding autofill confirmation. action='status' reports whether the locker is enabled (consent) and how many bindings exist. action='launch_console' opens (or reuses) an autofill-capable anchored pane and returns {paneId, windowTitle} — by default a new tab in the user's current Windows Terminal window (host:'classic' opens a dedicated classic console window instead). action='fill_once' asks the user to type a secret into the locker's dialog and types it once into the password prompt (or ssh's 'Enter passphrase for key' prompt) currently shown in a launch_console pane, then forgets it; with tag:'' it is kept for that pane until the pane closes, and a later fill_once with the same tag asks the user only for a one-click Fill / Cancel (or nothing, at the same prompt, once the user ticked 'Don't ask again'; retype:true types it again). action='forget_tag' erases one kept tag; list shows the kept tag names as paneTags. Prefer: Autofill is AUTOMATIC when a bound command triggers a credential prompt in the terminal — you never fill a SAVED secret by hand. For a prompt autofill does not handle (an ssh inside another ssh session, or a login the user does not want saved), send the command, then call fill_once on that pane. Autofill and fill_once ONLY work in a pane opened by launch_console (a pre-existing terminal is never autofilled): to autofill, first launch_console, then run the ssh / sudo command with terminal({action:'run'|'send', paneId}) — pass the paneId field, not the windowTitle. Keep the returned paneId; there is no pane-listing action, but launch_console with fresh:false reuses the most-recent pane and returns its paneId again. Use save to enroll, list/status to inspect. Caveats: Windows-only. The anchored pane defaults to a Windows Terminal tab (autofill and terminal reads operate while that tab is the ACTIVE tab — switching away pauses them safely); host:'classic' opens a dedicated classic console window instead, and is the retry when Windows Terminal is not installed (KeyLockerWtUnavailable). The human can also see and type into the pane. Enabling the locker (first save or launch_console) grants BOTH credential autofill AND the ability for the assistant to launch a locker-owned pane. Disable the whole feature with DESKTOP_TOUCH_DISABLE_KEY_LOCKER=1. An ssh save needs the host key already in known_hosts (connect once first). API-token / env-var credentials are not supported yet. Examples: key_locker({action:'status'}) → {consentAccepted:false, disabled:false, bindingCount:0} key_locker({action:'save', uri:'sudo://buildbox/root'}) → opens the secure dialog → {captured:true} key_locker({action:'list'}) → {bindings:[{displayUri:'sudo://buildbox/root', scheme:'sudo', …}]} key_locker({action:'launch_console'}) → {paneId:'wt:31264:13322426700123', windowTitle:'dtm-locker-console-…'} → then terminal({action:'send', paneId:'wt:31264:13322426700123', input:'ssh user@host'}) key_locker({action:'launch_console', host:'classic'}) → {paneId:'12345678', windowTitle:'dtm-locker-console-…'} (dedicated classic console window) key_locker({action:'fill_once', paneId:'wt:31264:13322426700123', reason:'log in to the jump host', tag:'jump'}) → the user types once → {filled:true, verified:true, tag:'jump', tagKept:true}; the next fill_once with tag:'jump' shows only Fill / Cancel

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": {
      "action": "<action>"
    },
    "name": "key_locker"
  }
}

Input Schema

NameRequiredDescriptionDefault
tagNo'fill_once': A short name for this secret in THIS pane (letters, digits, '.', '_', '-'; up to 32), e.g. 'jump' or 'db1'. New tag: the user types the secret, it is filled and KEPT for this pane until the pane closes. Kept tag: the user only confirms (Fill / Cancel); nothing is typed. If the user ticks 'Don't ask again' there, later fills of that tag in this pane, at a prompt with the same text, go in without asking (tagAlways:true; list shows these as paneTagsNoConfirm). At most 8 tags per pane. Omit for a one-time fill that is forgotten at once. 'forget_tag': The tag to forget.
uriNoA binding URI identifying the credential target — e.g. `ssh://user@host:22`, `sudo://host/root`, `https-cred://github.com:443`, `sshkey:SHA256:…` (no `//`). Parsed per the L1 grammar; malformed input is rejected.
hostNo'windows-terminal' (default) = open a new tab in the user's current Windows Terminal window. 'classic' = open a dedicated classic console window instead (the fallback when Windows Terminal is not installed — a KeyLockerWtUnavailable error tells you to retry with this). A Windows Terminal pane autofills/reads only while its tab is the ACTIVE tab; a classic console has its own window.
freshNofalse (default) = reuse the most-recent still-open anchored pane of the requested host; true = open a NEW one (bounded).
actionYesAction selector — one of: list, save, forget, set_policy, status, launch_console, fill_once, forget_tag. Per-action required fields are enforced at call time (see the tool description); this flat schema lists every action's fields as optional.
paneIdNo'fill_once': The paneId returned by launch_console (only those panes can be filled). 'forget_tag': The paneId the tag was kept for.
reasonNoOne short sentence the dialog shows the user as YOUR reason (e.g. 'log in to 192.168.1.20 via the jump host'). Shown as the assistant's words; never put a secret here.
retypeNotrue = with a kept tag, ask the user to type the secret again and replace the kept one (e.g. it was wrong).
submitNotrue (default) = press Enter after typing the secret; false = type only.
includeNoOptional response-shape opt-in. `['envelope']` returns the self-documenting envelope (`_version` / `data` / `as_of` / `confidence`). `['raw']` forces raw shape (overrides DESKTOP_TOUCH_ENVELOPE=1 server default). Default behaviour is raw shape (compat with existing clients).
confirmEveryInjectionNotrue (default) = confirm every autofill for this binding; false = opt out (autofill without asking).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv2.4.1
    • changedInput schema / properties / action / description
      Previous value: -"Action selector — one of: list, save, forget, set_policy, status, launch_console, fill_once. Per-action required fields are enforced at call time (see the tool description); this flat schema lists every action's fields as optional."New value: +"Action selector — one of: list, save, forget, set_policy, status, launch_console, fill_once, forget_tag. Per-action required fields are enforced at call time (see the tool description); this flat schema lists every action's fields as optional."
    • changedInput schema / properties / action / enum
      Previous value: -[
      -  "list",
      -  "save",
      -  "forget",
      -  "set_policy",
      -  "status",
      -  "launch_console",
      -  "fill_once"
      -]New value: +[
      +  "list",
      +  "save",
      +  "forget",
      +  "set_policy",
      +  "status",
      +  "launch_console",
      +  "fill_once",
      +  "forget_tag"
      +]
    • changedInput schema / properties / paneId / description
      Previous value: -"The paneId returned by launch_console (only those panes can be filled)."New value: +"'fill_once': The paneId returned by launch_console (only those panes can be filled).\n'forget_tag': The paneId the tag was kept for."
    • addedInput schema / properties / retype
      Added value: +{
      +  "description": "true = with a kept tag, ask the user to type the secret again and replace the kept one (e.g. it was wrong).",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / tag
      Added value: +{
      +  "description": "'fill_once': A short name for this secret in THIS pane (letters, digits, '.', '_', '-'; up to 32), e.g. 'jump' or 'db1'. New tag: the user types the secret, it is filled and KEPT for this pane until the pane closes. Kept tag: the user only confirms (Fill / Cancel); nothing is typed. If the user ticks 'Don't ask again' there, later fills of that tag in this pane, at a prompt with the same text, go in without asking (tagAlways:true; list shows these as paneTagsNoConfirm). At most 8 tags per pane. Omit for a one-time fill that is forgotten at once.\n'forget_tag': The tag to forget.",
      +  "pattern": "^[A-Za-z0-9._-]{1,32}$",
      +  "type": "string"
      +}
  2. Changed12 schema fields changedv2.3.1
    • addedInput schema / $schema
      Added value: +"http://json-schema.org/draft-07/schema#"
    • removedInput schema / additionalProperties
      Removed value: -true
    • addedInput schema / properties / action
      Added value: +{
      +  "description": "Action selector — one of: list, save, forget, set_policy, status, launch_console, fill_once. Per-action required fields are enforced at call time (see the tool description); this flat schema lists every action's fields as optional.",
      +  "enum": [
      +    "list",
      +    "save",
      +    "forget",
      +    "set_policy",
      +    "status",
      +    "launch_console",
      +    "fill_once"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / confirmEveryInjection
      Added value: +{
      +  "description": "true (default) = confirm every autofill for this binding; false = opt out (autofill without asking).",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / fresh
      Added value: +{
      +  "description": "false (default) = reuse the most-recent still-open anchored pane of the requested host; true = open a NEW one (bounded).",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / host
      Added value: +{
      +  "description": "'windows-terminal' (default) = open a new tab in the user's current Windows Terminal window. 'classic' = open a dedicated classic console window instead (the fallback when Windows Terminal is not installed — a KeyLockerWtUnavailable error tells you to retry with this). A Windows Terminal pane autofills/reads only while its tab is the ACTIVE tab; a classic console has its own window.",
      +  "enum": [
      +    "windows-terminal",
      +    "classic"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / include
      Added value: +{
      +  "description": "Optional response-shape opt-in. `['envelope']` returns the self-documenting envelope (`_version` / `data` / `as_of` / `confidence`). `['raw']` forces raw shape (overrides DESKTOP_TOUCH_ENVELOPE=1 server default). Default behaviour is raw shape (compat with existing clients).",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / paneId
      Added value: +{
      +  "description": "The paneId returned by launch_console (only those panes can be filled).",
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / reason
      Added value: +{
      +  "description": "One short sentence the dialog shows the user as YOUR reason (e.g. 'log in to 192.168.1.20 via the jump host'). Shown as the assistant's words; never put a secret here.",
      +  "maxLength": 200,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / submit
      Added value: +{
      +  "description": "true (default) = press Enter after typing the secret; false = type only.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / uri
      Added value: +{
      +  "description": "A binding URI identifying the credential target — e.g. `ssh://user@host:22`, `sudo://host/root`, `https-cred://github.com:443`, `sshkey:SHA256:…` (no `//`). Parsed per the L1 grammar; malformed input is rejected.",
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / required
      Added value: +[
      +  "action"
      +]
  3. Addedv1.12.0

TDQS

A4.8/5.0
Behavior5/5

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

No annotations are supplied, so the description carries the full burden, and it does: secrets are encrypted via Windows DPAPI and never shown to the assistant, secrets are entered in the locker's own dialog, enabling grants both autofill and pane-launch ability, the active-tab requirement, Windows-only scope, the DESKTOP_TOUCH_DISABLE_KEY_LOCKER escape hatch, the known_hosts prerequisite, and unsupported API-token credentials.

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?

It is long and dense, front-loaded with Purpose, then Details, Prefer, Caveats, and Examples. The examples materially reduce ambiguity about return shapes and the launch-then-send flow. Some duplication remains—the classic-console fallback is restated in Details and Caveats—so it is efficient but not maximally tight.

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 an 11-parameter tool with no annotations and no output schema, it covers the essentials an agent needs: return shapes are shown via examples (status, list, launch_console, fill_once), the paneId round-trip is spelled out, failure modes (KeyLockerWtUnavailable, malformed URI) are noted, and the human-in-the-loop interaction is described.

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, but the description adds meaningful cross-parameter behavior: per-action required fields are enforced at call time despite the flat schema, save opens a dialog and the first save shows a one-time consent, fill_once's tag lifecycle (kept until pane closes, then one-click Fill/Cancel), and fresh:false reuse. It adds value beyond the schema, though much of that value lives in the 'Details' rather than the parameter list.

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+resource: 'Manage credentials the terminal autofills for you (SSH key passphrases, sudo / login passwords).' It scopes the resource precisely ('stored secrets... never shown to the assistant'), enumerates all eight actions, and distinguishes itself from the terminal tool by explaining that autofill happens in a locker-launched pane, not a pre-existing terminal.

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?

The 'Prefer' paragraph gives explicit when/when-not guidance: autofill is automatic for bound commands; for prompts autofill does not handle (ssh-in-ssh, unsaved logins), 'send the command, then call fill_once.' It names the required ordering with the terminal sibling ('first launch_console, then run the ssh / sudo command with terminal({action:'run'|'send', paneId})') and warns 'pass the paneId field, not the windowTitle.'

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