fix(mcp): add EUPL-1.2 header and fix empty struct schema

- Add missing SPDX license header to mcp.go
- Return empty schema object for zero-field structs instead of nil

Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
Snider 2026-02-21 01:01:13 +00:00
parent 2107edaf79
commit fbf6421046
2 changed files with 3 additions and 1 deletions

View file

@ -1,3 +1,5 @@
// SPDX-License-Identifier: EUPL-1.2
// Package mcp provides a lightweight MCP (Model Context Protocol) server for CLI use.
// For full GUI integration (display, webview, process management), see core-gui/pkg/mcp.
package mcp

View file

@ -44,7 +44,7 @@ func structSchema(v any) map[string]any {
return nil
}
if t.NumField() == 0 {
return nil
return map[string]any{"type": "object", "properties": map[string]any{}}
}
properties := make(map[string]any)