Documentation
¶
Overview ¶
Package edit_asset implements the edit_asset MCP tool: a single entry point for updating properties, attributes, relations, responsibilities, and tags on any existing Collibra asset via a typed list of operations. The MCP server resolves names to IDs internally and validates each operation against the asset's scoped assignment before executing any writes, so the calling agent never needs to know which REST endpoint to hit.
Index ¶
Constants ¶
const ( PropertyName = "name" PropertyDisplayName = "displayName" PropertyStatusID = "statusId" )
Whitelisted fields for update_property. Keeping this narrow avoids letting the agent PATCH fields that require a different flow (typeId, domainId).
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AssetSummary ¶
type AssetSummary struct {
ID string `json:"id"`
Name string `json:"name"`
DisplayName string `json:"displayName,omitempty"`
Type string `json:"type"`
Domain string `json:"domain"`
Status string `json:"status,omitempty"`
}
AssetSummary is the post-edit snapshot of the asset.
type Input ¶
type Input struct {
AssetID string `json:"assetId" jsonschema:"Required. UUID of the asset to edit."`
Operations []Operation `` /* 159-byte string literal not displayed */
}
Input is the tool's typed input.
type Operation ¶
type Operation struct {
Type OperationType `` /* 181-byte string literal not displayed */
// Attribute ops — used by update_attribute, add_attribute, remove_attribute.
AttributeName string `` /* 238-byte string literal not displayed */
Value string `json:"value,omitempty" jsonschema:"New value. Used by update_attribute, add_attribute, and update_property."`
// update_property — whitelisted fields only.
Field string `` /* 539-byte string literal not displayed */
// Relation ops.
RelationType string `` /* 286-byte string literal not displayed */
TargetAssetID string `json:"targetAssetId,omitempty" jsonschema:"For add_relation: UUID of the asset on the target (tail) side of the relation."`
RelationID string `json:"relationId,omitempty" jsonschema:"For remove_relation: UUID of the relation instance to delete."`
// Tag op — appends a tag to the asset (does not replace existing tags).
Tag string `` /* 132-byte string literal not displayed */
// Responsibility op.
Role string `` /* 147-byte string literal not displayed */
UserID string `` /* 266-byte string literal not displayed */
}
Operation is a discriminated union: the 'type' field selects which other fields are interpreted. Unused fields are ignored. Server-side validation catches missing or incompatible fields and returns a per-operation error.
type OperationResult ¶
type OperationResult struct {
Operation OperationType `json:"operation"`
Status string `json:"status" jsonschema:"'success' or 'error'."`
AttributeName string `json:"attributeName,omitempty"`
Field string `json:"field,omitempty"`
RelationType string `json:"relationType,omitempty"`
RelationID string `json:"relationId,omitempty"`
TargetAssetID string `json:"targetAssetId,omitempty"`
Tag string `json:"tag,omitempty"`
Role string `json:"role,omitempty"`
UserID string `json:"userId,omitempty"`
PreviousValue string `json:"previousValue,omitempty"`
NewValue string `json:"newValue,omitempty"`
CascadedDisplayName bool `` /* 249-byte string literal not displayed */
Error string `json:"error,omitempty"`
}
OperationResult is the outcome of a single operation in the input array.
type OperationType ¶
type OperationType string
OperationType enumerates the kinds of edits edit_asset can perform. Phases 2+ add add_relation, remove_relation, add_tag, set_responsibility.
const ( OpUpdateAttribute OperationType = "update_attribute" OpAddAttribute OperationType = "add_attribute" OpRemoveAttribute OperationType = "remove_attribute" OpUpdateProperty OperationType = "update_property" OpAddRelation OperationType = "add_relation" OpRemoveRelation OperationType = "remove_relation" OpAddTag OperationType = "add_tag" OpSetResponsibility OperationType = "set_responsibility" )
type Output ¶
type Output struct {
Status OutputStatus `` /* 199-byte string literal not displayed */
Results []OperationResult `json:"results" jsonschema:"Per-operation outcomes, in the same order as the input operations."`
Asset *AssetSummary `` /* 130-byte string literal not displayed */
Error string `` /* 161-byte string literal not displayed */
}
Output is the tool's typed output.
type OutputStatus ¶
type OutputStatus string
OutputStatus summarises the result of the call.
const ( StatusSuccess OutputStatus = "success" StatusPartialSuccess OutputStatus = "partial_success" StatusError OutputStatus = "error" )