feat(mcp): include source section in list/describe source tools#2485
feat(mcp): include source section in list/describe source tools#2485alex-fedotyev wants to merge 1 commit into
Conversation
Surface the optional source `section` label in the clickstack_list_sources and clickstack_describe_source tool output, so agents see the same source grouping the source selector shows. The key is omitted when a source has no section, matching the read-only external API behavior. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: a8ddf85 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🔵 Tier 2 — Low RiskSmall, isolated change with no API route or data model modifications. Why this tier:
Review process: AI review + quick human skim (target: 5–15 min). Reviewer validates AI assessment and checks for domain-specific concerns. Stats
|
E2E Test Results✅ All tests passed • 200 passed • 3 skipped • 1316s
Tests ran across 4 shards in parallel. |
The data source
sectionlabel (added in #2432, surfaced in the selector in #2476) is read wherever a user looks at sources, but the MCP source tools never returned it. This adds it toclickstack_list_sourcesandclickstack_describe_sourceso an agent sees the same grouping a user does.HDX-4584.
Summary
clickstack_list_sources: each source entry now includessectionwhen the source has one.clickstack_describe_source: the returnedsourcemetadata now includessectionwhen set.GET /api/v2/sourcesbehavior shipped in feat(sources): add an optional Section field to data sources #2432.Why
sectionlives on the shared source schema, so the tools surface a field they already receive: no controller or schema change. Adding it conditionally (only when present) mirrors the existing optional fields in the samemetabuilder (eventAttributesColumn,resourceAttributesColumn).Test plan
npx nx run @hyperdx/api:ci:lint(eslint + tsc) clean@hyperdx/api:dev:int mcp/__tests__/sources.testgreen (13/13), including new cases assertingsectionis returned when set and omitted when unset for both toolsopenapi.jsonregenerates with no diff[ui-check: allow] MCP tool output only, no UI.
[viewport: allow] Not applicable.
[ui-states: allow] Not applicable.