Skip to main content
Glama

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

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)

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