Skip to content
📄 main.go Ln 12, Col 12
11
12
13
func main() {
  r := gin.Default() -> what's the definition?
  r.Run()
⚡ MCP PROTOCOL TRACE
>> OUT (Request)
call_tool: go_definition
args: { "line": 12, "column": 12 }
<< IN (Response)
result: {
  "summary": "func Default() *Engine",
  "location": { "file": ".../gin.go", "line": 142 }
}

Stop LLMs guessing Go types.

gopls-mcp replaces expensive text search with compiler-backed precision, saving tokens, cutting latency, and preserving your agent’s critical attention span.

gopls-mcp offers fast and semantic accurate codebase analysis, perserves LLM attention and save your tokens.

go_build_check
main.go
Ln 4
4 x := 42 // unused
MCP PROTOCOL TRACE
>> OUT (Request)
call_tool: go_build_check
<< IN (Response)
diagnostics: [
{ file: "main.go:4", "message: "declared and not used: x" }
]
go_symbol_references
user.go
Ln 18
18 func (u *User) Save() error
MCP PROTOCOL TRACE
>> OUT (Request)
call_tool: go_symbol_references
locator: { symbol_name: "Save", context_file: "user.go" }
<< IN (Response)
references: [
"login.go:42", "handler.go:15", "service.go:78"
]
go_definition
main.go
Ln 12
12 sum := Add(1, 2)
MCP PROTOCOL TRACE
>> OUT (Request)
call_tool: go_definition
locator: { symbol_name: "Add", context_file: "main.go" }
<< IN (Response)
{ signature: "func Add(a, b int) int", file: "math.go:15" }
go_get_call_hierarchy
main.go
Ln 5
5 func main() {
MCP PROTOCOL TRACE
>> OUT (Request)
call_tool: go_get_call_hierarchy
locator: { symbol_name: "main" }, direction: "outgoing"
<< IN (Response)
outgoing_calls: [
"helperA() @ main.go:10",
"helperB() @ main.go:14"
]