Skip to main content
Glama
iamnotagentleman

Localizable XStrings MCP Server

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

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")
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions that the tool returns 'JSON string of supported languages or error message,' which gives some output behavior. However, it lacks details on permissions, file access requirements, error conditions, or performance characteristics, which are important for a file-reading operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded, with the core purpose stated first. The 'Args' and 'Returns' sections are structured but slightly redundant since an output schema exists. Every sentence adds value, though it could be more streamlined by omitting the return explanation given the output schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (1 parameter, no annotations, but with an output schema), the description is minimally complete. The output schema handles return values, so the description doesn't need to explain those. However, for a file-based tool, it lacks context on error handling, file format expectations, or integration with sibling tools, leaving gaps in usability.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds minimal semantics beyond the input schema. It specifies that 'file_path' is a 'Path to the .xcstrings file,' which clarifies the expected file type. However, with 0% schema description coverage, the description doesn't fully compensate by detailing format constraints, examples, or validation rules for the parameter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'get supported languages from xcstrings file.' It specifies the verb ('get'), resource ('supported languages'), and source ('xcstrings file'), making the function unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'get_keys_tool' or 'get_base_strings_tool', which likely retrieve different data from the same file type.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools, prerequisites, or specific contexts for usage. The only implied usage is when languages are needed from an xcstrings file, but this is too vague for effective tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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