Documentation
¶
Overview ¶
Package server wires the pkgsite client to an MCP server, exposing each pkg.go.dev API endpoint as a tool.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GetImportedByInput ¶
type GetImportedByInput struct {
Path string `json:"path" jsonschema:"import path of the package to find importers of, e.g. github.com/google/uuid"`
Version string `json:"version,omitempty" jsonschema:"module version, e.g. v1.6.0; omit for the latest"`
Module string `` /* 139-byte string literal not displayed */
Limit int `json:"limit,omitempty" jsonschema:"maximum importers to return; omit for a server-side default"`
Token string `json:"token,omitempty" jsonschema:"pagination token: pass nextPageToken from a previous response to fetch the next page"`
}
GetImportedByInput is the input for the get_imported_by tool.
type GetModuleInput ¶
type GetModuleInput struct {
Path string `json:"path" jsonschema:"module path, e.g. github.com/google/uuid (the module, not a package within it)"`
Version string `json:"version,omitempty" jsonschema:"module version, e.g. v1.6.0; omit for the latest"`
Readme bool `json:"readme,omitempty" jsonschema:"include the module's README contents"`
Licenses bool `json:"licenses,omitempty" jsonschema:"include full license info (types and text)"`
}
GetModuleInput is the input for the get_module tool.
type GetPackageInput ¶
type GetPackageInput struct {
Path string `json:"path" jsonschema:"import path of the package, e.g. github.com/google/uuid (or a standard-library path like net/http)"`
Version string `json:"version,omitempty" jsonschema:"module version, e.g. v1.6.0; omit for the latest"`
Module string `` /* 139-byte string literal not displayed */
Doc string `` /* 129-byte string literal not displayed */
Examples bool `json:"examples,omitempty" jsonschema:"include runnable examples in the documentation (requires doc)"`
Imports bool `json:"imports,omitempty" jsonschema:"include the list of packages this package imports"`
Licenses bool `json:"licenses,omitempty" jsonschema:"include full license info (types and text)"`
GOOS string `json:"goos,omitempty" jsonschema:"target GOOS for build-constrained docs, e.g. linux"`
GOARCH string `json:"goarch,omitempty" jsonschema:"target GOARCH for build-constrained docs, e.g. amd64"`
}
GetPackageInput is the input for the get_package tool.
type GetSymbolsInput ¶
type GetSymbolsInput struct {
Path string `json:"path" jsonschema:"import path of the package, e.g. github.com/google/uuid (or a standard-library path like net/http)"`
Version string `json:"version,omitempty" jsonschema:"module version, e.g. v1.6.0; omit for the latest"`
Module string `` /* 139-byte string literal not displayed */
GOOS string `json:"goos,omitempty" jsonschema:"target GOOS, e.g. linux"`
GOARCH string `json:"goarch,omitempty" jsonschema:"target GOARCH, e.g. amd64"`
Limit int `json:"limit,omitempty" jsonschema:"maximum symbols to return; omit for a server-side default"`
Token string `json:"token,omitempty" jsonschema:"pagination token: pass nextPageToken from a previous response to fetch the next page"`
}
GetSymbolsInput is the input for the get_package_symbols tool.
type GetVulnsInput ¶
type GetVulnsInput struct {
Path string `json:"path" jsonschema:"module path, e.g. github.com/google/uuid (the module, not a package within it)"`
Version string `json:"version,omitempty" jsonschema:"module version, e.g. v1.6.0; omit for the latest"`
Limit int `json:"limit,omitempty" jsonschema:"maximum vulnerabilities to return; omit for a server-side default"`
Token string `json:"token,omitempty" jsonschema:"pagination token: pass nextPageToken from a previous response to fetch the next page"`
}
GetVulnsInput is the input for the get_vulnerabilities tool.
type ListPackagesInput ¶
type ListPackagesInput struct {
ModulePath string `json:"modulePath" jsonschema:"module path, e.g. github.com/google/uuid (the module, not a package within it)"`
Version string `json:"version,omitempty" jsonschema:"module version, e.g. v1.6.0; omit for the latest"`
Limit int `json:"limit,omitempty" jsonschema:"maximum packages to return; omit for a server-side default"`
Token string `json:"token,omitempty" jsonschema:"pagination token: pass nextPageToken from a previous response to fetch the next page"`
}
ListPackagesInput is the input for the list_module_packages tool.
type ListVersionsInput ¶
type ListVersionsInput struct {
Path string `json:"path" jsonschema:"module path, e.g. github.com/google/uuid (the module, not a package within it)"`
Limit int `json:"limit,omitempty" jsonschema:"maximum versions to return; omit for a server-side default"`
Token string `json:"token,omitempty" jsonschema:"pagination token: pass nextPageToken from a previous response to fetch the next page"`
}
ListVersionsInput is the input for the list_module_versions tool.
type SearchInput ¶
type SearchInput struct {
Query string `json:"query" jsonschema:"search query: a package name or keywords, e.g. yaml or http router"`
Symbol string `json:"symbol,omitempty" jsonschema:"restrict results to packages that export this symbol, e.g. Marshal"`
Limit int `json:"limit,omitempty" jsonschema:"maximum results to return; omit for a server-side default"`
Token string `json:"token,omitempty" jsonschema:"pagination token: pass nextPageToken from a previous response to fetch the next page"`
}
SearchInput is the input for the search tool.
Click to show internal directories.
Click to hide internal directories.