(context.Context)
| 169 | } |
| 170 | |
| 171 | func (d *ToolSet) Tools(context.Context) ([]tools.Tool, error) { |
| 172 | d.mu.RLock() |
| 173 | defer d.mu.RUnlock() |
| 174 | |
| 175 | result := []tools.Tool{ |
| 176 | { |
| 177 | Name: ToolNameSearchTool, |
| 178 | Category: "deferred", |
| 179 | Description: "Search for available deferred tools by name or description. Use this to discover tools that can be activated.", |
| 180 | Parameters: tools.MustSchemaFor[SearchToolArgs](), |
| 181 | OutputSchema: tools.MustSchemaFor[string](), |
| 182 | Handler: tools.NewHandler(d.handleSearchTool), |
| 183 | Annotations: tools.ToolAnnotations{ |
| 184 | Title: "Search Tool", |
| 185 | ReadOnlyHint: true, |
| 186 | }, |
| 187 | }, |
| 188 | { |
| 189 | Name: ToolNameAddTool, |
| 190 | Category: "deferred", |
| 191 | Description: "Activate a deferred tool by name, making it available for use. Use search_tool first to find available tools.", |
| 192 | Parameters: tools.MustSchemaFor[AddToolArgs](), |
| 193 | OutputSchema: tools.MustSchemaFor[string](), |
| 194 | Handler: tools.NewHandler(d.handleAddTool), |
| 195 | Annotations: tools.ToolAnnotations{ |
| 196 | Title: "Add Tool", |
| 197 | ReadOnlyHint: true, |
| 198 | }, |
| 199 | }, |
| 200 | } |
| 201 | |
| 202 | for _, tool := range d.activatedTools { |
| 203 | result = append(result, tool) |
| 204 | } |
| 205 | |
| 206 | return result, nil |
| 207 | } |
| 208 | |
| 209 | func (d *ToolSet) Start(ctx context.Context) error { |
| 210 | // Note: we are not responsible for starting the underlying toolsets here |
nothing calls this directly
no test coverage detected