Skip to main content
Glama

Create Attachment

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
NameRequiredDescriptionDefault
itemIdYes
filenameYes
contentBase64Yes
revealNo

Implementation Reference

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

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

No annotations are provided, so the description carries full burden. It mentions the operation returns 'the updated (redacted) item,' hinting at output behavior and data redaction, but lacks critical details: required permissions, whether the attachment is encrypted/stored, rate limits, error conditions, or what 'redacted' entails. For a mutation tool with zero annotation coverage, this is insufficient.

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?

The description is front-loaded with the core action and efficiently uses two sentences. However, the second sentence about return values could be integrated more smoothly, and there's room to add brief usage context without bloating the text.

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?

Given a mutation tool with 4 parameters (0% schema coverage), no annotations, and no output schema, the description is incomplete. It lacks parameter explanations, behavioral details (e.g., side effects, auth needs), and sufficient context for safe invocation. The mention of 'redacted' output is helpful but doesn't compensate for major gaps.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate. It only vaguely references parameters ('file (base64)', 'existing item'), without explaining itemId, filename, contentBase64, or reveal. The description adds minimal meaning beyond the schema's property names, failing to clarify parameter purposes or constraints.

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 ('Attach a file') and target resource ('to an existing item'), with a specific format requirement ('base64'). It distinguishes from siblings like keychain_delete_attachment by focusing on creation rather than deletion. However, it doesn't explicitly differentiate from other 'create' tools (e.g., keychain_create_note) beyond the attachment-specific context.

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. It doesn't mention prerequisites (e.g., item must exist), exclusions, or comparisons to sibling tools like keychain_get_attachment or keychain_update_item. The agent must infer usage solely from the tool name and description.

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