Skip to main content
Glama

list_attachment_assets

Retrieve a list of files attached to a specific video, including PDFs, slides, and documents, by providing the video's entry ID. This tool helps locate supplementary materials associated with media content.

Instructions

Find FILES ATTACHED to videos. USE WHEN: Looking for supplementary materials, PDFs, slides, documents linked to video. RETURNS: List of attached files with names, types, sizes, IDs. EXAMPLES: 'What documents are attached to training video?', 'Find PDF slides for presentation'. Attachments are additional files uploaded with videos.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
entry_idYesVideo to check for attachments (format: '1_abc123')

Implementation Reference

  • The handler function that executes the tool logic: lists attachment assets for a media entry using Kaltura API, handles validation, plugin availability, and returns JSON.
    async def list_attachment_assets( manager: KalturaClientManager, entry_id: str, ) -> str: """List all attachment assets for a media entry.""" if not validate_entry_id(entry_id): return json.dumps({"error": "Invalid entry ID format"}, indent=2) if not ATTACHMENT_AVAILABLE: return json.dumps( { "error": "Attachment functionality is not available. The Attachment plugin is not installed.", "entryId": entry_id, }, indent=2, ) client = manager.get_client() try: # Create filter for attachment assets filter = KalturaAttachmentAssetFilter() filter.entryIdEqual = entry_id # List attachment assets result = client.attachment.attachmentAsset.list(filter) attachments = [] for attachment in result.objects: attachment_data = { "id": attachment.id, "entryId": attachment.entryId, "filename": attachment.filename, "title": attachment.title, "format": attachment.format.value if hasattr(attachment.format, "value") else str(attachment.format), "status": attachment.status.value if hasattr(attachment.status, "value") else str(attachment.status), "fileExt": attachment.fileExt, "size": attachment.size, "createdAt": datetime.fromtimestamp(attachment.createdAt).isoformat() if attachment.createdAt else None, "updatedAt": datetime.fromtimestamp(attachment.updatedAt).isoformat() if attachment.updatedAt else None, "description": attachment.description, "tags": attachment.tags, } attachments.append(attachment_data) return json.dumps( { "entryId": entry_id, "totalCount": result.totalCount, "attachmentAssets": attachments, }, indent=2, ) except Exception as e: return json.dumps( { "error": f"Failed to list attachment assets: {str(e)}", "entryId": entry_id, }, indent=2, )
  • Defines the tool schema including input parameters (entry_id) and description for MCP tool registration.
    name="list_attachment_assets", description="Find FILES ATTACHED to videos. USE WHEN: Looking for supplementary materials, PDFs, slides, documents linked to video. RETURNS: List of attached files with names, types, sizes, IDs. EXAMPLES: 'What documents are attached to training video?', 'Find PDF slides for presentation'. Attachments are additional files uploaded with videos.", inputSchema={ "type": "object", "properties": { "entry_id": { "type": "string", "description": "Video to check for attachments (format: '1_abc123')", }, }, "required": ["entry_id"], },
  • Registers and dispatches the tool call in the main MCP server's call_tool handler.
    elif name == "list_attachment_assets": result = await list_attachment_assets(kaltura_manager, **arguments)
  • Registers and dispatches the tool call in the remote MCP server's tool execution.
    elif tool_name == "list_attachment_assets": result = await list_attachment_assets(kaltura_manager, **arguments)
  • Exports the list_attachment_assets function from assets.py for use in server modules.
    from .assets import ( get_attachment_content, get_caption_content, list_attachment_assets, list_caption_assets,

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