feat: add get_business_term MCP tool#30
Conversation
Generated by chip-factory pipeline.
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
EricWarnerCollibra
left a comment
There was a problem hiding this comment.
Review: get_business_term MCP Tool
Convention Compliance ✅
All conventions are met:
- Package name matches directory name (
get_business_term) - Exports exactly
NewTool,Input,Output(plus sub-types for Output:Attribute,ColumnAsset,TableAsset,DataAttributeAsset) -
NewTooltakes*http.Clientand returns*chip.Tool[Input, Output] -
handleris unexported and returnschip.ToolHandlerFunc[Input, Output] -
Input/Outputusejsonandjsonschematags - Tool name in
NewToolis snake_case:"get_business_term" - Errors returned as
Output{}, err— no panics - No direct
mcp-goimports — usespkg/chipabstractions only - Client calls go through
pkg/clients/get_business_term_client.go -
Permissionsincludes"dgc.ai-copilot"(consistent withask_glossaryandask_dad) - Registered in
register.go
Build / Test / Lint ✅
| Check | Result |
|---|---|
go build ./cmd/chip |
✅ Pass |
go test ./pkg/tools/get_business_term/... |
✅ 8/8 tests pass |
go test ./... |
✅ All packages pass |
golangci-lint run ./... |
✅ Clean — no issues |
MCP Validation ✅
Tool registers correctly as get_business_term in factory mcp-list.
Adversarial Testing ✅
| Input | Result |
|---|---|
{"asset_id": ""} |
"asset_id is required" (isError: true) ✅ |
{} (missing field) |
JSON schema validation: missing properties: ["asset_id"] ✅ |
{"asset_id": "00000000-0000-0000-0000-000000000000"} |
"asset not found: 00000000-..." (isError: true) ✅ |
{"asset_id": "not-a-uuid<script>alert(1)</script>"} |
"unexpected status: 403" (isError: true) ✅ |
{"asset_id": "aaaa...(10000 chars)"} |
"unexpected status: 400" (isError: true) ✅ |
All adversarial inputs return clear errors with isError: true. No panics, no unhelpful errors.
Code Quality Notes (non-blocking, informational only)
- Client pattern:
get_business_term_client.gouses direct HTTP handling rather than the sharedexecuteRequesthelper fromdgc_client.go. This is consistent with other newer clients (e.g.,dgc_classification_client.go) and works correctly. - Attributes endpoint: Uses
/rest/2.0/attributes?assetId=...instead of the spec's/rest/2.0/assets/{assetId}/attributes. Both are valid Collibra REST API endpoints returning the same data. - Lineage direction: Only follows outgoing relations (
sourceId), correctly implementing the directed chain: Business Term → Data Attribute → Table → Column. - Test coverage: 8 test cases covering success path, 404, empty input, no attributes, no lineage, multiple data attributes, non-string attribute values, and server errors. Good breadth.
Verdict
Approved. Clean implementation that follows all conventions, has solid test coverage, handles edge cases gracefully, and passes all build/test/lint checks.
EricWarnerCollibra
left a comment
There was a problem hiding this comment.
Review: get_business_term MCP Tool
Convention Compliance ✅
All conventions are met:
- Package name matches directory name (get_business_term)
- Exports exactly NewTool, Input, Output (plus sub-types for Output: Attribute, ColumnAsset, TableAsset, DataAttributeAsset)
- NewTool takes *http.Client and returns *chip.Tool[Input, Output]
- handler is unexported and returns chip.ToolHandlerFunc[Input, Output]
- Input/Output use json and jsonschema tags
- Tool name in NewTool is snake_case: get_business_term
- Errors returned as Output{}, err — no panics
- No direct mcp-go imports — uses pkg/chip abstractions only
- Client calls go through pkg/clients/get_business_term_client.go
- Permissions includes dgc.ai-copilot (consistent with ask_glossary and ask_dad)
- Registered in register.go
Build / Test / Lint ✅
| Check | Result |
|---|---|
| go build ./cmd/chip | Pass |
| go test ./pkg/tools/get_business_term/... | 8/8 tests pass |
| go test ./... | All packages pass |
| golangci-lint run ./... | Clean — no issues |
MCP Validation ✅
Tool registers correctly as get_business_term in factory mcp-list.
Adversarial Testing ✅
| Input | Result |
|---|---|
| Empty asset_id | asset_id is required (isError: true) |
| Missing field entirely | JSON schema validation: missing properties: asset_id |
| Non-existent UUID | asset not found (isError: true) |
| Special chars/XSS in asset_id | unexpected status: 403 (isError: true) |
| Very long string (10000 chars) | unexpected status: 400 (isError: true) |
All adversarial inputs return clear errors with isError: true. No panics, no unhelpful errors.
Code Quality Notes (non-blocking, informational only)
- Client pattern: get_business_term_client.go uses direct HTTP handling rather than the shared executeRequest helper from dgc_client.go. This is consistent with other newer clients and works correctly.
- Attributes endpoint: Uses /rest/2.0/attributes?assetId=... instead of the spec /rest/2.0/assets/{assetId}/attributes. Both are valid Collibra REST API endpoints returning the same data.
- Lineage direction: Only follows outgoing relations (sourceId), correctly implementing the directed chain: Business Term -> Data Attribute -> Table -> Column.
- Test coverage: 8 test cases covering success path, 404, empty input, no attributes, no lineage, multiple data attributes, non-string attribute values, and server errors.
Verdict
Approved. Clean implementation that follows all conventions, has solid test coverage, handles edge cases gracefully, and passes all build/test/lint checks.
EricWarnerCollibra
left a comment
There was a problem hiding this comment.
Review: get_business_term MCP Tool
Convention Compliance: All conventions met (package naming, exports, NewTool signature, handler unexported, json/jsonschema tags, snake_case tool name, error handling, no mcp-go imports, client via pkg/clients, Permissions includes dgc.ai-copilot, registered in register.go).
Build/Test/Lint: All pass. go build succeeds. 8/8 unit tests pass. All packages pass. golangci-lint clean.
MCP Validation: Tool registers correctly as get_business_term in factory mcp-list.
Adversarial Testing (5 cases, all pass):
- Empty asset_id -> asset_id is required (isError: true)
- Missing field -> JSON schema validation error
- Non-existent UUID -> asset not found (isError: true)
- Special chars/XSS in asset_id -> unexpected status: 403 (isError: true)
- Very long string (10000 chars) -> unexpected status: 400 (isError: true)
Non-blocking notes:
- Client uses direct HTTP handling instead of shared executeRequest helper (consistent with other newer clients).
- Uses /rest/2.0/attributes?assetId=... instead of spec /rest/2.0/assets/{assetId}/attributes (both valid Collibra endpoints).
- Lineage only follows outgoing relations (sourceId) - correct for the specified directed chain.
- Good test coverage: 8 tests covering success, 404, empty input, no attributes, no lineage, multiple data attributes, non-string attribute values, and server errors.
Verdict: Approved. Clean implementation following all conventions with solid test coverage and graceful edge case handling.
EricWarnerCollibra
left a comment
There was a problem hiding this comment.
Approved after independent review. All conventions met, build/tests/lint pass, MCP validation successful, 5 adversarial tests pass gracefully.
EricWarnerCollibra
left a comment
There was a problem hiding this comment.
Approved after independent review. All conventions met, build/tests/lint pass, MCP validation successful, 5 adversarial tests pass gracefully. See full details below.
Convention Compliance: All 11 checks pass.
Build: go build passes. Tests: 8/8 pass. Lint: clean.
MCP: Tool registered correctly.
Adversarial: Empty string, missing field, bad UUID, XSS, long string - all return clear errors.
Non-blocking notes: Client uses direct HTTP (fine), attributes endpoint variation (valid), outgoing-only relations (correct for spec).
Independent Review: get_business_term MCP ToolConvention Compliance ✅ (11/11)
Build / Test / Lint ✅
MCP Validation ✅Tool registers as get_business_term in factory mcp-list. Adversarial Testing ✅ (5 cases)
Non-blocking Notes
|
Summary
Add
get_business_termMCP tool to Chip.Generated by chip-factory pipeline.