all: minor cleanup and README improvements (#30)
Clean up some inaccurate comments, and update the README to strengthen warnings about the current status.
This commit is contained in:
parent
204b59483b
commit
5aabc33c9b
2 changed files with 18 additions and 42 deletions
|
|
@ -26,13 +26,13 @@ type ToolHandlerFor[In, Out any] func(context.Context, *ServerSession, *CallTool
|
|||
// A rawToolHandler is like a ToolHandler, but takes the arguments as as json.RawMessage.
|
||||
type rawToolHandler = func(context.Context, *ServerSession, *CallToolParamsFor[json.RawMessage]) (*CallToolResult, error)
|
||||
|
||||
// A Tool is a tool definition that is bound to a tool handler.
|
||||
// A ServerTool is a tool definition that is bound to a tool handler.
|
||||
type ServerTool struct {
|
||||
Tool *Tool
|
||||
Handler ToolHandler
|
||||
// Set in NewServerTool or Server.AddToolsErr.
|
||||
// Set in NewServerTool or Server.addToolsErr.
|
||||
rawHandler rawToolHandler
|
||||
// Resolved tool schemas. Set in Server.AddToolsErr.
|
||||
// Resolved tool schemas. Set in Server.addToolsErr.
|
||||
inputResolved, outputResolved *jsonschema.Resolved
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ var ErrConnectionClosed = errors.New("connection closed")
|
|||
// and server.
|
||||
//
|
||||
// Transports should be used for at most one call to [Server.Connect] or
|
||||
// [Client.Start].
|
||||
// [Client.Connect].
|
||||
type Transport interface {
|
||||
// Connect returns the logical JSON-RPC connection..
|
||||
//
|
||||
|
|
|
|||
Loading…
Reference in a new issue