Skip to main content
Glama
lensesio

Lenses MCP Server

by lensesio

restart_kafka_connector_task

Restart a specific Kafka connector task to resolve failures or performance issues within a defined environment and cluster.

Instructions

Restarts a specific task of a Kafka connector.

Args: environment: The environment name. cluster: The cluster name. connector: The connector name. task_id: The task ID to restart.

Returns: The result of the task restart operation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
environmentYes
clusterYes
connectorYes
task_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'restart_kafka_connector_task' tool. It constructs an API endpoint to restart a specific task of a Kafka connector and makes a PUT request via api_client. The function is decorated with @mcp.tool(), which handles registration.
    async def restart_kafka_connector_task(
        environment: str,
        cluster: str,
        connector: str,
        task_id: int
    ) -> Dict[str, Any]:
        """
        Restarts a specific task of a Kafka connector.
        
        Args:
            environment: The environment name.
            cluster: The cluster name.
            connector: The connector name.
            task_id: The task ID to restart.
        
        Returns:
            The result of the task restart operation.
        """
        endpoint = f"/api/v1/environments/{environment}/proxy/api/kafka-connect/clusters/{cluster}/connectors/{connector}/tasks/{task_id}/restart"
        return await api_client._make_request("PUT", endpoint)
Behavior2/5

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

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It states the tool performs a restart operation but doesn't disclose critical details like whether this requires admin permissions, if it's destructive to data, potential side effects (e.g., temporary downtime), or rate limits. The description is functional but lacks operational context.

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 efficiently front-loaded: the first sentence clearly states the purpose, followed by organized Args and Returns sections. Every sentence earns its place with no redundant information, making it easy to parse quickly.

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's complexity (a mutation operation with 4 parameters) and lack of annotations, the description is minimally adequate but incomplete. It covers the basic purpose and parameters, and the presence of an output schema means return values don't need explanation. However, for a mutation tool, it should ideally include more behavioral context (e.g., safety warnings, error conditions) to be fully complete.

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%, so the description must compensate but only partially does. It lists all 4 parameters in the Args section, providing basic semantic meaning (e.g., 'environment: The environment name'), but doesn't elaborate on format constraints, valid values, or relationships between parameters (e.g., task_id must belong to the specified connector). This adds some value over the bare schema but leaves gaps.

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 action ('restarts') and target ('a specific task of a Kafka connector'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'set_action_on_kafka_connector' which might also affect connector tasks, leaving room for ambiguity.

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. The description doesn't mention prerequisites (e.g., the connector must exist, the task must be in a failed state), nor does it compare to similar tools like 'set_action_on_kafka_connector' that might handle broader connector actions.

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