Skip to main content
Glama

Import logins from a JSON file

browser_import_logins_from_file
Destructive

Import logins from a JSON file by inserting each {origin, user, password} entry directly through nsILoginManager, bypassing LoginCSVImport errors. Duplicate origin+username entries are merged or rejected by Firefox.

Instructions

Read a JSON file holding an array of {origin, user, password} and insert each one through nsILoginManager directly, bypassing LoginCSVImport (which fails with FILE_PERMISSIONS_ERROR in this build). Tell the truth about duplicates: Firefox silently merges or rejects entries whose origin+username already exist.

Input Schema

NameRequiredDescriptionDefault
pathYesAbsolute path to a JSON file: array of {origin, user, password}

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, and the description adds genuinely new context: the implementation bypasses LoginCSVImport because that path throws FILE_PERMISSIONS_ERROR in this build, and Firefox silently merges or rejects entries with an existing origin+username. That duplicate behavior is important for an agent to know. It stops short of saying whether the import is atomic or what happens to already-existing entries beyond 'merges or rejects'.

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?

Two tight sentences with no filler; the input format and the insertion mechanism come first, and the duplicate caveat follows. The aside about LoginCSVImport is implementation detail but earns its place because it explains why this tool exists.

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 a one-parameter mutation tool with no output schema, the description covers the input shape, the write mechanism, the failure mode of the naive alternative, and the duplicate-handling caveat, while annotations carry the destructive flag. An agent has enough to call it correctly and to warn about duplicates.

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?

Schema coverage is 100% for the single path parameter, and the schema already spells out 'Absolute path to a JSON file: array of {origin, user, password}'. The description restates the same format without adding constraints such as encoding, size limits, or handling of malformed rows, so the schema does the heavy lifting.

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?

States a specific verb and resource: reads a JSON array of {origin, user, password} and inserts each entry via nsILoginManager, explicitly noting it bypasses LoginCSVImport. The mechanism is precise, but the description never mentions the sibling tool browser_import_logins, so the agent must infer the distinction between file-based and other import paths from the name alone.

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

Usage Guidelines3/5

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

Usage is implied rather than stated: the array-of-credentials input format signals a batch import, contrasting implicitly with the single-entry browser_add_login. There is no explicit 'use this when X, use browser_import_logins when Y' routing, and no prerequisites (file must exist, absolute path, profile unlocked) are called out.

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

Deploy Server

Other Tools