An MCP server that provides access to Go package documentation from pkg.go.dev, enabling search and detailed package information retrieval
This MCP server provides two Go documentation tools with basic structure but significant quality gaps. While tool names follow verb_noun conventions (getPackageInfo, searchPackages), descriptions are adequate but lack LLM-optimization guidance. The critical issue is that input schemas are not explicitly visible in the provided source, tool registration in server.go shows only Name and Description fields, with no visible InputSchema or schema parameter binding. Although the handler functions in pkgInfoTool.go and searchTool.go define struct types (GetPkgInfoParams, searchParams) with jsonschema tags, these are not explicitly wired to the tool registration via mcp.AddTool(). Without explicit schema registration visible in the MCP tool definition, schema credibility is severely compromised. Output schemas are also undocumented in the MCP layer.
provide a golang package name,get package consts,types,functions,variables,subpackages and how to use it. If return is null then means cannot find the package by the given name
provide a query, search related golang packages from pkg.go.dev include name, path, synopsis, go doc url, imported by how many packages, subpackages in this package the path is the package full name. if want to use getPackageInfo. llm should pass the path as packageName to getPackageInfo. If return is null then means cannot find the package by the given name.If user provide name like github.com/yikakia/cachalot looks like a repo then should use getPackageInfo to get the info of package directly.
Input schemas not explicitly visible in tool registration. mcp.AddTool() calls in server.go show only Name and Description; no InputSchema field is populated. Handler functions define struct types with jsonschema tags, but these are not wired to the MCP Tool definition layer.
Output schemas undocumented. Tool handlers return godoc.PackageDocument and godoc.SearchResult types, but the MCP layer does not declare these schemas in tool registration. Consumers cannot validate or plan downstream operations based on output structure.
Parameter descriptions incomplete and lack actionable constraints. getPackageInfo.needURL description says 'if user need the link to the definition' (missing punctuation, vague). searchPackages.q has minimal guidance; no format, length, or query syntax constraints documented.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 43 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 32 | - | v1 |
Tool descriptions lack WHEN guidance. getPackageInfo describes WHAT it does but not WHEN to use it vs searchPackages, or dependency hints (e.g., 'Call searchPackages first if you only have a partial package name'). This forces LLMs to guess tool selection.
Error handling non-actionable. Both tools catch errors and wrap them (e.g., 'get pkg info failed', 'search failed') but return no guidance to the LLM on what to try next. Descriptions mention 'If return is null then means cannot find the package' but no tool instructs what the LLM should do when this happens.
No pagination or result limiting. searchPackages likely returns an unbounded list from pkg.go.dev. For a popular Go ecosystem query, this could blow context windows. No limit parameter, no cursor, no documented result cap.
Naming could be more specific. 'getPackageInfo' is clear, but 'searchPackages' is generic, a more specific name like 'search_golang_packages' or 'list_packages_from_registry' distinguishes it from general search tools.