Skip to main content
Glama

get_languages_tool

Extract supported languages from iOS/macOS Xcode String Catalog (.xcstrings) files to manage localization workflows.

Instructions

MCP tool to get supported languages from xcstrings file. Args: file_path (str): Path to the .xcstrings file Returns: str: JSON string of supported languages or error message

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes

Implementation Reference

  • The handler function for 'get_languages_tool'. It validates the input xcstrings file path, retrieves the supported languages using the imported get_supported_languages function, and returns a formatted string with the list of languages or an error message.
    @mcp.tool() def get_languages_tool(file_path: str) -> str: """ MCP tool to get supported languages from xcstrings file. Args: file_path (str): Path to the .xcstrings file Returns: str: JSON string of supported languages or error message """ try: if not validate_xcstrings_file(file_path): return f"Error: Invalid file path or not an .xcstrings file: {file_path}" languages = get_supported_languages(file_path) return f"Supported languages: {', '.join(languages)}" except Exception as e: return format_error_message(e, "Failed to get supported languages")

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/iamnotagentleman/localizable-xcstrings-mcp'

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