Skip to main content
Glama
coderjun

Shaka Packager MCP Server

by coderjun

get_shaka_documentation

Access Shaka Packager documentation to understand command structure and examples for video packaging tasks.

Instructions

Get comprehensive Shaka Packager documentation, including command structure and examples.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main handler function for the 'get_shaka_documentation' tool. It is decorated with @mcp.tool() which also serves as registration. The function returns a hardcoded comprehensive documentation string for Shaka Packager usage, examples, and common options.
    @mcp.tool()
    async def get_shaka_documentation(ctx: Context) -> str:
        """
        Get comprehensive Shaka Packager documentation, including command structure and examples.
        """
        # Documentation based on https://shaka-project.github.io/shaka-packager/html/index.html
        documentation = """
    # Shaka Packager Documentation
    
    Shaka Packager is a media packaging SDK that supports packaging of MP4 and WebM files into fragmented MP4, MPEG-DASH, and HLS formats.
    
    ## Basic Command Structure
    
    The basic command structure for Shaka Packager is:
    
    ```
    packager [options] [stream_descriptors]
    ```
    
    ## Stream Descriptors
    
    Stream descriptors define the input and output streams. The basic format is:
    
    ```
    in=INPUT,stream=STREAM_TYPE[,STREAM_OPTIONS][,out=OUTPUT]
    ```
    
    - `in=INPUT`: Specifies the input file path
    - `stream=STREAM_TYPE`: Specifies the stream type (audio, video, text)
    - `out=OUTPUT`: Specifies the output file path (optional)
    
    Multiple streams are separated by spaces.
    
    ## Important: Input Format
    
    The input must ALWAYS be specified as `input=PATH` (for single files) or through stream descriptors as `in=PATH`.
    Never leave a space between `input=` and the file path or between `in=` and the file path.
    
    ## Common Examples
    
    1. **Dump stream info (analyze video):**
       ```
       packager --dump_stream_info input=/path/to/video.mp4
       ```
    
    2. **Package MP4 to HLS and DASH:**
       ```
       packager \
         in=/path/to/video.mp4,stream=audio,out=audio.mp4 \
         in=/path/to/video.mp4,stream=video,out=video.mp4 \
         --mpd_output=manifest.mpd \
         --hls_master_playlist_output=master.m3u8
       ```
    
    3. **Package MP4 to fragmented MP4:**
       ```
       packager \
         in=/path/to/video.mp4,stream=audio,out=audio.mp4 \
         in=/path/to/video.mp4,stream=video,out=video.mp4
       ```
    
    4. **Package with encryption:**
       ```
       packager \
         in=/path/to/video.mp4,stream=audio,out=audio.mp4 \
         in=/path/to/video.mp4,stream=video,out=video.mp4 \
         --enable_widevine_encryption \
         --key_server_url=https://license.widevine.com/cenc/getcontentkey/widevine_test \
         --content_id=16b8649bd2783c56 \
         --signer=widevine_test
       ```
    
    ## Most Common Options
    
    - `--dump_stream_info`: Analyze the input file
    - `--mpd_output=FILE`: Output DASH manifest file
    - `--hls_master_playlist_output=FILE`: Output HLS master playlist file
    - `--segment_duration=SECONDS`: Set the segment duration (default: 6)
    - `--protection_scheme=SCHEME`: Set the protection scheme (cenc, cens, cbc1, cbcs)
    - `--enable_widevine_encryption`: Enable Widevine encryption
    - `--enable_fixed_key_encryption`: Enable fixed key encryption
    - `--keys=KEY_INFO`: Specify key information for fixed key encryption
    
    ## Common Pitfalls
    
    1. Always use `input=PATH` with no space between `input=` and the path
    2. Always use `in=PATH` with no space between `in=` and the path
    3. Make sure all file paths are accessible to the packager
    4. For multiple streams, each stream descriptor must be properly quoted or separated
    
    This documentation is a simplified version of the full Shaka Packager documentation at:
    https://shaka-project.github.io/shaka-packager/html/index.html
    """
        return documentation
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 states the tool retrieves documentation but doesn't specify format (e.g., HTML, text), access requirements, rate limits, or error handling. This leaves gaps for a tool with no annotation coverage, though it correctly implies a read-only operation.

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 front-loads the core purpose ('Get comprehensive Shaka Packager documentation') and adds useful details without waste. Every word earns its place, making it appropriately sized for a simple tool.

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

Completeness4/5

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

Given the tool's simplicity (0 parameters, output schema provided), the description is mostly complete. It clearly states what the tool does, though it lacks behavioral details like output format or usage context. The presence of an output schema reduces the need to explain return values, but more guidance on when to use it would enhance 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 with 100% schema description coverage, so the schema fully documents the lack of inputs. The description adds no parameter information, which is acceptable here as there are no parameters to explain, aligning with the baseline for zero parameters.

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 with a specific verb ('Get') and resource ('Shaka Packager documentation'), including scope details like 'command structure and examples'. It distinguishes from sibling tools like 'get_shaka_options' by focusing on documentation rather than configuration options, though it doesn't explicitly contrast them.

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_options' or 'run_shaka_packager', nor does it mention any prerequisites or exclusions. Usage is implied only by the tool's name and purpose, lacking explicit context for 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/coderjun/shaka-packager-mcp-server'

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