Skip to main content
Glama
lensesio

Lenses MCP Server

by lensesio

get_environment

Retrieve a specific Lenses environment by name to access its status, metrics, and metadata for Kafka cluster management.

Instructions

Retrieves a single Lenses environment by name.

Args: name: The name of the environment to retrieve.

Returns: A dictionary containing the environment's details including status, metrics, and metadata.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function for the 'get_environment' MCP tool. It fetches the environment details from the Lenses API using the provided name. The @mcp.tool() decorator registers it with the MCP server.
    @mcp.tool()
    async def get_environment(name: str) -> Dict[str, Any]:
        """
        Retrieves a single Lenses environment by name.
        
        Args:
            name: The name of the environment to retrieve.
        
        Returns:
            A dictionary containing the environment's details including status, metrics, and metadata.
        """
        if not name:
            raise ValueError("Environment name is required")
        
        return await api_client._make_request("GET", f"/api/v1/environments/{name}")
  • Invocation of register_environments(mcp) in the main server file, which defines and registers the 'get_environment' tool along with other environment tools.
    register_environments(mcp)
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 data (implying read-only), but does not disclose behavioral traits like error handling (e.g., if the environment name is invalid), authentication needs, rate limits, or whether it's idempotent. This is a significant gap for a tool with no annotation coverage.

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 structured 'Args' and 'Returns' sections. Every sentence adds value without redundancy, making it efficient and easy to parse.

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 low complexity (1 parameter) and the presence of an output schema (which handles return value details), the description is largely complete. It covers purpose, parameter semantics, and return content. However, it lacks behavioral context (e.g., error cases), which is a minor gap.

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 meaningful context for the single parameter 'name' by specifying it as 'the name of the environment to retrieve', which clarifies its purpose beyond the schema's minimal title 'Name'. With 0% schema description coverage, this compensates well, though it could detail format constraints (e.g., case sensitivity).

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 verb ('retrieves') and resource ('a single Lenses environment by name'), distinguishing it from sibling tools like 'list_environments' (which returns multiple) and 'check_environment_health' (which focuses on health status). The specificity of 'by name' adds further differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when you need details for a specific environment, contrasting with 'list_environments' for multiple environments. However, it does not explicitly state when NOT to use it or name alternatives, leaving some contextual gaps.

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