Skip to main content
Glama

get_media_entry

Retrieve complete metadata for a specific video or media file using its entry ID. Get full details including title, description, duration, tags, thumbnail, and status.

Instructions

Get complete metadata for a single video/media file. USE WHEN: You have a specific entry_id and need full details (title, description, duration, tags, thumbnail, status). RETURNS: Complete media metadata including URLs, dimensions, creation date. EXAMPLE: After search finds entry_id='1_abc123', use this to get full video details.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
entry_idYesThe media entry ID (format: '1_abc123' or '0_xyz789')

Implementation Reference

  • Main handler function that executes the tool: validates entry ID, retrieves the media entry via KalturaClient, handles errors, and returns formatted JSON with comprehensive metadata.
    async def get_media_entry(manager: KalturaClientManager, entry_id: str) -> str:
        """Get detailed information about a specific media entry."""
        if not validate_entry_id(entry_id):
            return json.dumps({"error": "Invalid entry ID format"}, indent=2)
    
        try:
            client = manager.get_client()
            entry: KalturaMediaEntry = client.media.get(entry_id)
        except Exception as e:
            return handle_kaltura_error(e, "get media entry", {"entry_id": entry_id})
    
        return json.dumps(
            {
                "id": entry.id,
                "name": entry.name,
                "description": entry.description,
                "mediaType": safe_serialize_kaltura_field(entry.mediaType),
                "createdAt": datetime.fromtimestamp(entry.createdAt).isoformat()
                if entry.createdAt
                else None,
                "updatedAt": datetime.fromtimestamp(entry.updatedAt).isoformat()
                if entry.updatedAt
                else None,
                "duration": entry.duration,
                "tags": entry.tags,
                "categories": entry.categories,
                "categoriesIds": entry.categoriesIds,
                "thumbnailUrl": entry.thumbnailUrl,
                "downloadUrl": entry.downloadUrl,
                "plays": entry.plays,
                "views": entry.views,
                "lastPlayedAt": datetime.fromtimestamp(entry.lastPlayedAt).isoformat()
                if entry.lastPlayedAt
                else None,
                "width": entry.width,
                "height": entry.height,
                "dataUrl": entry.dataUrl,
                "flavorParamsIds": entry.flavorParamsIds,
                "status": safe_serialize_kaltura_field(entry.status),
            },
            indent=2,
        )
  • Tool registration in MCP server's list_tools(): defines name, detailed usage description, input schema requiring 'entry_id', enabling the tool for LLM calls.
    types.Tool(
        name="get_media_entry",
        description="Get complete metadata for a single video/media file. USE WHEN: You have a specific entry_id and need full details (title, description, duration, tags, thumbnail, status). RETURNS: Complete media metadata including URLs, dimensions, creation date. EXAMPLE: After search finds entry_id='1_abc123', use this to get full video details.",
        inputSchema={
            "type": "object",
            "properties": {
                "entry_id": {
                    "type": "string",
                    "description": "The media entry ID (format: '1_abc123' or '0_xyz789')",
                },
            },
            "required": ["entry_id"],
        },
    ),
  • JSON schema defining tool input: object with required 'entry_id' string parameter.
    inputSchema={
        "type": "object",
        "properties": {
            "entry_id": {
                "type": "string",
                "description": "The media entry ID (format: '1_abc123' or '0_xyz789')",
            },
        },
        "required": ["entry_id"],
    },
  • Imports the get_media_entry handler from media.py module, making it available for import from tools package.
    from .media import (
        get_download_url,
        get_media_entry,
        get_thumbnail_url,
        list_media_entries,
    )
  • Adds get_media_entry to __all__ for easy import via from tools import get_media_entry.
    "get_media_entry",
Behavior4/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 effectively describes what the tool returns ('complete metadata including URLs, dimensions, creation date') and implies it's a read-only operation by using 'Get' and providing an example of usage after search. However, it doesn't mention potential errors (e.g., invalid entry_id), rate limits, or authentication needs, leaving some behavioral aspects uncovered.

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 efficiently structured with three distinct parts: purpose statement, usage guidelines, and an example. Each sentence adds value without redundancy, and it's front-loaded with the core purpose. The total length is appropriate for the tool's complexity, making it easy for an agent to parse quickly.

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 low complexity (1 parameter, no output schema, no annotations), the description is nearly complete. It covers purpose, usage, returns, and provides an example. The main gap is the lack of output schema, so the description doesn't specify the exact structure of returned metadata, but it lists key fields (title, description, etc.), which mitigates this. For a simple read tool, this is sufficient but not exhaustive.

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?

Schema description coverage is 100%, with the schema already documenting the entry_id parameter's type, format, and requirement. The description adds minimal value beyond this by mentioning entry_id in the 'USE WHEN' section and example, but doesn't provide additional semantic context (e.g., where to obtain entry_id from, or validation rules). This meets the baseline for high schema coverage.

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

Purpose5/5

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

The description clearly states the specific action ('Get complete metadata') and resource ('a single video/media file'), distinguishing it from siblings like search_entries (which finds IDs) or get_thumbnail_url (which retrieves only thumbnails). It explicitly mentions what details are included (title, description, duration, tags, thumbnail, status), making the purpose unambiguous.

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

Usage Guidelines5/5

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

The description includes an explicit 'USE WHEN' section that specifies when to use this tool ('You have a specific entry_id and need full details') and provides an example contrasting with search_entries. This clearly guides the agent on when to choose this tool over alternatives like search_entries (for finding IDs) or other get_* tools that return partial data.

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/zoharbabin/kaltura-mcp'

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