Skip to main content
Glama
aywengo

MCP Kafka Schema Reg

get_migration_status

Retrieve detailed migration status by specifying a migration ID, enabling users to monitor and manage Kafka Schema Registry migrations effectively.

Instructions

Get detailed status of a specific migration.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
migration_idYes

Implementation Reference

  • The core handler function for the 'get_migration_status' tool. It fetches the task status from task_manager, constructs a structured response with progress estimation, error handling for single/multi mode, adds HATEOAS links, and ensures structured output compliance.
    @structured_output("get_migration_status", fallback_on_error=True)
    def get_migration_status_tool(migration_id: str, registry_mode: str) -> Dict[str, Any]:
        """
        Get detailed status of a specific migration.
        Only available in multi-registry mode.
    
        Args:
            migration_id: The migration task ID to query
    
        Returns:
            Detailed migration status and progress information with structured validation and resource links
        """
        try:
            if registry_mode == "single":
                return create_error_response(
                    "Migration tracking not available in single-registry mode",
                    details={"suggestion": "Use multi-registry configuration to enable migration tracking"},
                    error_code="SINGLE_REGISTRY_MODE_LIMITATION",
                    registry_mode="single",
                )
    
            # Get the specific migration task
            task = task_manager.get_task(migration_id)
            if task is None:
                return create_error_response(
                    f"Migration '{migration_id}' not found",
                    error_code="MIGRATION_NOT_FOUND",
                    registry_mode=registry_mode,
                )
    
            migration_status = {
                "migration_id": task.id,
                "status": task.status.value,
                "progress": task.progress,
                "started_at": task.started_at,
                "completed_at": task.completed_at,
                "error": task.error,
                "result": task.result,
                "metadata": task.metadata or {},
                "registry_mode": registry_mode,
                "mcp_protocol_version": "2025-06-18",
            }
    
            # Add estimated time remaining if in progress
            if task.status == TaskStatus.RUNNING and task.progress > 0:
                elapsed = time.time() - (
                    datetime.fromisoformat(task.started_at).timestamp() if task.started_at else time.time()
                )
                if task.progress > 5:  # Only estimate if we have meaningful progress
                    estimated_total = elapsed / (task.progress / 100)
                    estimated_remaining = max(0, estimated_total - elapsed)
                    migration_status["estimated_remaining_seconds"] = round(estimated_remaining, 1)
    
            # Add resource links - extract registry names from metadata
            metadata = task.metadata or {}
            source_registry = metadata.get("source_registry", "unknown")
            target_registry = metadata.get("target_registry", "unknown")
    
            migration_status = add_links_to_response(
                migration_status,
                "migration",
                source_registry,
                migration_id=migration_id,
                source_registry=source_registry,
                target_registry=target_registry,
            )
    
            return migration_status
    
        except Exception as e:
            return create_error_response(str(e), error_code="MIGRATION_STATUS_FAILED", registry_mode=registry_mode)
  • Output schema definition for the get_migration_status tool, referencing the MIGRATE_SCHEMA_SCHEMA which provides JSON Schema validation for migration status responses.
    "get_migration_status": MIGRATE_SCHEMA_SCHEMA,
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions 'detailed status' but doesn't specify what that includes (e.g., progress, errors, timestamps), whether it's read-only or has side effects, or any authentication/rate limit requirements. For a status-checking tool, this leaves behavioral aspects unclear.

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 a single, clear sentence with no wasted words. It's front-loaded with the core action and resource, making it easy to parse quickly for an AI agent.

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 no annotations, no output schema, and low schema coverage, the description is incomplete. It doesn't explain what 'detailed status' entails, potential error conditions, or how this differs from other status tools, leaving gaps for proper tool invocation in a complex server environment.

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 0%, but there's only one parameter (migration_id). The description implies it's for a 'specific migration', aligning with the parameter, but doesn't add details like format, source, or validation rules. With minimal parameters, the baseline is appropriate but not enhanced.

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 verb 'Get' and the resource 'detailed status of a specific migration', making the purpose understandable. However, it doesn't differentiate from sibling tools like 'list_migrations' or 'get_workflow_status', which could provide similar migration-related information.

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. With siblings like 'list_migrations' and 'get_workflow_status' available, there's no indication whether this tool is for ongoing migrations, completed ones, or specific migration types, leaving the agent without context for selection.

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