Skip to main content
Glama

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

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)

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

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