| 1 | package agent |
| 2 | |
| 3 | import ( |
| 4 | "reasonix/internal/provider" |
| 5 | "reasonix/internal/tool" |
| 6 | ) |
| 7 | |
| 8 | // toProviderMCPApp lifts the collected Apps presentation onto the outcome. |
| 9 | func toProviderMCPApp(r *tool.MCPAppResult) *provider.MCPAppPresentation { |
| 10 | if r == nil { |
| 11 | return nil |
| 12 | } |
| 13 | bounded := r.Sanitized() |
| 14 | if bounded == nil { |
| 15 | return nil |
| 16 | } |
| 17 | return &provider.MCPAppPresentation{ |
| 18 | Server: bounded.Server, Tool: bounded.Tool, Generation: bounded.Generation, |
| 19 | ResourceURI: bounded.ResourceURI, CSP: bounded.CSP, |
| 20 | RawResult: bounded.RawResult, Structured: bounded.Structured, |
| 21 | } |
| 22 | } |
| 23 |