6bce2d5234
- Added FeatureFlagDisableEmbeddedResources constant to feature_flags.go - Implemented NewToolResultResourceWithFlag in utils/result.go - When flag is enabled, returns TextContent for text files - Returns ImageContent with base64 data for binary files - Maintains backward compatibility when flag is disabled - Updated get_file_contents tool to check feature flag and use new function - Added comprehensive tests for both utils function and integration with get_file_contents Co-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
14 lines
509 B
Go
14 lines
509 B
Go
package github
|
|
|
|
// FeatureFlags defines runtime feature toggles that adjust tool behavior.
|
|
type FeatureFlags struct {
|
|
LockdownMode bool
|
|
InsidersMode bool
|
|
}
|
|
|
|
// FeatureFlagDisableEmbeddedResources is a feature flag that when enabled,
|
|
// returns file contents as regular MCP content (TextContent/ImageContent)
|
|
// instead of EmbeddedResource. This provides better compatibility with
|
|
// clients that don't support embedded resources.
|
|
const FeatureFlagDisableEmbeddedResources = "MCP_DISABLE_EMBEDDED_RESOURCES"
|