(t *testing.T)
| 879 | } |
| 880 | |
| 881 | func TestForMCPRequest_PromptsGet(t *testing.T) { |
| 882 | prompts := []ServerPrompt{ |
| 883 | mockPrompt("prompt1", "repos"), |
| 884 | mockPrompt("prompt2", "issues"), |
| 885 | } |
| 886 | |
| 887 | reg := mustBuild(t, NewBuilder().SetPrompts(prompts).WithToolsets([]string{"all"})) |
| 888 | filtered := reg.ForMCPRequest(MCPMethodPromptsGet, "prompt1") |
| 889 | |
| 890 | available := filtered.AvailablePrompts(context.Background()) |
| 891 | if len(available) != 1 { |
| 892 | t.Fatalf("Expected 1 prompt for prompts/get, got %d", len(available)) |
| 893 | } |
| 894 | if available[0].Prompt.Name != "prompt1" { |
| 895 | t.Errorf("Expected prompt name 'prompt1', got %q", available[0].Prompt.Name) |
| 896 | } |
| 897 | } |
| 898 | |
| 899 | func TestForMCPRequest_UnknownMethod(t *testing.T) { |
| 900 | tools := []ServerTool{ |
nothing calls this directly
no test coverage detected