elfa_reload_env
Reload .env files from common locations to update environment variables without restarting the CG Alpha MCP server, ensuring real-time configuration adjustments for crypto market analysis.
Instructions
Reload .env files from common locations.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- mcp-server.js:144-156 (handler)The main handler function for the 'elfa_reload_env' tool. It reloads .env files using loadEnvMulti(), rebuilds ELFA_AUTH and updates ELFA_BASE from the new env vars, then returns a status object with the updated configuration (with masked API key)."elfa_reload_env": async () => { loadEnvMulti(); ELFA_AUTH = buildAuthFromEnv(); ELFA_BASE = (process.env.ELFA_BASE || ELFA_BASE).replace(/\/+$/,""); return { content: textContent({ ok: true, base: ELFA_BASE, loaded: ENV_INFO.loaded, from: ENV_INFO.from, vars: ENV_INFO.vars, auth: { headerName: ELFA_AUTH.headerName || "", scheme: ELFA_AUTH.scheme || "", key: maskKey(ELFA_AUTH.key) } }) }; },
- mcp-server.js:276-279 (registration)The tool registration in the 'tools' array, including name, description, empty input schema (no parameters required), and annotations indicating it's an admin tool for reloading environment variables.{ name:"elfa_reload_env", description:"Reload .env files from common locations.", inputSchema:{ type:"object", properties:{} }, annotations:{ title:"ELFA: Reload .env", readOnlyHint:false, openWorldHint:false }