keychain_update_item
Modify specific fields of a vault item by its ID, such as login credentials, notes, or organizational details, to keep stored information current and accurate.
Instructions
Update selected fields of an item by id.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| patch | Yes |
Implementation Reference
- src/tools/registerTools.ts:1565-1624 (handler)The "keychain_update_item" tool corresponds to the "update_item" registered tool in "src/tools/registerTools.ts", which updates vault item fields using the SDK's updateItem method. The tool is invoked using the configured tool prefix (typically "keychain").
`${deps.toolPrefix}.update_item`, { title: 'Update Item', description: 'Update selected fields of an item by id.', inputSchema: { id: z.string(), patch: z.object({ name: z.string().optional(), notes: z.string().optional(), favorite: z.boolean().optional(), folderId: z.union([z.string(), z.null()]).optional(), collectionIds: z.array(z.string()).optional(), login: z .object({ username: z.string().optional(), password: z.string().optional(), totp: z.string().optional(), uris: z .array( z.object({ uri: z.string(), match: uriMatchInputSchema.optional(), }), ) .optional(), }) .optional(), fields: z .array( z.object({ name: z.string(), value: z.string(), hidden: z.boolean().optional(), }), ) .optional(), }), }, _meta: toolMeta, }, async (input, extra) => { if (isReadOnly) return readonlyBlocked(); const sdk = await deps.getSdk(extra.authInfo); const patch = input.patch as UpdatePatch; if (patch.login && Array.isArray(patch.login.uris)) { // Accept a couple of common match aliases at the MCP boundary. patch.login.uris = normalizeUrisInput( patch.login.uris as unknown as { uri: string; match?: UriMatchInput; }[], ) as typeof patch.login.uris; } const updated = await sdk.updateItem(input.id, patch); return { structuredContent: { item: updated }, content: [{ type: 'text', text: 'Updated.' }], }; }, );