Skip to main content
Glama
GalvinGao

SimpleLocalize MCP Server

by GalvinGao

get_environment_status

Check environment status in SimpleLocalize to view translation counts, languages, and resource availability for localization management.

Instructions

Get the current status of a specified environment.

This endpoint returns information about the environment including the number of keys, languages, non-empty translations, creation date, and available resources.

Args: environment_key: The environment key to check status for (e.g., "_latest", "_production", or custom key)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
environment_keyYes

Implementation Reference

  • main.py:174-205 (handler)
    The handler function decorated with @mcp.tool() that implements the logic to fetch and format the environment status from the SimpleLocalize API.
    @mcp.tool()
    async def get_environment_status(environment_key: str) -> str:
        """Get the current status of a specified environment.
        
        This endpoint returns information about the environment including the number of keys,
        languages, non-empty translations, creation date, and available resources.
        
        Args:
            environment_key: The environment key to check status for (e.g., "_latest", "_production", or custom key)
        """
        if not environment_key:
            raise ValueError("Environment key is required")
        
        try:
            result = await make_simplelocalize_request(
                "GET",
                f"/api/v2/environments/{environment_key}"
            )
            
            data = result.get("data", {})
            
            # Format the response in a readable way
            status_info = f"""Environment '{environment_key}' Status:
    - Number of keys: {data.get('numberOfKeys', 0)}
    - Number of languages: {data.get('numberOfLanguages', 0)}
    - Non-empty translations: {data.get('numberOfNonEmptyTranslations', 0)}
    - Created at: {data.get('createdAt', 'Unknown')}
    - Number of resources: {len(data.get('resources', []))}"""
            
            return status_info
        except SimpleLocalizeError as e:
            return 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/GalvinGao/mcp-simplelocalize'

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