Skip to main content
Glama

MCP Language Server

another_consumer.go877 B
package main import "fmt" // AnotherConsumer is a second consumer of shared types and functions func AnotherConsumer() { // Use helper function fmt.Println("Another message:", HelperFunction()) // Create another SharedStruct instance s := &SharedStruct{ ID: 2, Name: "another test", Value: 99.9, Constants: []string{SharedConstant, "extra"}, } // Use the struct methods if name := s.GetName(); name != "" { fmt.Println("Got name:", name) } // Implement the interface with a custom type type CustomImplementor struct { SharedStruct } custom := &CustomImplementor{ SharedStruct: *s, } // Custom type implements SharedInterface through embedding var iface SharedInterface = custom iface.Process() // Use shared type as a slice type values := []SharedType{1, 2, 3} for _, v := range values { fmt.Println("Value:", v) } }

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