Skip to main content
Glama
antideploy

antideploy-mcp

Official
by antideploy

Put the database's variables in .env

database_env_to_file

Writes DATABASE_URL and PG* database variables into a project's .env file, keeps the password out of chat, replaces existing values, preserves other entries, and adds the file to .gitignore.

Instructions

Write DATABASE_URL and the PG* variables for this application's database into a .env file in the project directory, and return only the names of what was written. The password goes into the file and never into this conversation, so do not read the file back out to the user. These are the same variables the deployed app receives. Variables already in the file are replaced, everything else is kept, and the file is added to .gitignore. Needs the account token that login (or https://antideploy.com/agent.md) saves on this machine: a project key cannot read a connection string. Once the app is live its database holds real data: do not reset, truncate or drop it from here without asking.

Input Schema

NameRequiredDescriptionDefault
fileNoA .env file inside the project directory. Default .env; .env.local suits Next.js.
directoryNoThe project folder. Defaults to this server's working directory.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only declare openWorldHint=false, so the description carries the burden and does so thoroughly: the password is written to disk and never returned, existing variables are replaced while others are kept, the file is added to .gitignore, and the DB may hold real data that must not be reset or dropped without asking. These are exactly the merge semantics, secret-handling, and destructive-risk traits an agent needs beyond a single locality hint.

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?

Front-loaded with the action and the return contract, then ordered by importance: secret handling, merge semantics, auth requirement, data-safety warning. It is long but every sentence contributes an operational rule that cannot be derived from structured fields.

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?

No output schema exists, and the description still states precisely what is returned (names only) and what is not (the password). With only two optional parameters and a minimal annotation set, nothing an agent needs in order to invoke this safely is missing.

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%, with the `file` parameter already explaining the .env.local Next.js case, so the schema does the heavy lifting. The description adds only ambient context ("in the project directory") rather than new meaning for `file` or `directory`, which matches the baseline 3.

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?

Starts with a specific verb and resource: writes DATABASE_URL and the PG* variables into a .env file, and states the return value is only the names. The database scoping clearly distinguishes it from the storage_, auth_, and email_env_to_file siblings, which an agent can tell apart without opening any schema.

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?

Gives concrete preconditions (needs the account token saved by `login`; a project key cannot read a connection string) and an explicit prohibition (do not read the file back out to the user). It names `login` as the dependency but stops short of routing to sibling alternatives like set_env or set_env_from_file for the non-database case, leaving that to be inferred from the DATABASE_URL scoping.

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