Skip to main content
Glama
aywengo

MCP Kafka Schema Reg

check_compatibility_interactive

Verify schema compatibility interactively by identifying issues and offering resolution choices tailored to Kafka Schema Registry configurations.

Instructions

Interactive compatibility checking with elicitation for resolution options.

When compatibility issues are found, this tool will elicit resolution preferences from the user.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contextNo
registryNo
schema_definitionYes
schema_typeNoAVRO
subjectYes

Implementation Reference

  • The core handler function implementing the check_compatibility_interactive MCP tool. It first runs a standard compatibility check using the injected check_compatibility_tool. If issues are detected, it creates an elicitation request using create_compatibility_resolution_elicitation to gather user preferences for resolution, waits for response with fallback, and augments the result with resolution guidance. Handles errors gracefully.
    async def check_compatibility_interactive(
        subject: str,
        schema_definition: Dict,
        schema_type: str = "AVRO",
        context: Optional[str] = None,
        registry: Optional[str] = None,
        # Core tool dependencies injected
        check_compatibility_tool=None,
        registry_manager=None,
        registry_mode=None,
        auth=None,
        headers=None,
        schema_registry_url=None,
    ) -> Dict[str, Any]:
        """
        Interactive compatibility checking with elicitation for resolution options.
    
        When compatibility issues are found, this tool will elicit resolution
        preferences from the user.
        """
        try:
            # First, perform the standard compatibility check
            compatibility_result = check_compatibility_tool(
                subject=subject,
                schema_definition=schema_definition,
                registry_manager=registry_manager,
                registry_mode=registry_mode,
                schema_type=schema_type,
                context=context,
                registry=registry,
                auth=auth,
                headers=headers,
                schema_registry_url=schema_registry_url,
            )
    
            # Check if there are compatibility issues
            if isinstance(compatibility_result, dict):
                is_compatible = compatibility_result.get("compatible", False)
                compatibility_errors = compatibility_result.get("messages", [])
    
                if not is_compatible and compatibility_errors:
                    logger.info(f"Compatibility issues found for subject '{subject}': {compatibility_errors}")
    
                    # Create elicitation request for resolution strategy
                    elicitation_request = create_compatibility_resolution_elicitation(
                        subject=subject, compatibility_errors=compatibility_errors
                    )
    
                    # Store the request for processing
                    await elicitation_manager.create_request(elicitation_request)
    
                    # Attempt elicitation with fallback
                    response = await elicit_with_fallback(elicitation_request)
    
                    if response and response.complete:
                        # Add resolution guidance to the result
                        compatibility_result["resolution_guidance"] = {
                            "strategy": response.values.get("resolution_strategy"),
                            "compatibility_level": response.values.get("compatibility_level"),
                            "notes": response.values.get("notes"),
                            "elicitation_used": True,
                        }
    
                        logger.info(
                            f"Added compatibility resolution guidance: {response.values.get('resolution_strategy')}"
                        )
                    else:
                        # Add default guidance
                        compatibility_result["resolution_guidance"] = {
                            "strategy": "modify_schema",
                            "compatibility_level": "BACKWARD",
                            "notes": "Default resolution strategy (elicitation failed)",
                            "elicitation_used": False,
                        }
                else:
                    # No issues, add successful indicator
                    compatibility_result["resolution_guidance"] = {
                        "strategy": "none_needed",
                        "notes": "Schema is compatible, no resolution required",
                        "elicitation_used": False,
                    }
    
            return compatibility_result
    
        except Exception as e:
            logger.error(f"Error in interactive compatibility check: {str(e)}")
            return create_error_response(
                f"Interactive compatibility check failed: {str(e)}",
                error_code="INTERACTIVE_COMPATIBILITY_ERROR",
            )
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 that the tool 'will elicit resolution preferences from the user,' which suggests interactive behavior and potential user prompts, but lacks details on permissions required, side effects (e.g., does it modify data?), error handling, or response format. For a tool with 5 parameters 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 brief and front-loaded with the core purpose in the first sentence. Both sentences are relevant, with no wasted words. However, the second sentence could be integrated more smoothly, and overall it's efficient but slightly fragmented.

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 complexity (5 parameters, nested objects, no output schema, and 0% schema coverage), the description is inadequate. It lacks details on what compatibility means, how elicitation works, what the tool returns, or how parameters interact. For an interactive tool with significant input requirements, this leaves too many gaps for effective use.

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 schema provides no parameter documentation. The description adds no information about any parameters (subject, schema_definition, etc.), failing to compensate for the coverage gap. Parameters like 'registry' and 'schema_type' are entirely unexplained, leaving their purpose and usage unclear.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool performs 'Interactive compatibility checking with elicitation for resolution options,' which indicates a checking function with user interaction. However, it's vague about what exactly is being checked (schema compatibility? system compatibility?) and doesn't specify the resource or domain. It distinguishes from sibling 'check_compatibility' by mentioning interactivity, but the purpose remains somewhat ambiguous.

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 minimal guidance: it mentions the tool is used 'When compatibility issues are found,' implying a reactive use case, but doesn't specify when to choose this over the non-interactive 'check_compatibility' sibling or other alternatives. No explicit when-not scenarios or prerequisites are provided, leaving usage context unclear.

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