Skip to main content
Glama

export-env

Export secrets from SecureCode vault as .env or CSV files with decrypted values for secure configuration management and backup.

Instructions

Export all secrets as .env or CSV format. Returns the full content with decrypted values.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNoExport format: "env" (default) or "csv"
tagsNoFilter by tags, e.g. { "env": "production" }

Implementation Reference

  • The "export-env" tool implementation which uses getClient().exportEnv() to retrieve secret values and returns them in the requested format.
    // Tool: export-env
    server.tool(
      'export-env',
      'Export all secrets as .env or CSV format. Returns the full content with decrypted values.',
      {
        format: z.enum(['env', 'csv']).optional().describe('Export format: "env" (default) or "csv"'),
        tags: z.record(z.string(), z.string()).optional().describe('Filter by tags, e.g. { "env": "production" }'),
      },
      async ({ format, tags }) => {
        try {
          const content = await getClient().exportEnv({ format: format || 'env', tags });
          if (!content || !content.trim()) {
            return wrapResponse([{ type: 'text', text: 'No secrets to export.' }]);
          }
          const lineCount = content.split('\n').filter(l => l.trim() && !l.startsWith('#')).length;
          return wrapResponse([{ type: 'text', text: `Exported ${lineCount} secrets (${format || 'env'} format):\n\n${content}` }]);
        } catch (error) {
          return errorResult(error);
        }
      }
    );

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/juanisidoro/securecode-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server