Documentation Lookup
lookup_docs
Returns cached Go package documentation or arbitrary URL content. Package docs are version-pinned from go.mod and never expire. URL content is cached for 24 hours.
Use this to verify API signatures before writing code. Provide exactly one of package, url, or entity.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
package | string | Conditional | Go import path (e.g. github.com/mark3labs/mcp-go). Returns docs at the version pinned in go.mod. |
url | string | Conditional | Arbitrary URL to fetch and cache (24h TTL). |
entity | string | Conditional | Code entity name (function, struct, file). Returns docs for all external packages imported by that entity. |
Exactly one of package, url, or entity must be provided.
Example: Package Lookup
{ "tool": "lookup_docs", "arguments": { "package": "github.com/mark3labs/mcp-go" }}Example: URL Fetch
{ "tool": "lookup_docs", "arguments": { "url": "https://pkg.go.dev/encoding/json" }}Example: Entity Dependencies
{ "tool": "lookup_docs", "arguments": { "entity": "handleSessionInit" }}