Skip to main content
Glama
aywengo

MCP Kafka Schema Reg

bulk_operations_wizard

Streamline schema management with an interactive wizard for bulk operations, enabling updates, migrations, cleanup, and configuration changes across multiple schemas. Supports dry runs for validation.

Instructions

Start the interactive Bulk Operations Wizard for admin tasks.

Guides through safe execution of operations across multiple schemas. Supports schema updates, migrations, cleanup, and configuration changes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dry_runNo
operation_typeNo

Implementation Reference

  • Handler function for MCP bulk operations tools. For 'bulk_operations_wizard', extracts operation_type from arguments and calls wizard.start_wizard(). Handles multiple related tools.
    async def handle_bulk_operations_tool(
        wizard: BulkOperationsWizard, tool_name: str, arguments: Dict[str, Any]
    ) -> Dict[str, Any]:
        """Handle bulk operations tool calls"""
    
        if tool_name == "bulk_operations_wizard":
            # Start the main wizard
            operation_type = arguments.get("operation_type")
            if operation_type:
                operation_type = BulkOperationType(operation_type)
    
            return await wizard.start_wizard(operation_type)
    
        elif tool_name == "bulk_schema_update":
            # Direct schema update with parameters
            # In real implementation, would pass parameters to wizard
            return await wizard.start_wizard(BulkOperationType.SCHEMA_UPDATE)
    
        elif tool_name == "bulk_schema_cleanup":
            # Direct cleanup with parameters
            return await wizard.start_wizard(BulkOperationType.CLEANUP)
    
        elif tool_name == "bulk_schema_migration":
            # Direct migration with parameters
            return await wizard.start_wizard(BulkOperationType.MIGRATION)
    
        elif tool_name == "bulk_configuration_update":
            # Direct configuration update
            return await wizard.start_wizard(BulkOperationType.CONFIGURATION)
    
        elif tool_name == "get_bulk_operation_status":
            # Get task status
            task_id = arguments["task_id"]
            return await wizard.task_manager.get_task_status(task_id)
    
        elif tool_name == "cancel_bulk_operation":
            # Cancel operation
            task_id = arguments["task_id"]
            rollback = arguments.get("rollback", True)
    
            # In real implementation, would cancel the task
            return {"status": "cancelled", "task_id": task_id, "rollback": rollback}
    
        elif tool_name == "preview_bulk_operation":
            # Preview operation
            operation_type = BulkOperationType(arguments["operation_type"])
            items = arguments["items"]
            params = arguments.get("parameters", {})
    
            preview = await wizard._generate_preview(operation_type, items, params)
    
            return {
                "preview": {
                    "affected_items": preview.affected_items,
                    "total_count": preview.total_count,
                    "changes_summary": preview.changes_summary,
                    "estimated_duration": preview.estimated_duration,
                    "warnings": preview.warnings,
                    "consumer_impact": preview.consumer_impact,
                }
            }
    
        else:
            raise ValueError(f"Unknown tool: {tool_name}")
  • MCP Tool registration for 'bulk_operations_wizard' including name, description, and input schema.
    Tool(
        name="bulk_operations_wizard",
        description=(
            "Start the interactive Bulk Operations Wizard for admin tasks. "
            "Guides through safe execution of operations across multiple schemas. "
            "Supports schema updates, migrations, cleanup, and configuration changes."
        ),
        inputSchema={
            "type": "object",
            "properties": {
                "operation_type": {
                    "type": "string",
                    "enum": ["schema_update", "migration", "cleanup", "configuration"],
                    "description": "Pre-select operation type (optional)",
                },
                "dry_run": {
                    "type": "boolean",
                    "default": True,
                    "description": "Run in preview mode without making changes",
                },
            },
        },
    )
  • Input schema definition for the bulk_operations_wizard tool.
    inputSchema={
        "type": "object",
        "properties": {
            "operation_type": {
                "type": "string",
                "enum": ["schema_update", "migration", "cleanup", "configuration"],
                "description": "Pre-select operation type (optional)",
            },
            "dry_run": {
                "type": "boolean",
                "default": True,
                "description": "Run in preview mode without making changes",
            },
        },
  • Core implementation of the bulk operations wizard logic, called by the MCP tool handler. Dispatches to specific operation handlers based on type.
    async def start_wizard(self, operation_type: Optional[BulkOperationType] = None) -> Dict[str, Any]:
        """
        Start the bulk operations wizard
    
        Args:
            operation_type: Pre-selected operation type, or None to prompt user
    
        Returns:
            Operation result
        """
        # Select operation type if not provided
        if not operation_type:
            operation_type = await self._elicit_operation_type()
    
        # Get operation handler
        handler = self._operation_handlers.get(operation_type)
        if not handler:
            raise ValueError(f"Unknown operation type: {operation_type}")
    
        # Execute the operation workflow
        return await handler()  # type: ignore
  • Registers the handler methods for different BulkOperationType in the wizard class.
    def _register_handlers(self) -> Dict[BulkOperationType, Callable]:
        """Register operation handlers"""
        return {
            BulkOperationType.SCHEMA_UPDATE: self._handle_bulk_schema_update,
            BulkOperationType.MIGRATION: self._handle_bulk_migration,
            BulkOperationType.CLEANUP: self._handle_bulk_cleanup,
            BulkOperationType.CONFIGURATION: self._handle_bulk_configuration,
        }
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 mentions 'safe execution' and 'Guides through,' hinting at interactivity and safety, but lacks details on permissions required, potential side effects, rate limits, or error handling. For a tool with admin tasks and no annotations, this is insufficient.

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

Conciseness4/5

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

The description is appropriately sized with three sentences, front-loaded with the main purpose. Each sentence adds value: starting the wizard, guiding safe execution, and listing supported operations. There's minimal waste, though it could be slightly more structured.

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

Completeness2/5

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

Given the tool's complexity (admin tasks, interactive wizard), no annotations, no output schema, and 0% schema description coverage, the description is incomplete. It lacks details on behavioral traits, parameter meanings, and expected outcomes, making it inadequate for safe and effective use by an AI agent.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate for undocumented parameters. It doesn't mention any parameters like 'dry_run' or 'operation_type,' nor does it explain their purposes or usage. The description adds no semantic value beyond what the schema provides, failing to address the coverage gap.

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: 'Start the interactive Bulk Operations Wizard for admin tasks' specifies the verb (start), resource (wizard), and scope (admin tasks). It distinguishes from siblings by emphasizing interactivity and guidance, though it doesn't explicitly contrast with specific sibling tools like bulk_schema_update.

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

Usage Guidelines3/5

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

The description implies usage context through 'admin tasks' and 'safe execution of operations across multiple schemas,' suggesting it's for administrative bulk operations. However, it doesn't explicitly state when to use this tool versus alternatives like bulk_schema_update or bulk_schema_migration, nor does it provide exclusions or prerequisites.

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

Related 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/aywengo/kafka-schema-reg-mcp'

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