diff --git a/pkg/openapi/converter.go b/pkg/openapi/converter.go index eeaeeac4..2db4d82d 100644 --- a/pkg/openapi/converter.go +++ b/pkg/openapi/converter.go @@ -112,7 +112,7 @@ func (c *Converter) Convert(specData []byte) (*config.MCPConfig, error) { for path, pathItem := range doc.Paths.Map() { // Create a tool for each HTTP method for method, operation := range pathItem.Operations() { - if method == "options" { + if strings.EqualFold(method, "options") { continue // Skip CORS options } diff --git a/pkg/openapi/converter_test.go b/pkg/openapi/converter_test.go index 94ecde72..81b5548e 100644 --- a/pkg/openapi/converter_test.go +++ b/pkg/openapi/converter_test.go @@ -748,6 +748,7 @@ func TestConverter_Convert_SkipOptionsAndKeepSummaryAsDescription(t *testing.T) cfg, err := converter.ConvertFromJSON([]byte(spec)) assert.NoError(t, err) + assert.Len(t, cfg.Tools, 1) // Ensure GET tool is present with summary used as description found := false for _, tcfg := range cfg.Tools {