Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions pkg/chip/ptr.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package chip

// Ptr returns a pointer to the given value.
func Ptr[T any](v T) *T { return &v }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe it's time to bump go to 1.26.x, it has solution for that exact problem. Instead of chip.Ptr(true), you could just write new(true).

https://go.dev/doc/go1.26#language

2 changes: 2 additions & 0 deletions pkg/chip/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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]) {
Expand Down Expand Up @@ -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)
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/chip/version.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package chip

var Version = "0.0.29-SNAPSHOT"
var Version = "0.0.30-SNAPSHOT"
4 changes: 3 additions & 1 deletion pkg/tools/add_business_term/tool.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (

"github.com/collibra/chip/pkg/chip"
"github.com/collibra/chip/pkg/clients"
"github.com/modelcontextprotocol/go-sdk/mcp"
)

const (
Expand Down Expand Up @@ -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)},
}
}

Expand Down
4 changes: 3 additions & 1 deletion pkg/tools/add_data_classification_match/tool.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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)},
}
}

Expand Down
4 changes: 3 additions & 1 deletion pkg/tools/create_asset/tool.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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)},
}
}

Expand Down
2 changes: 2 additions & 0 deletions pkg/tools/discover_business_glossary/tool.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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},
}
}

Expand Down
2 changes: 2 additions & 0 deletions pkg/tools/discover_data_assets/tool.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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},
}
}

Expand Down
2 changes: 2 additions & 0 deletions pkg/tools/get_asset_details/tool.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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},
}
}

Expand Down
2 changes: 2 additions & 0 deletions pkg/tools/get_business_term_data/tool.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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},
}
}

Expand Down
2 changes: 2 additions & 0 deletions pkg/tools/get_column_semantics/tool.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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},
}
}

Expand Down
2 changes: 2 additions & 0 deletions pkg/tools/get_lineage_downstream/tool.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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},
}
}

Expand Down
2 changes: 2 additions & 0 deletions pkg/tools/get_lineage_entity/tool.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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},
}
}

Expand Down
2 changes: 2 additions & 0 deletions pkg/tools/get_lineage_transformation/tool.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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},
}
}

Expand Down
2 changes: 2 additions & 0 deletions pkg/tools/get_lineage_upstream/tool.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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},
}
}

Expand Down
2 changes: 2 additions & 0 deletions pkg/tools/get_measure_data/tool.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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},
}
}

Expand Down
2 changes: 2 additions & 0 deletions pkg/tools/get_table_semantics/tool.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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},
}
}

Expand Down
2 changes: 2 additions & 0 deletions pkg/tools/list_asset_types/tool.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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},
}
}

Expand Down
2 changes: 2 additions & 0 deletions pkg/tools/list_data_contracts/tool.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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},
}
}

Expand Down
2 changes: 2 additions & 0 deletions pkg/tools/prepare_add_business_term/tool.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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},
}
}

Expand Down
2 changes: 2 additions & 0 deletions pkg/tools/prepare_create_asset/tool.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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},
}
}

Expand Down
2 changes: 2 additions & 0 deletions pkg/tools/pull_data_contract_manifest/tool.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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},
}
}

Expand Down
4 changes: 3 additions & 1 deletion pkg/tools/push_data_contract_manifest/tool.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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)},
}
}

Expand Down
4 changes: 3 additions & 1 deletion pkg/tools/remove_data_classification_match/tool.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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},
}
}

Expand Down
2 changes: 2 additions & 0 deletions pkg/tools/search_asset_keyword/tool.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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},
}
}

Expand Down
Loading
Loading