Repository navigation
rust(feat): ENG-15355: add create_declarative_chart MCP tool with Explore sharelinks - #813
Draft
alexa-sift wants to merge 1 commit into
Draft
alexa-sift wants to merge 1 commit into
alexa-sift wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
Description
ENG-15355, ENG-15356 (parent ENG-15354)
Adds
create_declarative_chartto the Sift MCP. An MCP client sends a declarative chart spec (YAML or JSON) and gets back an Explore sharelink, or path-level validation issues it can fix and resend.service/declarativecalls the backend'sdeclarative:migrate,declarative:validate(strict), anddeclarative:sharelinkREST endpoints. The declarative protos are not in this repo, so there is nosift_rsclient.layout. Specs with exactly one chart display inline in Sift agent chat.exploreUrl,shortLink, and the migrated spec on success;invalid_specorservice_unavailablewith{path, message}issues otherwise. A 400 from any endpoint is treated as an invalid spec.declarativeClient.ts: 3 attempts, 250ms exponential backoff, 10s per request, retrying 408, 429, and 5xx. This lives in the declarative service becausepolicy::with_retryonly handles gRPC status codes.--allow-creategate: a sharelink is a view link, likeexplore_url, and the backend dedupes links by spec hash.explore_urlandget_datadescriptions now send plot and chart requests to the new tool. Thesiftskill gainsreferences/declarative-charts.mdcovering user-supplied specs and plain-language requests.create_declarative_charttotool_events.json. The matchingClientEventvalue still needs to land in azimuth'sclient_events.proto.Follow-ups, not in this PR:
tool/explore/mod.rs).client_events.protovalue before the sift-cli release, or analytics for this tool start only after azimuth deploys.Verification
cargo test --offline -p sift_mcp: 610 passed, 0 failed. New tests cover YAML and JSON specs reaching every endpoint unchanged, multi-chart andlayoutspecs forwarded rather than rejected, invalid and service-unavailable paths, 400 handling, retries, and timeouts.cargo clippy --offline -p sift_mcp --all-targets --all-features --no-deps -- -D warnings -A deprecated -A clippy::too_many_arguments: clean. The two allows cover pre-existing failures on Rust 1.98 in unchanged code (rmcpServerInfodeprecation inserver/mod.rsandstartup.rs,too_many_argumentsinreport_templates).sift_connectalso fails a new clippy lint, unrelated to this change.cargo fmt -p sift_mcp --check: clean.sift-cli mcpcheck from Claude Code against a live backend.🤖 Generated with Claude Code