Skip to main content
Glama

MCP Language Server

another_consumer.py1.64 kB
"""Another module that uses helpers and shared components.""" from helper import ( SHARED_CONSTANT, SharedClass, helper_function, Color, ) class AnotherImplementation: """A class that uses shared components but doesn't implement interfaces.""" def __init__(self): """Initialize the implementation.""" self.shared = SharedClass[str]("another", SHARED_CONSTANT) def do_something(self) -> str: """Do something with the shared components. Returns: The processed result """ # Get the value from shared class value = self.shared.get_value() # Process it using the helper function return helper_function(value) def another_consumer_function() -> None: """Another function that uses various shared components.""" # Use shared constants print(f"Using constant: {SHARED_CONSTANT}") # Use shared class with a different type parameter shared = SharedClass[float]("another example", 3.14) # Use methods from shared class name = shared.get_name() value = shared.get_value() print(f"Name: {name}, Value: {value}") # Use our own implementation impl = AnotherImplementation() result = impl.do_something() print(f"Implementation result: {result}") # Use helper function output = helper_function("another direct call") print(f"Helper output: {output}") # Use enum-like class with a different color color = Color.GREEN print(f"Selected color: {color}") if __name__ == "__main__": another_consumer_function()

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/isaacphi/mcp-language-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server