compare_env_keys
Compare key names in two dotenv files to find missing or extra variables and flag formatting issues, without exposing values.
Instructions
Compare the key names of two dotenv files, such as .env.example and .env.
Returns the keys the target is missing, the keys only the target has, how many keys both have, and problems in either file (duplicate keys, lines that are not KEY=value, unclosed quotes) by line number, the first 20 of each file. Values are never returned. Both files must be named .env, .env.* or *.env and be inside a directory the server was started with (--root); a relative path starts at the first of them.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"reference": "<reference>",
"target": "<target>"
},
"name": "compare_env_keys"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | Yes | File to check, e.g. .env | |
| reference | Yes | File that lists every key, e.g. .env.example |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| extra | Yes | Keys in the target that the reference lacks | |
| shared | Yes | How many keys both files have | |
| missing | Yes | Keys in the reference that the target lacks | |
| problems | Yes | The first 20 problems of each file | |
| problem_count | Yes | How many problems the two files have in all |