Skip to main content
Glama

MCP Language Server

shared-struct.snap1.31 kB
--- /TEST_OUTPUT/workspace/another_consumer.go References in File: 2 At: L11:C8, L25:C3 6|func AnotherConsumer() { 7| // Use helper function 8| fmt.Println("Another message:", HelperFunction()) 9| 10| // Create another SharedStruct instance 11| s := &SharedStruct{ 12| ID: 2, 13| Name: "another test", 14| Value: 99.9, 15| Constants: []string{SharedConstant, "extra"}, 16| } ... 20| fmt.Println("Got name:", name) 21| } 22| 23| // Implement the interface with a custom type 24| type CustomImplementor struct { 25| SharedStruct 26| } 27| 28| custom := &CustomImplementor{ 29| SharedStruct: *s, 30| } --- /TEST_OUTPUT/workspace/consumer.go References in File: 1 At: L11:C8 6|func ConsumerFunction() { 7| message := HelperFunction() 8| fmt.Println(message) 9| 10| // Use shared struct 11| s := &SharedStruct{ 12| ID: 1, 13| Name: "test", 14| Value: 42.0, 15| Constants: []string{SharedConstant}, 16| } --- /TEST_OUTPUT/workspace/types.go References in File: 3 At: L14:C10, L31:C10, L37:C10 14|func (s *SharedStruct) Method() string { 15| return s.Name 16|} ... 31|func (s *SharedStruct) Process() error { 32| fmt.Printf("Processing %s with ID %d\n", s.Name, s.ID) 33| return nil 34|} ... 37|func (s *SharedStruct) GetName() string { 38| return s.Name 39|}

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