Skip to main content
Glama

list_categories

Browse and explore content organization hierarchy to find category IDs for filtering and understand content taxonomy in Kaltura's media management system.

Instructions

Browse content organization hierarchy. USE WHEN: Exploring content structure, finding category IDs for filtering, understanding content taxonomy. Categories organize videos into folders/topics. RETURNS: Tree structure with category names, IDs, parent-child relationships. EXAMPLE: Find all videos in 'Training' category by first getting category ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
search_textNoOptional text to filter categories (e.g., 'training', 'marketing')
limitNoMaximum number of categories to return (default: 20)

Implementation Reference

  • The core handler function that executes the list_categories tool: filters categories by optional search text, paginates results, extracts key metadata, and returns formatted JSON response.
    async def list_categories(
        manager: KalturaClientManager,
        search_text: Optional[str] = None,
        limit: int = 20,
    ) -> str:
        """List available categories."""
        client = manager.get_client()
    
        # Create filter
        filter = KalturaCategoryFilter()
        if search_text:
            filter.freeText = search_text
    
        # Create pager
        pager = KalturaFilterPager()
        pager.pageSize = limit
    
        # List categories
        result = client.category.list(filter, pager)
    
        categories = []
        for category in result.objects:
            categories.append(
                {
                    "id": category.id,
                    "name": category.name,
                    "description": category.description,
                    "tags": category.tags,
                    "fullName": category.fullName,
                    "depth": category.depth,
                    "entriesCount": category.entriesCount,
                    "createdAt": datetime.fromtimestamp(category.createdAt).isoformat()
                    if category.createdAt
                    else None,
                }
            )
    
        return json.dumps(
            {
                "totalCount": result.totalCount,
                "categories": categories,
            },
            indent=2,
        )
  • MCP tool schema definition including input validation for search_text and limit parameters, with detailed usage description.
    types.Tool(
        name="list_categories",
        description="Browse content organization hierarchy. USE WHEN: Exploring content structure, finding category IDs for filtering, understanding content taxonomy. Categories organize videos into folders/topics. RETURNS: Tree structure with category names, IDs, parent-child relationships. EXAMPLE: Find all videos in 'Training' category by first getting category ID.",
        inputSchema={
            "type": "object",
            "properties": {
                "search_text": {
                    "type": "string",
                    "description": "Optional text to filter categories (e.g., 'training', 'marketing')",
                },
                "limit": {
                    "type": "integer",
                    "description": "Maximum number of categories to return (default: 20)",
                },
            },
        },
    ),
  • Tool dispatch registration in the MCP server's call_tool handler, invoking the list_categories function with Kaltura manager and arguments.
    elif name == "list_categories":
        result = await list_categories(kaltura_manager, **arguments)
  • Package-level import registration exposing list_categories from the search module to the tools namespace.
        esearch_entries,
        list_categories,
        search_entries,
        search_entries_intelligent,
    )
Behavior4/5

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

With no annotations provided, the description carries full burden and does well by disclosing key behaviors: returns a tree structure with names, IDs, and parent-child relationships, and provides a practical example of how to use the output. It doesn't mention rate limits or authentication needs, but covers the core operational behavior adequately.

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?

Well-structured with clear sections (purpose, usage guidelines, returns, example), front-loaded with core purpose, and every sentence adds value without redundancy. The example is practical and illustrative without being verbose.

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?

For a read-only tool with no annotations and no output schema, the description provides good context: clear purpose, usage guidelines, return format description, and an example. It could mention pagination or default behavior more explicitly, but covers most essential aspects given the tool's complexity.

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%, so the schema already fully documents both parameters. The description adds no additional parameter semantics beyond what's in the schema, maintaining the baseline score of 3 for adequate but not enhanced parameter documentation.

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 tool's purpose with specific verbs ('browse content organization hierarchy') and resource ('categories'), distinguishing it from siblings like search_entries or list_attachment_assets by focusing on hierarchical taxonomy rather than media content or analytics.

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?

Explicit 'USE WHEN' section provides clear scenarios: exploring content structure, finding category IDs for filtering, and understanding taxonomy. It distinguishes this tool from search_entries by emphasizing hierarchy browsing rather than direct content search.

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