Skip to main content
Glama
fkesheh
by fkesheh

read_skill_env

Lists environment variable keys configured for a skill to verify required credentials and API keys are properly set up before running scripts.

Instructions

Read and list all environment variable keys defined in a skill's .env file.

This tool helps you understand what environment variables are configured for a skill:

  • Lists only the KEY names (values are hidden for security)

  • Shows whether a .env file exists for the skill

  • Returns an empty message if no variables are set

PARAMETERS:

  • skill_name: The name of the skill directory

USE CASES:

  • Check what environment variables a skill needs before running scripts

  • Verify that required credentials or API keys are configured

  • Understand the expected configuration for a skill

  • Debug missing environment variables

SECURITY NOTE:

  • Environment variable VALUES are intentionally hidden and not returned

  • This prevents accidental exposure of secrets or credentials

  • To set or update variables, use update_skill_env tool

RETURNS: A list of environment variable key names (e.g., API_KEY, DATABASE_URL)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
skill_nameYesName of the skill

Implementation Reference

  • Pydantic input model/schema for the 'read_skill_env' tool, defining the required 'skill_name' parameter.
    class ReadSkillEnvInput(BaseModel): """Input for reading skill .env file.""" skill_name: str = Field(description="Name of the skill")
  • Core helper function in EnvironmentService that reads the raw content of a skill's .env file, implementing the logic for the 'read_skill_env' tool.
    @staticmethod def read_env_file(skill_name: str) -> str: """ Read raw .env file contents (allows LLM to see and edit). Args: skill_name: Name of the skill Returns: Raw .env file content as string Raises: SkillNotFoundError: If skill doesn't exist EnvFileError: If .env file can't be read """ skill_dir = SKILLS_DIR / skill_name if not skill_dir.exists(): raise SkillNotFoundError(f"Skill '{skill_name}' does not exist") env_file = EnvironmentService.get_env_file_path(skill_name) try: if env_file.exists(): return env_file.read_text() return "" except Exception as e: raise EnvFileError(f"Failed to read .env for skill '{skill_name}': {str(e)}")

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/fkesheh/skill-mcp'

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