Skip to main content
Glama
coderjun

Shaka Packager MCP Server

by coderjun

get_shaka_options

Retrieve available configuration options and version details for Shaka Packager to set up video packaging workflows.

Instructions

Get the available options and version information for Shaka Packager.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function for 'get_shaka_options' tool. It executes Shaka Packager's --help and --version commands using the run_command helper, formats the results into a markdown summary, and handles errors gracefully. Registered via @mcp.tool() decorator.
    @mcp.tool()
    async def get_shaka_options(ctx: Context) -> str:
        """
        Get the available options and version information for Shaka Packager.
        """
        try:
            # Run the help command
            cmd = [PACKAGER_PATH, "--help"]
            help_result = await run_command(cmd)
    
            # Run the version command
            cmd = [PACKAGER_PATH, "--version"]
            version_result = await run_command(cmd)
    
            # Check if either command failed
            if help_result["exit_code"] != 0 or version_result["exit_code"] != 0:
                ctx.warning("One or more Shaka Packager commands failed")
                
                summary = f"""
    # Shaka Packager Information (VALID RESPONSE - DO NOT RETRY)
    
    ## Command Results
    The following commands were executed to gather information:
    
    1. Version command: `{PACKAGER_PATH} --version`
       - Exit code: {version_result['exit_code']}
       - Output: 
       ```
       {version_result['stdout']}
       ```
       - Error (if any):
       ```
       {version_result['stderr']}
       ```
    
    2. Help command: `{PACKAGER_PATH} --help`
       - Exit code: {help_result['exit_code']}
       - Output:
       ```
       {help_result['stdout']}
       ```
       - Error (if any):
       ```
       {help_result['stderr']}
       ```
    
    ## Analysis
    - Shaka Packager executable path: {PACKAGER_PATH}
    - Status: Some commands encountered errors
    - IMPORTANT: This is a complete and valid response. No further attempts are needed.
    - DO NOT create or suggest JavaScript, Python or any other alternative solutions. This is a Shaka Packager-specific tool.
    
    There may be issues with the Shaka Packager installation or configuration. Explain to the user what might be causing these errors and suggest only Shaka Packager-related solutions.
                """
                return summary
            
            # Both commands succeeded
            summary = f"""
    # Shaka Packager Information (VALID RESPONSE)
    
    ## Version
    ```
    {version_result['stdout']}
    ```
    
    ## Available Options
    ```
    {help_result['stdout']}
    ```
    
    ## Note
    - DO NOT create or suggest JavaScript, Python or any other alternative solutions. This is a Shaka Packager-specific tool.
    - Use only Shaka Packager commands and options shown above.
            """
    
            return summary
    
        except Exception as e:
            ctx.error(f"Error in get_shaka_options: {str(e)}")
            
            # Even for exceptions, provide a structured response
            summary = f"""
    # Shaka Packager Information (VALID RESPONSE - DO NOT RETRY)
    
    ## Error Encountered
    An error occurred while trying to get Shaka Packager information:
    ```
    {str(e)}
    ```
    
    ## Analysis
    - Shaka Packager executable path: {PACKAGER_PATH}
    - Status: Error encountered
    - IMPORTANT: This is a complete and valid response. No further attempts are needed.
    - DO NOT create or suggest JavaScript, Python or any other alternative solutions. This is a Shaka Packager-specific tool.
    
    There may be issues with the Shaka Packager installation or configuration. Check that the executable exists and has proper permissions. Explain to the user what might be causing this error and suggest only Shaka Packager-related solutions.
            """
            
            return summary
  • The @mcp.tool() decorator registers the get_shaka_options function as an MCP tool.
    @mcp.tool()
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states what the tool does but fails to describe key traits: it doesn't specify if this is a read-only operation, what the output format looks like (though an output schema exists), or any potential side effects like network calls or authentication needs. This leaves significant gaps in understanding the tool's behavior.

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

Conciseness5/5

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

The description is a single, efficient sentence that directly states the tool's purpose without any wasted words. It is front-loaded with the core action and resource, making it easy to parse and understand quickly. Every part of the sentence contributes essential information.

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 low complexity (0 parameters, no annotations, but with an output schema), the description is minimally adequate. It explains what the tool does but lacks context on usage guidelines and behavioral traits. The presence of an output schema mitigates the need to describe return values, but more guidance on when and how to use this tool would improve completeness.

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

Parameters4/5

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

The tool has 0 parameters, and the schema description coverage is 100%, so there are no parameters to document. The description appropriately doesn't add parameter details, as none are needed, aligning with the baseline for zero parameters. No compensation is required, and it avoids redundancy.

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 verb 'Get' and the resource 'available options and version information for Shaka Packager', making the purpose specific and understandable. However, it doesn't explicitly distinguish this tool from its sibling 'get_shaka_documentation', which might also provide information about Shaka Packager, leaving some ambiguity about differentiation.

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 like 'get_shaka_documentation' or 'run_shaka_packager'. It lacks context about prerequisites, such as whether Shaka Packager needs to be installed or configured, or any exclusions for usage scenarios.

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/coderjun/shaka-packager-mcp-server'

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