Skip to content

Conversation

@abhinavmathur-atlan
Copy link
Collaborator

Changes from Original MCP-8 Implementation

  1. Removed separate custom_metadata_conditions parameter - Custom metadata filters are now part of the main conditions parameter under a nested custom_metadata key for consistency with standard attributes.

  2. Simplified the nested structure - Changed from 4-level nested custom_metadata_filter + property_filters format to simple dot notation: "SetName.AttributeName": value.

  3. Removed custom API code - Deleted 69 lines of manual HTTP request handling in settings.py (including build_api_url(), get_atlan_typedef_api_endpoint(), and make_request() methods).

  4. Switched to PyAtlan native classes - Now uses CustomMetadataCache and EnumCache from PyAtlan instead of making direct API calls to fetch typedefs.

  5. Unified processing logic - Removed the separate _process_custom_metadata_condition() function (~90 lines). Custom metadata now uses the same _process_condition() function as standard attributes.

SatabrataPaul-GitAc and others added 30 commits August 20, 2025 14:33
…nd merge generic ones into search_assets_tool
logger = logging.getLogger(__name__)


def process_business_metadata(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets keep it consistent to custom_metadata

Returns:
Dictionary containing prompt, metadata details, and id
"""
cm_name = cm_def.name or "N/A"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are the default values correct?

attributes_list_for_prompt: List[str] = []
parsed_attributes_for_metadata: List[Dict[str, Any]] = []

if cm_def.attribute_defs:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please do if not raise

if cm_def.attribute_defs:
for attr_def in cm_def.attribute_defs:
attr_name = attr_def.display_name or attr_def.name or "Unnamed attribute"
attr_desc = attr_def.description or "No description"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please check default values here as well

attributes_list_for_prompt.append(f"{attr_name}:{attr_desc}")

base_description = attr_def.description or ""
enhanced_description = base_description
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this supposed to do?

)

# Process explicit custom metadata negative conditions
if custom_metadata_negative_conditions:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are negative conditions separately processed? Isn't it just a operator difference?

Returns:
Dict[str, Any]: Dictionary containing:
- context: Description of the returned data
- business_metadata_results: List of business metadata definitions, each containing:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make this consistent

- description: Description of the custom metadata set
- attributes: List of attribute definitions with name, display_name, data_type,
description, and optional enumEnrichment (with allowed values)
- id: GUID of the custom metadata definition
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to send this?

),
"gte": lambda custom_metadata_field_class,
value: custom_metadata_field_class.gte(value),
"match": lambda custom_metadata_field_class,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how will the LLM know all the allowed values?

assets = search_assets(
conditions={
"custom_metadata": {
"Data Quality.quality_score": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't the LLM use the names rather than displayNames for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants