-
Notifications
You must be signed in to change notification settings - Fork 20
Custom Metadata tool #163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Custom Metadata tool #163
Conversation
…nd merge generic ones into search_assets_tool
| attributes_list_for_prompt.append(f"{attr_name}:{attr_desc}") | ||
|
|
||
| base_description = attr_def.description or "" | ||
| enhanced_description = base_description |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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?
| - 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 |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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?
modelcontextprotocol/server.py
Outdated
| assets = search_assets( | ||
| conditions={ | ||
| "custom_metadata": { | ||
| "Data Quality.quality_score": { |
There was a problem hiding this comment.
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?
Changes from Original MCP-8 Implementation
Removed separate
custom_metadata_conditionsparameter - Custom metadata filters are now part of the mainconditionsparameter under a nestedcustom_metadatakey for consistency with standard attributes.Simplified the nested structure - Changed from 4-level nested
custom_metadata_filter+property_filtersformat to simple dot notation:"SetName.AttributeName": value.Removed custom API code - Deleted 69 lines of manual HTTP request handling in
settings.py(includingbuild_api_url(),get_atlan_typedef_api_endpoint(), andmake_request()methods).Switched to PyAtlan native classes - Now uses
CustomMetadataCacheandEnumCachefrom PyAtlan instead of making direct API calls to fetch typedefs.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.