Closed
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
approved these changes
Feb 26, 2026
EricWarnerCollibra
left a comment
There was a problem hiding this comment.
Review: get_business_term Tool
Convention Compliance ✅
All conventions are followed correctly:
- Package name
get_business_termmatches directory name (snake_case) - Exports
NewTool,Input,Output(plus supporting lineage types) -
NewTooltakes*http.Clientand returns*chip.Tool[Input, Output] -
handleris unexported and returnschip.ToolHandlerFunc[Input, Output] -
Input/Outputusejsonandjsonschematags throughout - Tool name
get_business_termis snake_case - Errors returned as
Output{}, err— no panics - No direct
mcp-goimports — only usespkg/chipandpkg/clients - Client calls go through
pkg/clients/get_business_term_client.go -
Permissions: []string{"dgc.ai-copilot"}— consistent with similar tools (ask_dad,ask_glossary) - Registered correctly in
register.go
Build, Test, Lint ✅
- Build:
go build ./cmd/chip— passed - Unit Tests: All 7 tests passed (FullLineage, NotFound, EmptyAssetID, NoAttributesNoLineage, FiltersNonPhysicalData, MultipleDataAttributes, ServerError)
- Full Test Suite: All 14 packages passed, no regressions
- Lint:
golangci-lint run ./...— clean, no warnings
MCP Validation ✅
- Tool registered and visible via
factory mcp-list - Empty
asset_idreturns:{"isError": true, "text": "asset_id is required"} - Missing
asset_idfield rejected by JSON schema validation - Non-existent UUID returns:
"asset not found: 00000000-..."
Adversarial Testing ✅ (7 edge cases tested)
| Input | Result | Verdict |
|---|---|---|
"" (empty string) |
asset_id is required |
✅ Clean error |
{} (missing field) |
JSON schema validation error | ✅ Caught at framework level |
00000000-0000-0000-0000-000000000000 (zero UUID) |
asset not found |
✅ Clear error |
not-a-uuid-at-all (malformed) |
unexpected status: 400 |
✅ Handled |
<script>alert(1)</script> (XSS) |
unexpected status: 403 |
✅ Safe |
| 166-char string (very long) | unexpected status: 400 |
✅ Handled |
| SQL injection string | unexpected status: 403 |
✅ Safe |
Path traversal ../../etc/passwd |
decoding response: invalid character '<' |
✅ Safe (url.PathEscape prevents traversal) |
Code Quality Observations
Strengths:
- Clean 3-level lineage traversal (BT → DA → Table → Column) with proper filtering at each level
- Test coverage is thorough: happy path, error cases, empty data, multi-DA, non-physical filtering
- Client code properly uses
url.PathEscapefor the asset ID in the URL path - Consistent use of
make([]T, 0)ensures empty JSON arrays[]instead ofnull
Minor notes (non-blocking):
- No pagination for attributes/relations responses — if a business term has >1000 attributes or relations, some may be missed. Acceptable for v1.
- The path traversal input returns a JSON decoding error rather than a cleaner "invalid asset ID" message — the API returns HTML for that input. Not a bug, just slightly less polished error messaging.
Verdict: APPROVED — The tool is well-implemented, follows all conventions, has excellent test coverage, and handles edge cases gracefully.
Author
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add
get_business_termMCP tool to Chip.Generated by chip-factory pipeline.