Skip to main content
Glama

import_dotenv

Idempotent

Parse dotenv-formatted text and batch-store key/value pairs into q-ring keyring, ideal for migrating .env files or onboarding projects; preview with dryRun before writing.

Instructions

[secrets] Parse standard dotenv-formatted text and store each key/value pair into the keyring in one batch. Use when migrating an existing .env file into q-ring or onboarding a new project; prefer set_secret for a single key, and teleport_unpack to import an encrypted bundle. Mutates the keyring (one write per parsed key) and emits a 'write' audit event for each. Supports comments, single/double quotes, and \n escapes. Returns a multiline summary listing imported keys and any skipped (existing) keys; in dryRun mode no writes happen and the same summary is produced for review.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scopeNoWhere the secret lives. 'global' = user keyring (default if omitted on reads), 'project' = scoped to projectPath, 'team' = team-shared (needs teamId), 'org' = org-shared (needs orgId).global
dryRunNoIf true, parse and report what would happen but do not write to the keyring. Useful for previewing imports before committing.
contentYesRaw .env file content as a single string (newline-separated KEY=VALUE lines, comments allowed).
projectPathNoAbsolute path to the project root for project-scoped secrets and policy resolution. Defaults to the MCP server's current working directory when omitted.
skipExistingNoIf true, leave already-present keys untouched and add them to the 'skipped' list instead of overwriting.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.11.7
    • changedInput schema / properties / content / description
      Previous value: -"The .env file content to parse and import"New value: +"Raw .env file content as a single string (newline-separated KEY=VALUE lines, comments allowed)."
    • changedInput schema / properties / dryRun / description
      Previous value: -"Preview what would be imported without saving"New value: +"If true, parse and report what would happen but do not write to the keyring. Useful for previewing imports before committing."
    • changedInput schema / properties / projectPath / description
      Previous value: -"Project root path for project-scoped secrets"New value: +"Absolute path to the project root for project-scoped secrets and policy resolution. Defaults to the MCP server's current working directory when omitted."
    • changedInput schema / properties / scope / description
      Previous value: -"Scope: global, project, team, or org"New value: +"Where the secret lives. 'global' = user keyring (default if omitted on reads), 'project' = scoped to projectPath, 'team' = team-shared (needs teamId), 'org' = org-shared (needs orgId)."
    • changedInput schema / properties / skipExisting / description
      Previous value: -"Skip keys that already exist in q-ring"New value: +"If true, leave already-present keys untouched and add them to the 'skipped' list instead of overwriting."
  2. Changed2 schema fields changedv0.11.5
    • changedInput schema / properties / scope / description
      Previous value: -"Scope: global or project"New value: +"Scope: global, project, team, or org"
    • changedInput schema / properties / scope / enum
      Previous value: -[
      -  "global",
      -  "project"
      -]New value: +[
      +  "global",
      +  "project",
      +  "team",
      +  "org"
      +]
  3. Addedv0.1.1

TDQS

A4.8/5.0
Behavior5/5

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

Annotations cover the safety profile (readOnlyHint=false, destructiveHint=false, idempotentHint=true), and the description adds substantial beyond-schema context: one write per parsed key, a 'write' audit event per key, skipExisting/overwrite semantics, and dryRun producing the same summary with no writes. It also discloses the parsing features supported (comments, quotes, \n escapes). Nothing contradicts the annotations.

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?

Dense but organized: purpose first, then routing, then mutation/audit behavior, then parsing and return semantics. Every clause carries information, though the run-on middle sentence could be split for faster scanning.

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?

With no output schema, the description still documents the return value (multiline summary of imported and skipped keys) and dryRun's parallel output. For a 5-param batch-import tool, an agent has everything needed to call it correctly.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds meaning beyond it by explaining the observable effect of skipExisting (keys land in the 'skipped' list rather than overwritten) and dryRun (no writes, same summary). Scope/format details still rest on the schema.

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

Purpose5/5

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

States a specific verb+resource ('Parse dotenv-formatted text and store each key/value pair into the keyring') and explicitly names the sibling alternatives set_secret and teleport_unpack. An agent can distinguish it from other import/write tools without opening the schema.

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

Usage Guidelines5/5

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

Gives the two concrete trigger scenarios (migrating a .env file, onboarding a project) and routes the agent: prefer set_secret for a single key, teleport_unpack for encrypted bundles. Explicit when/when-not/alternatives coverage.

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