Category
MCP Schema Generation
Describe the feature you'd like to request
The deduplicate_entity_types option currently allows de-duplicating enum entity types and leaf object entity types, but doesn't support record types which are emitted with the objects_as_records option.
Problem
When deduplicate_entity_types is true and objects_as_records is also true, leaf record objects are encoded as common types (records) rather than entity types. The current code explicitly strips LeafRecord fingerprints from the resolved dedup map in this configuration:
// LeafRecord dedup only applies when objects are encoded as entity types
if self.config.objects_as_records {
resolved.retain(|fp, _| !matches!(fp, EntityTypeFingerprint::LeafRecord { .. }));
}
This means two tools with structurally identical objects (same name, same fields, same types, same required status) each get their own duplicate common type definition in their respective Input namespaces, with no consolidation. We should enable deduplication even when objects_as_records is true, following the same logic as the existing deduplication functionality.
Describe alternatives you've considered
We could have a separate option deduplicate-record-types that is separate from the current deduplication option.
Additional context
No response
Is this something that you'd be interested in working on?
Category
MCP Schema Generation
Describe the feature you'd like to request
The
deduplicate_entity_typesoption currently allows de-duplicating enum entity types and leaf object entity types, but doesn't support record types which are emitted with theobjects_as_recordsoption.Problem
When
deduplicate_entity_typesistrueandobjects_as_recordsis alsotrue, leaf record objects are encoded as common types (records) rather than entity types. The current code explicitly strips LeafRecord fingerprints from the resolved dedup map in this configuration:This means two tools with structurally identical objects (same name, same fields, same types, same required status) each get their own duplicate common type definition in their respective Input namespaces, with no consolidation. We should enable deduplication even when
objects_as_recordsistrue, following the same logic as the existing deduplication functionality.Describe alternatives you've considered
We could have a separate option
deduplicate-record-typesthat is separate from the current deduplication option.Additional context
No response
Is this something that you'd be interested in working on?