Skip to main content
Glama
lensesio

Lenses MCP Server

by lensesio

get_dataset_message_metrics

Analyze message volume trends for Kafka datasets to monitor data flow and identify patterns across specified time ranges.

Instructions

Get ranged metrics for a dataset's messages.

Args: environment: The environment name. entity_name: The dataset's entity name.

Returns: List of message metrics with date and message count.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
environmentYes
entity_nameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function for the 'get_dataset_message_metrics' tool, decorated with @mcp.tool() for registration. It retrieves message metrics for a specified Kafka dataset by making an API GET request to the appropriate endpoint.
    @mcp.tool()
    async def get_dataset_message_metrics(environment: str, entity_name: str) -> List[Dict[str, Any]]:
        """
        Get ranged metrics for a dataset's messages.
        
        Args:
            environment: The environment name.
            entity_name: The dataset's entity name.
        
        Returns:
            List of message metrics with date and message count.
        """
        endpoint = f"/api/v1/environments/{environment}/proxy/api/v1/datasets/kafka/{entity_name}/messages/metrics"
        return await api_client._make_request("GET", endpoint)
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 states the tool retrieves metrics (implying read-only), but doesn't disclose behavioral traits such as authentication needs, rate limits, error conditions, or whether it's safe for frequent use. The mention of 'ranged metrics' hints at date-based filtering, but this isn't elaborated.

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 appropriately sized and front-loaded: the first sentence states the purpose, followed by structured sections for Args and Returns. However, the Args section repeats parameter names without adding much value beyond what's implied, and the Returns section could be more concise.

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 (2 parameters, no annotations, but with an output schema), the description is moderately complete. It covers the purpose and parameters, and the output schema handles return values, but it lacks usage guidelines and detailed behavioral context, which are important for a tool in a server with many siblings.

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 schema provides no parameter details. The description adds minimal semantics: it names the parameters ('environment' and 'entity_name') and loosely describes them ('The environment name' and 'The dataset's entity name'), but doesn't explain formats, constraints, or examples. This partially compensates 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 tool's purpose: 'Get ranged metrics for a dataset's messages.' It specifies the verb ('Get') and resource ('dataset's messages'), and the 'ranged metrics' adds specificity. However, it doesn't explicitly differentiate from sibling tools like 'get_dataset' or 'list_datasets', which might retrieve different aspects of datasets.

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 no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'get_dataset' or 'list_datasets', nor does it specify prerequisites or exclusions. The agent must infer usage from the purpose alone.

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