MCPcopy Index your code
hub / github.com/APIParkLab/APIPark / NewTool

Function NewTool

mcp-server/tool.go:37–46  ·  view source on GitHub ↗
(name string, uri string, method string, contentType string, params map[string]*Param, opts ...mcp.ToolOption)

Source from the content-addressed store, hash-verified

35}
36
37func NewTool(name string, uri string, method string, contentType string, params map[string]*Param, opts ...mcp.ToolOption) ITool {
38 return &Tool{
39 name: name,
40 url: uri,
41 method: method,
42 contentType: contentType,
43 params: params,
44 opts: opts,
45 }
46}
47
48func generateInvokeTool(path string, method string, contentType string, params map[string]*Param) func(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error) {
49 return func(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error) {

Callers 1

SetServerByOpenapiFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected