Introduce the Appwrite operator workflow and refresh CI#40
Conversation
Greptile SummaryThis PR replaces the flat hundreds-of-tools MCP surface with a compact two-tool operator workflow ( Confidence Score: 5/5Safe to merge; only P2 findings remain, all prior P0/P1 concerns from earlier review rounds have been addressed in this revision. The architectural change is coherent and well-tested. The two remaining findings are P2: a silent argument-collision edge case in src/mcp_server_appwrite/operator.py ( Important Files Changed
Reviews (2): Last reviewed commit: "Address PR feedback and bump release to ..." | Re-trigger Greptile |
|
Tip: Greploop — Automatically fix all review issues by running Use the Greptile plugin for Claude Code to query reviews, search comments, and manage custom context directly from your terminal. |
Summary
This PR fundamentally changes how the Appwrite MCP server is exposed to MCP clients.
Instead of surfacing the full reflected Appwrite SDK as hundreds of top-level MCP tools, the server now presents a compact operator-style workflow and keeps the raw Appwrite catalog internal. The model interacts through search and explicit tool invocation rather than selecting from an overloaded public tool list.
In parallel, this PR refreshes the local/runtime behavior around startup, argument handling, formatting, and CI so the new operator flow is testable and maintainable.
What changed
1. Introduce a native Appwrite operator surface
The public MCP surface is now reduced to:
appwrite_search_toolsappwrite_call_toolThe full Appwrite tool catalog is still generated internally from the SDK, but it is no longer exposed directly as the primary client-facing surface. The operator layer:
confirm_write=truefor mutating callsappwrite://operator/...namespaceThis is the main architectural change in the PR.
2. Simplify server startup and runtime behavior
The server no longer supports service-selection or mode flags. It now has a single default behavior built around the operator workflow.
Other runtime changes included in this PR:
.envfrom the current working directory for local development3. Improve tool argument handling
A significant source of friction was the mismatch between Appwrite API response fields and SDK method parameter names.
This PR adds normalization at the MCP boundary so hidden tool calls can accept:
rowSecurity,fileSecurity, andmaximumFileSize$permissions$idto*_idmapping when it is unambiguousThe execution path now also fails early with clearer validation errors for unsupported copied response fields instead of leaking Python
unexpected keyword argumenterrors from the SDK.4. Improve search behavior for write tools
The original operator search behavior made mutating tools hard to discover unless the caller already knew the required parameter names.
This PR updates the search/ranking logic so:
include_mutatingargument_hintswere providedThis makes queries like
create functionorcreate string columnresolve to the expected Appwrite write tools.5. Rework tests into unit and integration layers
The old layout was restructured to separate fast local coverage from live Appwrite coverage:
tests/unitnow holds the fast always-on teststests/integrationnow holds the live Appwrite integration suiteThe integration tests are organized per service rather than as one monolithic script. The old long-running surface-matrix script used for local exploration was removed from the repo.
6. Add formatting and refresh CI
This PR adds
blackas the formatter for the repo and introduces a general CI workflow.The workflow now has separate jobs for:
The older publish-only workflow file was replaced by a general
ci.yml, and the MCP Registry publish job was removed.Behavior changes / migration notes
This PR is intentionally not backward-compatible in a few areas:
appwrite_search_tools->appwrite_call_tool)confirm_write=trueIf there are existing MCP client configs or prompts that rely on the old raw-tool behavior or removed flags, they will need to be updated.
Testing
Verified locally with:
uv run python -m unittest discover -s tests/unit -vuv run --group dev black src testsLive Appwrite integration coverage was also exercised during development, and the repo now contains the reorganized
tests/integrationsuite for that path.