keychain_create_attachment
Attach files to existing vault items by providing base64 content and filename. Securely adds attachments to password manager entries.
Instructions
Attach a file (base64) to an existing item. Returns the updated (redacted) item.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| itemId | Yes | ||
| filename | Yes | ||
| contentBase64 | Yes | ||
| reveal | No |
Implementation Reference
- src/tools/registerTools.ts:1214-1236 (handler)The tool 'keychain_create_attachment' is registered in 'src/tools/registerTools.ts' with the handler that calls 'sdk.createAttachment'. Note that the tool is registered as 'create_attachment', but 'deps.toolPrefix' is prepended to it.
{ title: 'Get Password History', description: 'Get an item password history (if any). Returning passwords requires reveal=true.', annotations: { readOnlyHint: true }, inputSchema: { id: z.string(), reveal: z.boolean().optional(), }, _meta: toolMeta, }, async (input, extra) => { const sdk = await deps.getSdk(extra.authInfo); const history = await sdk.getPasswordHistory(input.id, { reveal: effectiveReveal(input), }); return { structuredContent: toolResult( 'password_history', history.value, history.revealed, ), content: [{ type: 'text', text: 'OK' }],