shouldStripMCPAppsMetadata centralises the strip decision so the same logic is exercised by tests and by RegisterTools.
(ctx context.Context, featureFlagEnabled bool)
| 193 | // shouldStripMCPAppsMetadata centralises the strip decision so the same logic |
| 194 | // is exercised by tests and by RegisterTools. |
| 195 | func shouldStripMCPAppsMetadata(ctx context.Context, featureFlagEnabled bool) bool { |
| 196 | if !featureFlagEnabled { |
| 197 | return true |
| 198 | } |
| 199 | // Feature flag is on. Respect the client capability if it is known. |
| 200 | if supported, ok := ghcontext.HasUISupport(ctx); ok && !supported { |
| 201 | return true |
| 202 | } |
| 203 | return false |
| 204 | } |
| 205 | |
| 206 | // RegisterTools registers all available tools with the server using the provided dependencies. |
| 207 | // The context is used for feature flag evaluation and client capability checks. |
no outgoing calls