Skip to main content
Glama
lensesio

Lenses MCP Server

by lensesio

get_kafka_connector_target_definition

Retrieve the current configuration of a Kafka connector as YAML to inspect, verify, or document its settings.

Instructions

Fetches the current target definition for a Kafka connector.

Args: environment: The environment name. connect_cluster_name: The connect cluster name. connector_name: The connector name.

Returns: The connector definition as a YAML string.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
environmentYes
connect_cluster_nameYes
connector_nameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main handler function for the 'get_kafka_connector_target_definition' tool. It is decorated with @mcp.tool() for registration and implements the logic by constructing an API endpoint and making a GET request to retrieve the connector's target definition.
    @mcp.tool()
    async def get_kafka_connector_target_definition(
        environment: str, 
        connect_cluster_name: str, 
        connector_name: str
    ) -> str:
        """
        Fetches the current target definition for a Kafka connector.
        
        Args:
            environment: The environment name.
            connect_cluster_name: The connect cluster name.
            connector_name: The connector name.
        
        Returns:
            The connector definition as a YAML string.
        """
        endpoint = f"/api/v1/environments/{environment}/proxy/api/v1/resource/kafka/connect/{connect_cluster_name}/connector/{connector_name}"
        return await api_client._make_request("GET", endpoint)
  • Calls the register_kafka_connectors function on the MCP instance, which defines and registers the get_kafka_connector_target_definition tool along with other Kafka connector tools.
    register_kafka_connectors(mcp)
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 states the tool fetches data (implying read-only) and returns YAML, but doesn't mention error conditions (e.g., if the connector doesn't exist), authentication needs, rate limits, or whether the data is cached. This leaves gaps for a tool that likely interacts with a live system.

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 front-loaded with the core purpose in the first sentence, followed by a structured Args/Returns section. Every sentence earns its place by defining the action, parameters, and output without redundancy. It's efficiently sized for the tool's complexity.

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

Completeness3/5

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

Given the tool has an output schema (which covers return values) and no annotations, the description is moderately complete. It defines the purpose and parameters but lacks behavioral details like error handling or system interactions. For a read operation with three required parameters, this is adequate but leaves room for improvement in guiding usage.

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 lists all three parameters with brief explanations, adding meaning beyond the schema (which has 0% description coverage). It clarifies that 'environment' is a name, 'connect_cluster_name' identifies the cluster, and 'connector_name' specifies the connector. However, it doesn't explain format constraints or provide examples, preventing a perfect score.

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

Purpose5/5

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

The description clearly states the specific action ('Fetches') and resource ('current target definition for a Kafka connector'), distinguishing it from siblings like 'list_kafka_connectors' (which lists connectors) or 'validate_connector_configuration' (which validates configs). It precisely identifies what is being retrieved.

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. For example, it doesn't clarify if this should be used after creating a connector with 'create_kafka_connector' or in conjunction with 'list_kafka_connectors'. The description lacks context about prerequisites or typical workflows.

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