Repository navigation
Conversation
Assisted-by: OpenAI Codex (model: GPT-6, autonomous) Signed-off-by: Nishanth <bnishanthtpm06@gmail.com>
There was a problem hiding this comment.
🟡 Changes recommended
The new operation misclassifies missing or non-directory project paths as unsafe workflow storage.
1 open issue
What changed in this PR
Adds installed-workflow listing to MCP as an incremental follow-up to #5054 and #4913, sharing application behavior with the existing CLI.
Changes:
- Extracts a typed, read-only workflow-list operation shared by CLI and MCP.
- Adds
specify_workflow_listwith strict schemas, response limits, project-path checks, and structured errors. - Updates inventory registration, regression coverage, and MCP documentation while retaining the six existing tools.
| File | Description |
|---|---|
tests/specify_cli/workflows/test_operation_list.py |
Tests shared behavior, storage safety, and read-only boundaries. |
tests/specify_cli/workflows/test_mcp.py |
Binds inventory parity to the implemented list contract. |
tests/specify_cli/workflows/test_mcp_list.py |
Tests schemas, dispatch, limits, errors, and protocol behavior. |
tests/specify_cli/workflows/test_command_list.py |
Checks CLI output compatibility and complete listings. |
tests/specify_cli/mcp_server/test_stdio.py |
Exercises workflow listing through real stdio. |
tests/specify_cli/mcp_server/test_server.py |
Updates expected tool discovery. |
src/specify_cli/workflows/mcp_list.py |
Implements the bounded, typed MCP adapter. |
src/specify_cli/workflows/command_list.py |
Delegates CLI listing to the shared operation. |
src/specify_cli/workflows/catalog/_domain.py |
Supports policy-aware registry reads. |
src/specify_cli/workflows/_storage.py |
Centralizes workflow storage validation. |
src/specify_cli/workflows/_operation_list.py |
Defines the shared listing contract and operation. |
src/specify_cli/workflows/_mcp.py |
Marks and registers only workflow listing as available. |
src/specify_cli/workflows/_commands.py |
Reuses centralized storage validation. |
src/specify_cli/mcp_server/server.py |
Registers the workflow-owned MCP tool. |
docs/reference/mcp.md |
Documents listing inputs, outputs, limits, and safety boundaries. |
Review effort: Max
|
Please address Copilot feedback |
Assisted-by: OpenAI Codex (model: GPT-6, autonomous) Signed-off-by: Nishanth <bnishanthtpm06@gmail.com>
|
Thanks @mnriem. Addressed the Copilot feedback in The fix validates the project directory before accessing workflow storage, so missing directories and regular files now return Validation: 72 passed on Windows and 1,843 passed in relevant Linux suites. Ruff, formatting, scoped mypy, and AI assistance: OpenAI Codex (GPT-6, autonomous under my direction) assisted with the fix, regression tests, validation. |

Description
Adds
specify_workflow_listas a focused follow-up to #5054 for #4913.workflow.listas MCP-available while preserving the existing six tools.The shared operation performs no filesystem writes, network requests, or subprocess execution.
Refs #4913.
Testing
uv run specify --helpuv sync --extra testFull WSL result: 12,782 passed, 440 skipped, 38 failed. All 38 failures reproduced on unchanged upstream
27d14e2; they concern PowerShell interoperability, paths containing spaces, and test download executables. No patch regression was identified in that comparison.Additional validation:
git diff --checkpassed.invalid_operation_resultmapping.AI Disclosure
AI disclosure: OpenAI Codex (GPT-6.1 sol, autonomous execution under user direction) assisted with source investigation, implementation, test and documentation generation, automated review, validation, and drafting this PR description. Reasoning effort was not independently recorded. No line-by-line human review is claimed.