Skip to main content
Glama
aywengo

MCP Kafka Schema Reg

bulk_schema_migration

Migrate schemas between contexts or registries with pattern-based selection, preserving schema IDs. Preview changes and enable rollback for controlled migration processes.

Instructions

Migrate schemas between contexts or registries.

Supports pattern-based selection and maintains schema IDs. Includes preview and rollback capabilities.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dry_runNo
preserve_idsNo
schema_patternNo
source_contextNo
source_registryNo
target_contextNo
target_registryNo

Implementation Reference

  • Input schema defining parameters for bulk schema migration tool, including source/target contexts/registries, pattern, and options.
    inputSchema={
        "type": "object",
        "properties": {
            "source_context": {"type": "string", "description": "Source context (default: current context)"},
            "target_context": {"type": "string", "description": "Target context for migration"},
            "source_registry": {
                "type": "string",
                "description": "Source registry (for cross-registry migration)",
            },
            "target_registry": {
                "type": "string",
                "description": "Target registry (for cross-registry migration)",
            },
            "schema_pattern": {"type": "string", "description": "Pattern to match schemas for migration"},
            "preserve_ids": {
                "type": "boolean",
                "default": True,
                "description": "Preserve schema IDs during migration",
            },
            "dry_run": {
                "type": "boolean",
                "default": True,
                "description": "Preview migration without executing",
            },
        },
  • Registers the 'bulk_schema_migration' MCP tool with name, description, and input schema.
    tools.append(
        Tool(
            name="bulk_schema_migration",
            description=(
                "Migrate schemas between contexts or registries. "
                "Supports pattern-based selection and maintains schema IDs. "
                "Includes preview and rollback capabilities."
            ),
            inputSchema={
                "type": "object",
                "properties": {
                    "source_context": {"type": "string", "description": "Source context (default: current context)"},
                    "target_context": {"type": "string", "description": "Target context for migration"},
                    "source_registry": {
                        "type": "string",
                        "description": "Source registry (for cross-registry migration)",
                    },
                    "target_registry": {
                        "type": "string",
                        "description": "Target registry (for cross-registry migration)",
                    },
                    "schema_pattern": {"type": "string", "description": "Pattern to match schemas for migration"},
                    "preserve_ids": {
                        "type": "boolean",
                        "default": True,
                        "description": "Preserve schema IDs during migration",
                    },
                    "dry_run": {
                        "type": "boolean",
                        "default": True,
                        "description": "Preview migration without executing",
                    },
                },
            },
        )
    )
  • MCP tool handler dispatcher that invokes the BulkOperationsWizard for MIGRATION operation.
    elif tool_name == "bulk_schema_migration":
        # Direct migration with parameters
        return await wizard.start_wizard(BulkOperationType.MIGRATION)
  • Core implementation of bulk schema migration: elicits source/target, schemas, options; generates preview; confirms and executes via generic bulk operation executor.
    async def _handle_bulk_migration(self) -> Dict[str, Any]:
        """Handle bulk migration operations"""
        # Step 1: Select source and target
        source_target = await self._elicit_migration_source_target()  # type: ignore
    
        # Step 2: Select schemas to migrate
        schemas = await self._elicit_schema_selection(
            "Select schemas to migrate", context=source_target["source_context"]
        )
    
        # Step 3: Migration options
        migration_options = await self._elicit_migration_options()  # type: ignore
    
        # Step 4: Preview migration
        preview = await self._generate_preview(
            BulkOperationType.MIGRATION, schemas, {**source_target, **migration_options}
        )
    
        # Step 5: Confirm operation
        if not await self._confirm_operation(preview):
            return {"status": "cancelled", "reason": "User cancelled operation"}
    
        # Step 6: Execute migration
        return await self._execute_bulk_operation(
            BulkOperationType.MIGRATION, schemas, {**source_target, **migration_options}, preview
        )
  • Enum defining operation types, including MIGRATION used by the bulk_schema_migration tool.
    class BulkOperationType(Enum):
        """Supported bulk operation types"""
    
        SCHEMA_UPDATE = "schema_update"
        MIGRATION = "migration"
        CLEANUP = "cleanup"
        CONFIGURATION = "configuration"
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions 'preview and rollback capabilities', which hints at safety features, but doesn't clarify whether this is a destructive operation, what permissions are required, how errors are handled, or what the migration process entails. The description is too vague about actual behavior beyond basic functionality.

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 concise with three short sentences that each add value. It's front-loaded with the core purpose, followed by key features. There's no wasted verbiage, though it could benefit from slightly more structure to separate functionality from capabilities.

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?

For a complex 7-parameter migration tool with no annotations and no output schema, the description is insufficient. It doesn't explain what 'migrate' actually means operationally, what happens to existing schemas, how conflicts are resolved, what the output looks like, or how preview/rollback work. The description leaves too many critical questions unanswered.

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?

With 0% schema description coverage for 7 parameters, the description must compensate but fails to do so. It mentions 'pattern-based selection' (hinting at 'schema_pattern') and 'maintains schema IDs' (hinting at 'preserve_ids'), but doesn't explain the purpose of source/target contexts/registries or the dry_run parameter. Most parameters remain semantically undocumented.

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 as migrating schemas between contexts or registries with pattern-based selection and ID preservation. It uses specific verbs ('migrate', 'maintains', 'includes') and identifies the resource ('schemas'), but does not explicitly differentiate from sibling tools like 'migrate_schema', 'bulk_schema_update', or 'bulk_schema_cleanup'.

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. It mentions capabilities like preview and rollback, but doesn't specify scenarios where bulk migration is preferred over single-schema migration ('migrate_schema') or other bulk operations. No prerequisites, exclusions, or comparison to siblings are provided.

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