Skip to main content
Glama

Update Item

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
NameRequiredDescriptionDefault
idYes
patchYes

Implementation Reference

  • 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.' }],
        };
      },
    );
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. While 'Update' implies a mutation operation, the description doesn't address important behavioral aspects: whether this requires authentication/permissions, if it's idempotent, what happens with invalid fields, whether partial updates are atomic, or what the response contains. For a mutation tool with zero annotation coverage, this is a significant gap.

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?

The description is extremely concise at just 7 words, with zero wasted language. It's front-loaded with the core action and immediately specifies the key parameters. Every word serves a purpose in this minimal formulation.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with complex nested parameters (patch contains multiple object types including login with URIs and fields arrays), no annotations, no output schema, and 0% schema description coverage, the description is inadequate. It doesn't explain what constitutes an 'item', what fields are updatable, authentication requirements, error conditions, or return values. The complexity demands more contextual information.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description mentions 'selected fields' and 'by id', which aligns with the two parameters (id and patch). However, with 0% schema description coverage, the schema provides no parameter descriptions. The description doesn't explain what fields can be updated, the structure of the patch object, or provide examples. It adds minimal value beyond what's obvious from parameter names.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Update selected fields') and target ('an item by id'), providing a specific verb+resource combination. However, it doesn't distinguish this tool from sibling update tools like 'keychain_edit_folder' or 'keychain_edit_org_collection', which likely perform similar partial updates on different resource types.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. There are multiple sibling tools for creating, deleting, and editing various resources, but no indication of when partial item updates are appropriate versus complete replacements or when to use other item-related tools like 'keychain_restore_item' or 'keychain_move_item_to_organization'.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/icoretech/warden-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server