(t *testing.T)
| 588 | } |
| 589 | |
| 590 | func TestWithToolsResolvesAliases(t *testing.T) { |
| 591 | tools := []ServerTool{ |
| 592 | mockTool("issue_read", "toolset1", true), |
| 593 | } |
| 594 | |
| 595 | // Using deprecated alias should resolve to canonical name |
| 596 | filtered := mustBuild(t, NewBuilder().SetTools(tools). |
| 597 | WithDeprecatedAliases(map[string]string{ |
| 598 | "get_issue": "issue_read", |
| 599 | }). |
| 600 | WithToolsets([]string{}). |
| 601 | WithTools([]string{"get_issue"})) |
| 602 | available := filtered.AvailableTools(context.Background()) |
| 603 | |
| 604 | if len(available) != 1 { |
| 605 | t.Errorf("expected 1 tool, got %d", len(available)) |
| 606 | } |
| 607 | if available[0].Tool.Name != "issue_read" { |
| 608 | t.Errorf("expected issue_read, got %s", available[0].Tool.Name) |
| 609 | } |
| 610 | } |
| 611 | |
| 612 | func TestHasToolset(t *testing.T) { |
| 613 | tools := []ServerTool{ |
nothing calls this directly
no test coverage detected