cmd_flags
(optional): Additional go doc flags (allowed: -all, -src, -u, -short, -c)
How to use it
cmd_flags is exposed by the Godoc MCP MCP server. Add the server to your MCP client (Claude Desktop, Cursor, Windsurf and others), and the cmd_flags tool becomes available to the model automatically. See the full listing for setup details and every tool this server provides.
Install Godoc MCP
docker run --rm -p 8080:8080 ghcr.io/mrjoshuak/godoc-mcp:latest --transport sse --addr :8080Other tools in Godoc MCP (7)
Get documentation for a Go package, type, function, or method.
List all sub-packages under a Go package path. Use this to discover the correct import paths for sub-packages instead of guessing.
(optional): Page number for paginated results (default: 1)
(optional): Lines per page, 100-5000 (default: 1000)
(required): Package import path (e.g., io, github.com/user/repo) or local file path
(optional): Specific symbol to document (function, type, etc.)
(optional): Working directory for module context (required for relative paths)