mcp

package
v0.0.0-...-fbdad03 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 1, 2026 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServer

func NewServer(store *db.Store, version string) *mcp.Server

NewServer creates a new MCP server for documango.

func RunHTTP

func RunHTTP(ctx context.Context, server *mcp.Server, addr string) error

RunHTTP runs the server using the streamable HTTP transport.

func RunStdio

func RunStdio(ctx context.Context, server *mcp.Server) error

RunStdio runs the server using the stdio transport.

Types

type GetSymbolInput

type GetSymbolInput struct {
	Symbol string `json:"symbol" jsonschema:"Symbol name to look up"`
}

GetSymbolInput defines the input schema for the get_symbol_context tool.

type GetSymbolOutput

type GetSymbolOutput struct {
	Symbol    string `json:"symbol"`
	Signature string `json:"signature"`
	Summary   string `json:"summary"`
}

GetSymbolOutput defines the output schema for the get_symbol_context tool.

func NewSymbolOutput

func NewSymbolOutput(entry db.AgentContext) GetSymbolOutput

type Handlers

type Handlers struct {
	// contains filtered or unexported fields
}

func NewHandlers

func NewHandlers(store *db.Store) *Handlers

func (*Handlers) GetSymbolHandler

func (h *Handlers) GetSymbolHandler(ctx context.Context, req *mcp.CallToolRequest, input GetSymbolInput) (*mcp.CallToolResult, any, error)

func (*Handlers) ReadDocHandler

func (h *Handlers) ReadDocHandler(ctx context.Context, req *mcp.CallToolRequest, input ReadDocInput) (*mcp.CallToolResult, any, error)

func (*Handlers) SearchDocsHandler

func (h *Handlers) SearchDocsHandler(ctx context.Context, req *mcp.CallToolRequest, input SearchDocsInput) (*mcp.CallToolResult, any, error)

type ReadDocInput

type ReadDocInput struct {
	Path string `json:"path" jsonschema:"Document path (e.g., 'go/net/http')"`
}

ReadDocInput defines the input schema for the read_doc tool.

type ReadDocOutput

type ReadDocOutput struct {
	Content string `json:"content"`
	Format  string `json:"format"`
}

ReadDocOutput defines the output schema for the read_doc tool.

type SearchDocsInput

type SearchDocsInput struct {
	Query   string `json:"query" jsonschema:"Search query for documentation"`
	Package string `json:"package,omitempty" jsonschema:"Filter by package path prefix"`
}

SearchDocsInput defines the input schema for the search_docs tool.

type SearchDocsOutput

type SearchDocsOutput struct {
	Results []db.SearchResult `json:"results"`
	Total   int               `json:"total"`
}

SearchDocsOutput defines the output schema for the search_docs tool.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL