Skip to main content
Glama
oneguard-sa

oneguard-mcp

Official
by oneguard-sa

Sync secrets into a directory's .env file

oneguard_env_sync

Fetches the linked secret from OneGuard and writes it to the project's .env file. Returns only variable names, never values, and re-pulls updated secrets on repeat calls.

Instructions

THE MAIN TOOL. Fetches the secret linked to a directory and writes it into that directory's .env file, then remembers the link for next time. Call it with only project_dir when the directory is already linked (it re-pulls the latest values). If it is not linked yet, this returns the list of vaults (or secrets) to choose from — show those to the user, let THEM pick, then call again with vault and secret. Returns only the variable NAMES that were written; values go to disk and are never shown.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoEnv file path relative to project_dir. Defaults to ".env".
vaultNoVault id or 8-character prefix. Omit if the directory is already linked.
relinkNoIgnore the existing link and set a new one. Use when the user wants to point this directory at a different secret.
secretNoSecret id or 8-character prefix. Omit if the directory is already linked.
project_dirYesAbsolute path to the developer's project directory. This is where the .oneguard link file and the .env file live. Must be absolute — ask the user if you do not know it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations, it discloses important behavioral traits: values go to disk and are never shown, only variable names are returned, and the tool remembers the link. It also reveals the two-phase behavior on first use. This adds substantial context beyond readOnlyHint=false.

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 operation and packs workflow, return behavior, and privacy into a compact block. The phrase 'THE MAIN TOOL' is unnecessary, but it does not distract much. Every other sentence contributes value.

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 correctly explains what is returned ('only the variable NAMES that were written') and the important guarantee that values are never displayed. It also covers both linked and unlinked invocation paths, so an agent can call the tool correctly in either state.

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. The description adds interaction semantics for vault and secret: they are only needed when the directory is not yet linked, and on the first call the tool returns choices rather than requiring them upfront. This goes beyond the schema's individual parameter descriptions.

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?

The description states a specific action: 'Fetches the secret linked to a directory and writes it into that directory's .env file, then remembers the link.' This clearly identifies both the resource and the operation, and the 'writes into .env' framing differentiates it from sibling push/list tools.

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

Usage Guidelines4/5

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

The description gives concrete invocation guidance: call with only project_dir when already linked, and if not linked, return choices, let the user pick, then call again with vault and secret. It does not explicitly name alternative tools or exclusions, but the workflow is explicit and actionable.

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