Skip to main content
Glama
lensesio

Lenses MCP Server

by lensesio

list_kafka_connectors

Retrieve and filter Kafka connectors by environment, cluster, or class name to monitor and manage data integration pipelines.

Instructions

Retrieves a list of all Kafka connectors.

Args: environment: The environment name. cluster: Optional list of cluster names to filter by. class_name: Optional list of connector class names to filter by.

Returns: A dictionary containing a list of all connectors with their details.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
environmentYes
clusterNo
class_nameNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The async handler function for the list_kafka_connectors MCP tool. It accepts environment and optional filters for cluster and class_name, builds a query string for the API endpoint, and performs a GET request via api_client to retrieve the list of Kafka connectors.
    @mcp.tool()
    async def list_kafka_connectors(
        environment: str,
        cluster: Optional[List[str]] = None,
        class_name: Optional[List[str]] = None
    ) -> Dict[str, Any]:
        """
        Retrieves a list of all Kafka connectors.
        
        Args:
            environment: The environment name.
            cluster: Optional list of cluster names to filter by.
            class_name: Optional list of connector class names to filter by.
        
        Returns:
            A dictionary containing a list of all connectors with their details.
        """
        params = {}
        if cluster:
            params["cluster"] = cluster
        if class_name:
            params["className"] = class_name
        
        # Build query string
        query_params = []
        for key, value in params.items():
            if isinstance(value, list):
                for item in value:
                    query_params.append(f"{key}={item}")
            else:
                query_params.append(f"{key}={value}")
        
        query_string = "&".join(query_params) if query_params else ""
        endpoint = f"/api/v1/environments/{environment}/proxy/api/kafka-connect/connectors"
        if query_string:
            endpoint += f"?{query_string}"
        
        return await api_client._make_request("GET", endpoint)
  • Invocation of register_kafka_connectors(mcp) in the main MCP server setup, which defines and registers the list_kafka_connectors tool using @mcp.tool() decorator.
    register_kafka_connectors(mcp)
  • Import of the register_kafka_connectors function used to register the Kafka connectors tools, including list_kafka_connectors.
    from tools.kafka_connectors import register_kafka_connectors
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It mentions the tool retrieves a list and returns a dictionary with details, but lacks critical behavioral information: whether it's read-only (implied but not stated), pagination behavior, error handling, rate limits, or authentication requirements. For a tool with no annotations, this leaves significant gaps in understanding its operation.

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 well-structured and front-loaded with the core purpose in the first sentence. The 'Args' and 'Returns' sections are clearly labeled, making it easy to parse. Every sentence adds value without redundancy, and the length is appropriate for a tool with three parameters.

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?

Given the tool's moderate complexity (3 parameters, 1 required), no annotations, and the presence of an output schema, the description is reasonably complete. It covers the purpose, parameters, and return value, and the output schema handles return details. However, it lacks behavioral context (e.g., safety, performance) which would be beneficial since annotations are absent.

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

Parameters4/5

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

The description adds substantial value beyond the input schema, which has 0% description coverage. It explains that 'environment' is required and names the environment, 'cluster' filters by cluster names, and 'class_name' filters by connector class names. This clarifies the purpose of each parameter, compensating well for the schema's lack of descriptions. However, it doesn't detail format (e.g., string patterns) or examples.

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 ('Retrieves') and resource ('list of all Kafka connectors'), making the purpose understandable. It distinguishes from siblings like 'get_kafka_connector_target_definition' or 'list_topics' by focusing on connectors specifically. However, it doesn't explicitly differentiate from 'list_sql_processors' or 'list_consumer_groups' beyond the resource name.

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?

No guidance is provided on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an environment), compare to other list tools (e.g., 'list_topics' for topics), or specify use cases like monitoring or filtering. The description only states what it does, not when to invoke it.

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/lensesio/lenses-mcp'

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