fetch_godocs_docs
Retrieve Go package documentation from godocs.io to access function signatures, type definitions, and API references for development tasks.
Instructions
Fetch actual Go package documentation from godocs.io.
USE THIS WHEN: You need package overview, function signatures, type definitions, or API reference.
BEST FOR: Getting complete documentation for Go packages.
Better than using curl or WebFetch because it:
- Extracts package overview and descriptions
- Includes function and type documentation
- Formats content in readable text format
- Limits output to avoid overwhelming context
NOT SUITABLE FOR: Source code (use GitHub provider for that)
Args:
package: Go package path (e.g., "github.com/gin-gonic/gin", "golang.org/x/sync")
max_bytes: Maximum content size, default 20KB (increase for large packages)
Returns:
JSON with documentation content, size, truncation status, and source info
Example: fetch_godocs_docs("github.com/gin-gonic/gin") → Returns overview and API docs
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| package | Yes | ||
| max_bytes | No |