(publicName, serverName, toolName, description string, rawSchema map[string]any, searchHint string)
| 20 | ToolName string |
| 21 | RawSchema map[string]any |
| 22 | } |
| 23 | |
| 24 | func NewMCPDynamicTool(publicName, serverName, toolName, description string, rawSchema map[string]any, searchHint string) *MCPDynamicTool { |
| 25 | if rawSchema == nil { |
| 26 | rawSchema = map[string]any{"type": "object", "properties": map[string]any{}} |
| 27 | } |
| 28 | return &MCPDynamicTool{ |
| 29 | BaseTool: BaseTool{Spec: ToolSpec{ |
| 30 | Name: publicName, |
| 31 | Description: description, |
| 32 | InputPrototype: nil, |
| 33 | ShouldDefer: true, |
| 34 | SearchHint: searchHint, |
| 35 | ReadOnly: BoolPtr(false), |
| 36 | ConcurrencySafe: BoolPtr(true), |
| 37 | Destructive: BoolPtr(true), |
| 38 | TimeoutSeconds: mcp.DefaultRequestTimeout.Seconds() + 15, |
| 39 | MaxOutputChars: 100_000, |
| 40 | }}, |
| 41 | ServerName: serverName, |
| 42 | ToolName: toolName, |
| 43 | RawSchema: rawSchema, |
| 44 | } |
| 45 | } |
no test coverage detected