diff --git a/pkg/chip/ptr.go b/pkg/chip/ptr.go new file mode 100644 index 0000000..b9df9e1 --- /dev/null +++ b/pkg/chip/ptr.go @@ -0,0 +1,4 @@ +package chip + +// Ptr returns a pointer to the given value. +func Ptr[T any](v T) *T { return &v } diff --git a/pkg/chip/server.go b/pkg/chip/server.go index 8dc957c..0c9af64 100644 --- a/pkg/chip/server.go +++ b/pkg/chip/server.go @@ -89,6 +89,7 @@ type Tool[In, Out any] struct { Description string Handler ToolHandlerFunc[In, Out] Permissions []string + Annotations *mcp.ToolAnnotations } func RegisterTool[In, Out any](s *Server, tool *Tool[In, Out]) { @@ -131,6 +132,7 @@ func RegisterTool[In, Out any](s *Server, tool *Tool[In, Out]) { Description: tool.Description, InputSchema: buildSchema[In](), OutputSchema: buildSchema[Out](), + Annotations: tool.Annotations, }, handler) } diff --git a/pkg/chip/version.go b/pkg/chip/version.go index 50e15d3..822a1c3 100644 --- a/pkg/chip/version.go +++ b/pkg/chip/version.go @@ -1,3 +1,3 @@ package chip -var Version = "0.0.29-SNAPSHOT" +var Version = "0.0.30-SNAPSHOT" diff --git a/pkg/tools/add_business_term/tool.go b/pkg/tools/add_business_term/tool.go index d34b9b7..e0a3366 100644 --- a/pkg/tools/add_business_term/tool.go +++ b/pkg/tools/add_business_term/tool.go @@ -6,6 +6,7 @@ import ( "github.com/collibra/chip/pkg/chip" "github.com/collibra/chip/pkg/clients" + "github.com/modelcontextprotocol/go-sdk/mcp" ) const ( @@ -40,7 +41,8 @@ func NewTool(collibraClient *http.Client) *chip.Tool[Input, Output] { Name: "add_business_term", Description: "Create a business term asset with definition and optional attributes in Collibra.", Handler: handler(collibraClient), - Permissions: []string{}, + Permissions: []string{}, + Annotations: &mcp.ToolAnnotations{DestructiveHint: chip.Ptr(true)}, } } diff --git a/pkg/tools/add_data_classification_match/tool.go b/pkg/tools/add_data_classification_match/tool.go index dacd03c..49fe87b 100644 --- a/pkg/tools/add_data_classification_match/tool.go +++ b/pkg/tools/add_data_classification_match/tool.go @@ -8,6 +8,7 @@ import ( "github.com/collibra/chip/pkg/chip" "github.com/collibra/chip/pkg/clients" + "github.com/modelcontextprotocol/go-sdk/mcp" ) type Input struct { @@ -26,7 +27,8 @@ func NewTool(collibraClient *http.Client) *chip.Tool[Input, Output] { Name: "add_data_classification_match", Description: "Associate a data classification (data class) with a specific data asset in Collibra. Requires both the asset UUID and the classification UUID.", Handler: handler(collibraClient), - Permissions: []string{"dgc.classify", "dgc.catalog"}, + Permissions: []string{"dgc.classify", "dgc.catalog"}, + Annotations: &mcp.ToolAnnotations{DestructiveHint: chip.Ptr(true)}, } } diff --git a/pkg/tools/create_asset/tool.go b/pkg/tools/create_asset/tool.go index 00825c9..879b6f0 100644 --- a/pkg/tools/create_asset/tool.go +++ b/pkg/tools/create_asset/tool.go @@ -7,6 +7,7 @@ import ( "github.com/collibra/chip/pkg/chip" "github.com/collibra/chip/pkg/clients" + "github.com/modelcontextprotocol/go-sdk/mcp" ) // Input defines the parameters for the create_asset tool. @@ -29,7 +30,8 @@ func NewTool(collibraClient *http.Client) *chip.Tool[Input, Output] { Name: "create_asset", Description: "Create a new data asset with optional attributes in Collibra.", Handler: handler(collibraClient), - Permissions: []string{}, + Permissions: []string{}, + Annotations: &mcp.ToolAnnotations{DestructiveHint: chip.Ptr(true)}, } } diff --git a/pkg/tools/discover_business_glossary/tool.go b/pkg/tools/discover_business_glossary/tool.go index d29c7f4..89bf601 100644 --- a/pkg/tools/discover_business_glossary/tool.go +++ b/pkg/tools/discover_business_glossary/tool.go @@ -6,6 +6,7 @@ import ( "github.com/collibra/chip/pkg/chip" "github.com/collibra/chip/pkg/clients" + "github.com/modelcontextprotocol/go-sdk/mcp" ) type Input struct { @@ -22,6 +23,7 @@ func NewTool(collibraHttpClient *http.Client) *chip.Tool[Input, Output] { Description: "Perform a semantic search across business glossary content in Collibra. Ask natural language questions to discover business terms, acronyms, KPIs, and other business glossary content.", Handler: handler(collibraHttpClient), Permissions: []string{"dgc.ai-copilot"}, + Annotations: &mcp.ToolAnnotations{ReadOnlyHint: true}, } } diff --git a/pkg/tools/discover_data_assets/tool.go b/pkg/tools/discover_data_assets/tool.go index 7ce2d31..af6de10 100644 --- a/pkg/tools/discover_data_assets/tool.go +++ b/pkg/tools/discover_data_assets/tool.go @@ -6,6 +6,7 @@ import ( "github.com/collibra/chip/pkg/chip" "github.com/collibra/chip/pkg/clients" + "github.com/modelcontextprotocol/go-sdk/mcp" ) type Input struct { @@ -22,6 +23,7 @@ func NewTool(collibraClient *http.Client) *chip.Tool[Input, Output] { Description: "Perform a semantic search across available data assets in Collibra. Ask natural language questions to discover tables, columns, datasets, and other data assets.", Handler: handler(collibraClient), Permissions: []string{"dgc.ai-copilot"}, + Annotations: &mcp.ToolAnnotations{ReadOnlyHint: true}, } } diff --git a/pkg/tools/get_asset_details/tool.go b/pkg/tools/get_asset_details/tool.go index 21054df..c4567a5 100644 --- a/pkg/tools/get_asset_details/tool.go +++ b/pkg/tools/get_asset_details/tool.go @@ -11,6 +11,7 @@ import ( "github.com/collibra/chip/pkg/chip" "github.com/collibra/chip/pkg/clients" "github.com/google/uuid" + "github.com/modelcontextprotocol/go-sdk/mcp" ) type Input struct { @@ -42,6 +43,7 @@ func NewTool(collibraClient *http.Client) *chip.Tool[Input, Output] { Description: "Get detailed information about a specific asset by its UUID, including attributes, relations, responsibilities (owners, stewards, and other role assignments), and metadata. Returns up to 100 attributes per type and supports cursor-based pagination for relations (50 per page).", Handler: handler(collibraClient), Permissions: []string{}, + Annotations: &mcp.ToolAnnotations{ReadOnlyHint: true}, } } diff --git a/pkg/tools/get_business_term_data/tool.go b/pkg/tools/get_business_term_data/tool.go index e83617a..16d3f83 100644 --- a/pkg/tools/get_business_term_data/tool.go +++ b/pkg/tools/get_business_term_data/tool.go @@ -6,6 +6,7 @@ import ( "github.com/collibra/chip/pkg/chip" "github.com/collibra/chip/pkg/clients" + "github.com/modelcontextprotocol/go-sdk/mcp" ) type ColumnWithTable struct { @@ -47,6 +48,7 @@ func NewTool(collibraClient *http.Client) *chip.Tool[Input, Output] { Description: "Retrieve the physical data assets (Columns and Tables) associated with a Business Term via the path Business Term → Data Attribute → Column → Table.", Handler: handler(collibraClient), Permissions: []string{}, + Annotations: &mcp.ToolAnnotations{ReadOnlyHint: true}, } } diff --git a/pkg/tools/get_column_semantics/tool.go b/pkg/tools/get_column_semantics/tool.go index beff244..330d09c 100644 --- a/pkg/tools/get_column_semantics/tool.go +++ b/pkg/tools/get_column_semantics/tool.go @@ -6,6 +6,7 @@ import ( "github.com/collibra/chip/pkg/chip" "github.com/collibra/chip/pkg/clients" + "github.com/modelcontextprotocol/go-sdk/mcp" ) // AssetWithDescription represents an enriched asset used in traversal tool outputs. @@ -40,6 +41,7 @@ func NewTool(collibraClient *http.Client) *chip.Tool[Input, Output] { Description: "Retrieve all connected Data Attribute assets for a Column, including descriptions and related Measures and generic business assets with their descriptions.", Handler: handler(collibraClient), Permissions: []string{}, + Annotations: &mcp.ToolAnnotations{ReadOnlyHint: true}, } } diff --git a/pkg/tools/get_lineage_downstream/tool.go b/pkg/tools/get_lineage_downstream/tool.go index 0ee1caa..c35fd7c 100644 --- a/pkg/tools/get_lineage_downstream/tool.go +++ b/pkg/tools/get_lineage_downstream/tool.go @@ -6,6 +6,7 @@ import ( "github.com/collibra/chip/pkg/chip" "github.com/collibra/chip/pkg/clients" + "github.com/modelcontextprotocol/go-sdk/mcp" ) type Input struct { @@ -21,6 +22,7 @@ func NewTool(collibraClient *http.Client) *chip.Tool[Input, clients.GetLineageDi Description: "Get the downstream technical lineage graph for a data entity -- all direct and indirect consumer entities that are impacted by it, along with the transformations connecting them. This traces through all data objects across external systems (including unregistered assets, temporary tables, and source code), not just assets in the Collibra Data Catalog. Use this to answer \"What depends on this data?\" or \"If this table changes, what else is affected?\" Essential for impact analysis before modifying or deprecating a data asset. Results are paginated.", Handler: handler(collibraClient), Permissions: []string{}, + Annotations: &mcp.ToolAnnotations{ReadOnlyHint: true}, } } diff --git a/pkg/tools/get_lineage_entity/tool.go b/pkg/tools/get_lineage_entity/tool.go index d61d6dd..3ef7e65 100644 --- a/pkg/tools/get_lineage_entity/tool.go +++ b/pkg/tools/get_lineage_entity/tool.go @@ -6,6 +6,7 @@ import ( "github.com/collibra/chip/pkg/chip" "github.com/collibra/chip/pkg/clients" + "github.com/modelcontextprotocol/go-sdk/mcp" ) type Input struct { @@ -18,6 +19,7 @@ func NewTool(collibraClient *http.Client) *chip.Tool[Input, clients.GetLineageEn Description: "Get detailed metadata about a specific data entity in the technical lineage graph. Technical lineage covers all data objects across external systems -- including source code, transformations, and temporary tables -- regardless of whether they are registered in Collibra (unlike business lineage, which only covers assets ingested into the Data Catalog). An entity represents any tracked data asset such as a table, column, file, report, API endpoint, or topic. Returns the entity's name, type, source systems, parent entity, and linked Data Governance Catalog (DGC) identifier. Use this when you have an entity ID from a lineage traversal, search result, or user input and need its full details.", Handler: handler(collibraClient), Permissions: []string{}, + Annotations: &mcp.ToolAnnotations{ReadOnlyHint: true}, } } diff --git a/pkg/tools/get_lineage_transformation/tool.go b/pkg/tools/get_lineage_transformation/tool.go index 6ecfb6d..581cfaf 100644 --- a/pkg/tools/get_lineage_transformation/tool.go +++ b/pkg/tools/get_lineage_transformation/tool.go @@ -6,6 +6,7 @@ import ( "github.com/collibra/chip/pkg/chip" "github.com/collibra/chip/pkg/clients" + "github.com/modelcontextprotocol/go-sdk/mcp" ) type Input struct { @@ -18,6 +19,7 @@ func NewTool(collibraClient *http.Client) *chip.Tool[Input, clients.GetLineageTr Description: "Get detailed information about a specific data transformation, including its SQL or script logic. A transformation represents a data processing activity (ETL job, SQL query, script, etc.) that connects source entities to target entities in the lineage graph. Use this when you found a transformation ID in an upstream/downstream lineage result and want to see what the transformation actually does -- the SQL query, script content, or processing logic.", Handler: handler(collibraClient), Permissions: []string{}, + Annotations: &mcp.ToolAnnotations{ReadOnlyHint: true}, } } diff --git a/pkg/tools/get_lineage_upstream/tool.go b/pkg/tools/get_lineage_upstream/tool.go index 4dd591a..37b4aec 100644 --- a/pkg/tools/get_lineage_upstream/tool.go +++ b/pkg/tools/get_lineage_upstream/tool.go @@ -6,6 +6,7 @@ import ( "github.com/collibra/chip/pkg/chip" "github.com/collibra/chip/pkg/clients" + "github.com/modelcontextprotocol/go-sdk/mcp" ) type Input struct { @@ -21,6 +22,7 @@ func NewTool(collibraClient *http.Client) *chip.Tool[Input, clients.GetLineageDi Description: "Get the upstream technical lineage graph for a data entity -- all direct and indirect source entities that feed data into it, along with the transformations connecting them. This traces through all data objects across external systems (including unregistered assets, temporary tables, and source code), not just assets in the Collibra Data Catalog. Use this to answer \"Where does this data come from?\" or \"What are the sources feeding this table?\" Each relation in the result connects a source entity to a target entity through one or more transformations. Results are paginated.", Handler: handler(collibraClient), Permissions: []string{}, + Annotations: &mcp.ToolAnnotations{ReadOnlyHint: true}, } } diff --git a/pkg/tools/get_measure_data/tool.go b/pkg/tools/get_measure_data/tool.go index 6a0056c..eddd5c1 100644 --- a/pkg/tools/get_measure_data/tool.go +++ b/pkg/tools/get_measure_data/tool.go @@ -6,6 +6,7 @@ import ( "github.com/collibra/chip/pkg/chip" "github.com/collibra/chip/pkg/clients" + "github.com/modelcontextprotocol/go-sdk/mcp" ) type AssetWithDescription struct { @@ -46,6 +47,7 @@ func NewTool(collibraClient *http.Client) *chip.Tool[Input, Output] { Description: "Retrieve all underlying Column assets connected to a Measure via the path Measure → Data Attribute → Column, including each Column's description and parent Table.", Handler: handler(collibraClient), Permissions: []string{}, + Annotations: &mcp.ToolAnnotations{ReadOnlyHint: true}, } } diff --git a/pkg/tools/get_table_semantics/tool.go b/pkg/tools/get_table_semantics/tool.go index efa8e8c..d888e9e 100644 --- a/pkg/tools/get_table_semantics/tool.go +++ b/pkg/tools/get_table_semantics/tool.go @@ -6,6 +6,7 @@ import ( "github.com/collibra/chip/pkg/chip" "github.com/collibra/chip/pkg/clients" + "github.com/modelcontextprotocol/go-sdk/mcp" ) type AssetWithDescription struct { @@ -47,6 +48,7 @@ func NewTool(collibraClient *http.Client) *chip.Tool[Input, Output] { Description: "Retrieve the semantic layer for a Table asset: Columns, their Data Attributes, and connected Measures. Answers 'What is the semantic context of this table?' or 'Which metrics use data from this table?'.", Handler: handler(collibraClient), Permissions: []string{}, + Annotations: &mcp.ToolAnnotations{ReadOnlyHint: true}, } } diff --git a/pkg/tools/list_asset_types/tool.go b/pkg/tools/list_asset_types/tool.go index 1a683e0..9089d94 100644 --- a/pkg/tools/list_asset_types/tool.go +++ b/pkg/tools/list_asset_types/tool.go @@ -6,6 +6,7 @@ import ( "github.com/collibra/chip/pkg/chip" "github.com/collibra/chip/pkg/clients" + "github.com/modelcontextprotocol/go-sdk/mcp" ) type Input struct { @@ -38,6 +39,7 @@ func NewTool(collibraClient *http.Client) *chip.Tool[Input, Output] { Description: "List asset types available in Collibra with their properties and metadata.", Handler: handler(collibraClient), Permissions: []string{}, + Annotations: &mcp.ToolAnnotations{ReadOnlyHint: true}, } } diff --git a/pkg/tools/list_data_contracts/tool.go b/pkg/tools/list_data_contracts/tool.go index 733651c..3ad6461 100644 --- a/pkg/tools/list_data_contracts/tool.go +++ b/pkg/tools/list_data_contracts/tool.go @@ -6,6 +6,7 @@ import ( "github.com/collibra/chip/pkg/chip" "github.com/collibra/chip/pkg/clients" + "github.com/modelcontextprotocol/go-sdk/mcp" ) type Input struct { @@ -33,6 +34,7 @@ func NewTool(collibraClient *http.Client) *chip.Tool[Input, Output] { Description: "List data contracts available in Collibra. Returns a paginated list of data contract metadata, sorted by the last modified date in descending order.", Handler: handler(collibraClient), Permissions: []string{}, + Annotations: &mcp.ToolAnnotations{ReadOnlyHint: true}, } } diff --git a/pkg/tools/prepare_add_business_term/tool.go b/pkg/tools/prepare_add_business_term/tool.go index 0a90dd8..e9d4bb5 100644 --- a/pkg/tools/prepare_add_business_term/tool.go +++ b/pkg/tools/prepare_add_business_term/tool.go @@ -7,6 +7,7 @@ import ( "github.com/collibra/chip/pkg/chip" "github.com/collibra/chip/pkg/clients" + "github.com/modelcontextprotocol/go-sdk/mcp" ) const businessTermPublicID = "BusinessTerm" @@ -81,6 +82,7 @@ func NewTool(collibraClient *http.Client) *chip.Tool[Input, Output] { Description: "Validate business term data, resolve domains, check for duplicates, and hydrate attribute schemas. Returns structured status with pre-fetched options for missing fields.", Handler: handler(collibraClient), Permissions: []string{}, + Annotations: &mcp.ToolAnnotations{ReadOnlyHint: true}, } } diff --git a/pkg/tools/prepare_create_asset/tool.go b/pkg/tools/prepare_create_asset/tool.go index 0480f68..b131997 100644 --- a/pkg/tools/prepare_create_asset/tool.go +++ b/pkg/tools/prepare_create_asset/tool.go @@ -6,6 +6,7 @@ import ( "github.com/collibra/chip/pkg/chip" "github.com/collibra/chip/pkg/clients" + "github.com/modelcontextprotocol/go-sdk/mcp" ) const maxOptions = 20 @@ -76,6 +77,7 @@ func NewTool(collibraClient *http.Client) *chip.Tool[Input, Output] { Description: "Resolve asset type, domain, hydrate full attribute schema, check duplicates — return structured status for asset creation readiness.", Handler: handler(collibraClient), Permissions: []string{}, + Annotations: &mcp.ToolAnnotations{ReadOnlyHint: true}, } } diff --git a/pkg/tools/pull_data_contract_manifest/tool.go b/pkg/tools/pull_data_contract_manifest/tool.go index a6301c6..d0de293 100644 --- a/pkg/tools/pull_data_contract_manifest/tool.go +++ b/pkg/tools/pull_data_contract_manifest/tool.go @@ -8,6 +8,7 @@ import ( "github.com/collibra/chip/pkg/chip" "github.com/collibra/chip/pkg/clients" "github.com/google/uuid" + "github.com/modelcontextprotocol/go-sdk/mcp" ) type Input struct { @@ -26,6 +27,7 @@ func NewTool(collibraClient *http.Client) *chip.Tool[Input, Output] { Description: "Download the manifest file for the currently active version of a specific data contract. Returns the manifest content as a string.", Handler: handler(collibraClient), Permissions: []string{}, + Annotations: &mcp.ToolAnnotations{ReadOnlyHint: true}, } } diff --git a/pkg/tools/push_data_contract_manifest/tool.go b/pkg/tools/push_data_contract_manifest/tool.go index 864a73a..791ecc2 100644 --- a/pkg/tools/push_data_contract_manifest/tool.go +++ b/pkg/tools/push_data_contract_manifest/tool.go @@ -7,6 +7,7 @@ import ( "github.com/collibra/chip/pkg/chip" "github.com/collibra/chip/pkg/clients" + "github.com/modelcontextprotocol/go-sdk/mcp" ) type Input struct { @@ -30,7 +31,8 @@ func NewTool(collibraClient *http.Client) *chip.Tool[Input, Output] { Name: "push_data_contract_manifest", Description: "Upload a new version of a data contract manifest to Collibra. The manifestID and version are automatically parsed from the manifest content if it adheres to the Open Data Contract Standard.", Handler: handler(collibraClient), - Permissions: []string{"dgc.data-contract"}, + Permissions: []string{"dgc.data-contract"}, + Annotations: &mcp.ToolAnnotations{DestructiveHint: chip.Ptr(true)}, } } diff --git a/pkg/tools/remove_data_classification_match/tool.go b/pkg/tools/remove_data_classification_match/tool.go index deb8007..5982ee3 100644 --- a/pkg/tools/remove_data_classification_match/tool.go +++ b/pkg/tools/remove_data_classification_match/tool.go @@ -8,6 +8,7 @@ import ( "github.com/collibra/chip/pkg/chip" "github.com/collibra/chip/pkg/clients" + "github.com/modelcontextprotocol/go-sdk/mcp" ) type Input struct { @@ -24,7 +25,8 @@ func NewTool(collibraClient *http.Client) *chip.Tool[Input, Output] { Name: "remove_data_classification_match", Description: "Remove a classification match (association between a data class and an asset) from Collibra. Requires the UUID of the classification match to remove.", Handler: handler(collibraClient), - Permissions: []string{"dgc.classify", "dgc.catalog", "dgc.data-classes-edit"}, + Permissions: []string{"dgc.classify", "dgc.catalog", "dgc.data-classes-edit"}, + Annotations: &mcp.ToolAnnotations{DestructiveHint: chip.Ptr(true), IdempotentHint: true}, } } diff --git a/pkg/tools/search_asset_keyword/tool.go b/pkg/tools/search_asset_keyword/tool.go index 9937827..802dfaa 100644 --- a/pkg/tools/search_asset_keyword/tool.go +++ b/pkg/tools/search_asset_keyword/tool.go @@ -7,6 +7,7 @@ import ( "github.com/collibra/chip/pkg/chip" "github.com/collibra/chip/pkg/clients" + "github.com/modelcontextprotocol/go-sdk/mcp" ) type Input struct { @@ -42,6 +43,7 @@ func NewTool(collibraClient *http.Client) *chip.Tool[Input, Output] { Description: "Perform a wildcard keyword search for assets in the Collibra knowledge graph. Supports filtering by resource type, community, domain, asset type, status, and creator.", Handler: handler(collibraClient), Permissions: []string{}, + Annotations: &mcp.ToolAnnotations{ReadOnlyHint: true}, } } diff --git a/pkg/tools/search_data_classes/tool.go b/pkg/tools/search_data_classes/tool.go index 32ce780..9517ed8 100644 --- a/pkg/tools/search_data_classes/tool.go +++ b/pkg/tools/search_data_classes/tool.go @@ -7,6 +7,7 @@ import ( "github.com/collibra/chip/pkg/chip" "github.com/collibra/chip/pkg/clients" + "github.com/modelcontextprotocol/go-sdk/mcp" ) type Input struct { @@ -30,6 +31,7 @@ func NewTool(collibraClient *http.Client) *chip.Tool[Input, Output] { Description: "Search for data classes in Collibra's classification service. Supports filtering by name, description, and whether they contain rules.", Handler: handler(collibraClient), Permissions: []string{"dgc.data-classes-read"}, + Annotations: &mcp.ToolAnnotations{ReadOnlyHint: true}, } } diff --git a/pkg/tools/search_data_classification_matches/tool.go b/pkg/tools/search_data_classification_matches/tool.go index 7c38feb..0d450bb 100644 --- a/pkg/tools/search_data_classification_matches/tool.go +++ b/pkg/tools/search_data_classification_matches/tool.go @@ -6,6 +6,7 @@ import ( "github.com/collibra/chip/pkg/chip" "github.com/collibra/chip/pkg/clients" + "github.com/modelcontextprotocol/go-sdk/mcp" ) type Input struct { @@ -31,6 +32,7 @@ func NewTool(collibraClient *http.Client) *chip.Tool[Input, Output] { Description: "Search for classification matches (associations between data classes and assets) in Collibra. Supports filtering by asset IDs, statuses (ACCEPTED/REJECTED/SUGGESTED), classification IDs, and asset type IDs.", Handler: handler(collibraClient), Permissions: []string{"dgc.classify", "dgc.catalog"}, + Annotations: &mcp.ToolAnnotations{ReadOnlyHint: true}, } } diff --git a/pkg/tools/search_lineage_entities/tool.go b/pkg/tools/search_lineage_entities/tool.go index e66970f..78beb4c 100644 --- a/pkg/tools/search_lineage_entities/tool.go +++ b/pkg/tools/search_lineage_entities/tool.go @@ -6,6 +6,7 @@ import ( "github.com/collibra/chip/pkg/chip" "github.com/collibra/chip/pkg/clients" + "github.com/modelcontextprotocol/go-sdk/mcp" ) type Input struct { @@ -22,6 +23,7 @@ func NewTool(collibraClient *http.Client) *chip.Tool[Input, clients.SearchLineag Description: "Search for data entities in the technical lineage graph by name, type, or DGC identifier. Technical lineage covers all data objects across external systems -- including source code, transformations, and temporary tables -- regardless of whether they are registered in Collibra (unlike business lineage, which only covers assets ingested into the Data Catalog). Returns a paginated list of matching entities. This is typically the starting tool when you don't have a specific entity ID -- for example, to find all tables with \"sales\" in the name, or to find the lineage entity linked to a specific Collibra catalog asset via its DGC UUID. Supports partial name matching (case insensitive).", Handler: handler(collibraClient), Permissions: []string{}, + Annotations: &mcp.ToolAnnotations{ReadOnlyHint: true}, } } diff --git a/pkg/tools/search_lineage_transformations/tool.go b/pkg/tools/search_lineage_transformations/tool.go index 4edcbcf..dfbe9f0 100644 --- a/pkg/tools/search_lineage_transformations/tool.go +++ b/pkg/tools/search_lineage_transformations/tool.go @@ -6,6 +6,7 @@ import ( "github.com/collibra/chip/pkg/chip" "github.com/collibra/chip/pkg/clients" + "github.com/modelcontextprotocol/go-sdk/mcp" ) type Input struct { @@ -20,6 +21,7 @@ func NewTool(collibraClient *http.Client) *chip.Tool[Input, clients.SearchLineag Description: "Search for transformations in the technical lineage graph by name. Returns a paginated list of matching transformation summaries. Use this to discover ETL jobs, SQL queries, or other processing activities without knowing their IDs. For example, find all transformations with \"etl\" or \"sales\" in the name. To see the full transformation logic (SQL/script), use get_lineage_transformation with the returned ID.", Handler: handler(collibraClient), Permissions: []string{}, + Annotations: &mcp.ToolAnnotations{ReadOnlyHint: true}, } }