Skip to main content
Glama
lensesio

Lenses MCP Server

by lensesio

list_environments

Retrieve all available Lenses environments with their current status, metrics, and metadata for managing Kafka clusters.

Instructions

Lists all Lenses environments.

Returns: A list containing all environments with their details including status, metrics, and metadata.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The core handler function for the 'list_environments' tool. Decorated with @mcp.tool() for registration. Fetches and returns a list of all Lenses environments from the API endpoint /api/v1/environments.
    @mcp.tool()
    async def list_environments() -> List[Dict[str, Any]]:
        """
        Lists all Lenses environments.
        
        Returns:
            A list containing all environments with their details including status, metrics, and metadata.
        """
        result = await api_client._make_request("GET", "/api/v1/environments")
        return result.get("items", [])
  • Invocation of register_environments(mcp) which registers the 'list_environments' tool (and others) with the main FastMCP instance.
    register_environments(mcp)
Behavior3/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 discloses that the tool returns a list with details like status, metrics, and metadata, which adds useful behavioral context beyond a basic list operation. However, it lacks information on potential side effects, rate limits, or authentication needs, leaving gaps 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 and efficiently adds return details in the second. Every sentence earns its place without waste, making it appropriately sized and well-structured for clarity.

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 (0 parameters, no annotations, but with an output schema), the description is reasonably complete. It explains what the tool does and what it returns, and since an output schema exists, it need not detail return values further. However, it could improve by addressing usage context or behavioral traits more fully.

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 input schema has 0 parameters with 100% coverage, so the schema fully documents the absence of inputs. The description does not add parameter details, which is appropriate here. A baseline of 4 is applied for zero parameters, as no additional semantic value is needed beyond the schema's completeness.

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 verb ('Lists') and resource ('all Lenses environments'), making the purpose specific and understandable. However, it does not explicitly differentiate from sibling tools like 'get_environment' (which might fetch a single environment) or 'list_topics' (which lists a different resource), so it misses full sibling distinction.

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. For example, it does not mention if this should be used for a broad overview instead of 'get_environment' for specific details, or any prerequisites or exclusions, leaving usage context implied at best.

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