Skip to content

rust(feat): artifact tools - #766

Merged
lineville merged 7 commits into
mainfrom
artifact-tools
Aug 28, 2026
Merged

rust(feat): artifact tools#766
lineville merged 7 commits into
mainfrom
artifact-tools

Conversation

@lineville

@lineville lineville commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Adds three MCP tools backed by the public sift.artifacts.v1.ArtifactService:

  • list_artifacts: lists artifacts in the organization, optionally scoped to one conversation.
  • download_artifact: returns the latest version, or a pinned artifact_version_id, plus a signed download_url when the version has uploaded bytes.
  • create_artifact: creates an artifact, or appends a version to an existing one. Artifacts cannot be edited in place; every change is a new version.

Access: creating needs --allow-create. Appending a version to an existing artifact also needs --allow-destructive.

Feature flag: these tools are enabled per account by the agents feature flag, resolved when the MCP server starts. This matches the backend gate on the artifact handler. When the flag is off, the tools are absent from the tool list and calls return "not found". Enabling the flag requires an MCP restart.

Client events: tool_events.json maps the three tools to CLIENT_EVENT_USER_CALLED_MCP_TOOL_LIST_ARTIFACTS, _DOWNLOAD_ARTIFACT, and _CREATE_ARTIFACT. These values are not yet in the azimuth ClientEvent enum, so the backend discards them until a follow-up azimuth PR adds them.

Also adds the sift.artifacts.v1 proto, its generated Rust code, mocks for the artifact and remote-file services, and a test that each feature flag routes only its own tools.

https://claude.ai/code/session_01MMTsS9mCT21LBymq5Xmaex

lineville and others added 4 commits August 28, 2026 10:01
Keep artifact MCP tools while taking main's feature flags, client events,
calculated channels, and list paging contract.

Co-authored-by: Cursor <cursoragent@cursor.com>
- get_artifact propagates download-URL errors instead of returning a
  partial artifact
- ArtifactView derives Serialize (flattened) so serialization errors
  propagate and the key is `download_url`, matching the description
- drop the mirror AuthoringKind enum; pass ArtifactAuthoringKind through
- parse_authoring_kind is case-insensitive and accepts proto enum names
- create_artifact reports "Appended version" on the append path and
  gates appends with --allow-destructive
- list_artifacts description states oldest-first ordering
- add MockRemoteFileServiceImpl to sift_test_util and cover the
  download-URL path in service and tool tests
- update skill and changelog

Claude-Session: https://claude.ai/code/session_01MMTsS9mCT21LBymq5Xmaex
@lineville
lineville requested a review from evan-sift August 28, 2026 21:59
@lineville
lineville marked this pull request as ready for review August 28, 2026 21:59
`list_artifacts`, `get_artifact`, and `create_artifact` now register only
when the account's agents feature flag is enabled at server startup,
matching the backend gate on the artifact handler. Adds a test that each
flag routes only its own tools.

Claude-Session: https://claude.ai/code/session_01MMTsS9mCT21LBymq5Xmaex
Comment thread rust/crates/sift_cli/assets/skills/sift/SKILL.md Outdated
Comment thread rust/crates/sift_mcp/src/tool_events.json Outdated
Renames the tool, its params struct, the service method, the client
event, and every doc reference. The private RPC wrapper keeps the
`get_artifact` name to match the proto.

Claude-Session: https://claude.ai/code/session_01MMTsS9mCT21LBymq5Xmaex
@lineville
lineville requested a review from evan-sift August 28, 2026 23:03
Comment thread rust/crates/sift_mcp/src/tool/artifacts/mod.rs Outdated
Comment thread rust/crates/sift_mcp/src/tool/artifacts/mod.rs
Comment thread rust/crates/sift_mcp/src/tool/artifacts/mod.rs
@lineville
lineville merged commit 91408e7 into main Aug 28, 2026
22 checks passed
@lineville
lineville deleted the artifact-tools branch August 28, 2026 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants