AllTools returns all tools without any filtering, sorted deterministically.
()
| 297 | |
| 298 | // AllTools returns all tools without any filtering, sorted deterministically. |
| 299 | func (r *Inventory) AllTools() []ServerTool { |
| 300 | result := slices.Clone(r.tools) |
| 301 | |
| 302 | // Sort deterministically: by toolset ID, then by tool name |
| 303 | sort.Slice(result, func(i, j int) bool { |
| 304 | if result[i].Toolset.ID != result[j].Toolset.ID { |
| 305 | return result[i].Toolset.ID < result[j].Toolset.ID |
| 306 | } |
| 307 | return result[i].Tool.Name < result[j].Tool.Name |
| 308 | }) |
| 309 | |
| 310 | return result |
| 311 | } |
| 312 | |
| 313 | // AvailableToolsets returns the unique toolsets that have tools, in sorted order. |
| 314 | // This is the ordered intersection of toolsets with reality - only toolsets that |
no outgoing calls