Documentation
¶
Overview ¶
Package server builds the MCP server and wires each registered tools.Tool into it: New's AddTool call supplies the SDK with the tool's name, description, and input schema — which the SDK uses on its own to answer ListTools — plus a CallTool handler built by adapt. adapt runs the tool's Validate/Execute contract, recovers from panics so one tool's bug can't take down the connection, and sanitizes execution errors (via handleError) before they reach the client.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(name, version string, logger *slog.Logger, registeredTools []tools.Tool, resources *tools.Resources) *mcp.Server
New builds the sync82 MCP server and registers every tool in registeredTools, with its toolAnnotations, and every prompt in tools.Prompts. When resources is not nil it also serves the resources and completes the arguments of the prompts and resource templates. name/version identify the server to connecting clients; logger receives every diagnostic message and must write only to stderr — stdout is the JSON-RPC channel over the stdio transport.
Types ¶
This section is empty.