Skip to content

feat(mcp): add artifact info adapter - #4885

Merged
mnriem merged 2 commits into
github:mainfrom
mnriem:mnriem-artifact-info-mcp-adapter
Oct 8, 2026
Merged

mnriem merged 2 commits into
github:mainfrom
mnriem:mnriem-artifact-info-mcp-adapter

Conversation

@mnriem

@mnriem mnriem commented Oct 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add first-class typed MCP tool specify_artifact_info for the shared artifact.info operation merged in refactor(artifact): extract info operation #4882
  • dispatch directly to _operation_info with strict closed inputs, typed named/hook outputs, immutable server-launch project context, structured error mapping, sanitized internal failures, and final actual-wire response budgeting
  • mark artifact.info available in the hierarchy-owned inventory while preserving artifact.list, artifact.lookup unavailability, specify_version, and the transitional generic tools
  • add direct adapter, inventory, in-memory protocol, response-budget boundary, and real stdio coverage

Validation

  • uv sync --extra test — passed
  • LC_ALL=en_US.UTF-8 .venv/bin/python -m pytest -q — 10,202 passed, 19 skipped
  • pytest collection — 10,155 before; 10,221 after
  • .venv/bin/python -m pytest tests/specify_cli/artifacts -q — 339 passed
  • focused MCP/artifact/version regression selection — 260 passed
  • .venv/bin/python -m pytest tests/specify_cli/artifacts/test_mcp_info.py tests/specify_cli/artifacts/test_mcp_list.py --cov=specify_cli.artifacts.mcp_info --cov=specify_cli.artifacts._mcp --cov-branch --cov-report=term-missing -q — 100% statement and branch coverage (180 statements, 12 branches; 106 passed)
  • uv run ruff check on all touched Python files — passed
  • uv run ruff format --check on all touched Python files — passed
  • git diff --check — passed

Scope audit

  • no CLI or shared-operation behavior changes
  • no subprocess, Typer, CLI JSON parsing, or mutable cwd dispatch
  • no artifact.lookup implementation
  • no artifact.list semantic or response-budget changes
  • no protocol stdout/stderr contamination

AI assistance disclosure

Implemented with GitHub Copilot using GPT-5.6 Sol in autonomous mode; code generation, tests, validation, and this pull request description.

Assisted-by: GitHub Copilot (model: GPT-5.6 Sol, autonomous)

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: fcf620cc-7e44-482d-965b-7d1704ef61e5
Copilot AI balanced review requested due to automatic review settings October 8, 2026 17:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Required CLI/MCP parity coverage is missing for the new adapter.

1 open finding
What changed in this PR

Adds the first-class typed specify_artifact_info MCP adapter backed by the shared artifact.info operation.

Changes:

  • Adds typed input/output contracts, error mapping, and response-size enforcement.
  • Registers artifact.info in the MCP inventory.
  • Adds adapter, discovery, protocol, and stdio tests.
File Description
src/​specify_cli/​artifacts/​mcp_info.py Implements the MCP adapter.
src/​specify_cli/​artifacts/​_mcp.py Registers and exposes the tool.
tests/​specify_cli/​artifacts/​test_mcp_info.py Adds comprehensive adapter tests.
tests/​specify_cli/​artifacts/​test_mcp_list.py Updates inventory expectations.
tests/​specify_cli/​mcp_server/​test_server.py Verifies discovery schema.
tests/​specify_cli/​mcp_server/​test_stdio.py Exercises the tool over stdio.

🧠 Review effort: Balanced


💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread tests/specify_cli/artifacts/test_mcp_info.py
Assisted-by: GitHub Copilot (model: GPT-5.6 Sol, autonomous)

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: fcf620cc-7e44-482d-965b-7d1704ef61e5
Copilot AI balanced review requested due to automatic review settings October 8, 2026 17:55
@mnriem

mnriem commented Oct 8, 2026

Copy link
Copy Markdown
Collaborator Author

Addressed the review feedback in 4f7478a4 by adding CLI/MCP parity coverage for both successful artifact.info results and expected operation errors. Both adapters now run against the same shared-operation fixture, with assertions covering identical requests and equivalent semantic projections.

Validation:

  • artifact info MCP adapter suite: 68 passed
  • full artifact package: 341 passed
  • full repository suite: 10,204 passed, 19 skipped
  • Ruff format/lint and git diff --check: passed

AI disclosure: generated with GitHub Copilot using GPT-5.6 Sol in autonomous mode; code, tests, validation, and this review-round summary.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The implementation follows the MCP architecture and has thorough positive, negative, parity, inventory, and protocol coverage.

0 open findings

1 resolved since last review

🧠 Review effort: Balanced

@mnriem
mnriem merged commit 9398980 into github:main Oct 8, 2026
15 checks passed
@mnriem
mnriem deleted the mnriem-artifact-info-mcp-adapter branch October 8, 2026 18:14
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