fix(mcp): remove legacy ingest upload tools
Remove the old chunked upload MCP tools from the remote tool surface so agents only see the simplified upload paths: HTTP multipart and ingest_file_base64. Update docs and agent rules to stop advertising the chunked fallback while keeping staged uploads outside the vault and behind the existing ingest gate. Validation: python3 -m unittest discover -v; python3 -m py_compile obsidian_wiki/mcp_server.py tests/test_mcp_server_remote.py; git diff --check
This commit is contained in:
@@ -402,14 +402,11 @@ This adds write-capable MCP tools to the same `wiki-file-assets` server and bear
|
||||
|
||||
- `get_ingest_upload_instructions` — returns the preferred upload methods, HTTP endpoint path, fields, limits, and curl example for remote agents.
|
||||
- `ingest_file_base64` — uploads one complete base64 file and optionally starts the local OpenCode ingest job; useful for small files or MCP clients that cannot make multipart HTTP requests.
|
||||
- `create_ingest_upload` — reserves a controlled runtime staging path for one uploaded file.
|
||||
- `append_ingest_upload_chunk` — appends base64 file chunks; defaults to 4MB decoded chunks.
|
||||
- `complete_ingest_upload` — verifies declared size and SHA-256.
|
||||
- `check_ingest_opencode_readiness` — verifies the local OpenCode binary, required run flags, project ingest skills, and optionally runs a no-write smoke test that confirms `wiki-ingest` can be loaded.
|
||||
- `start_ingest_job` — queues a local `opencode run --auto --format json` job with a fixed `/wiki-ingest` prompt for the completed uploads.
|
||||
- `get_ingest_job_status`, `get_ingest_job_result`, `cancel_ingest_job` — inspect or cancel the local job.
|
||||
|
||||
For binary files, prefer the HTTP upload endpoint over manual chunk tools:
|
||||
For binary files, use the HTTP upload endpoint:
|
||||
|
||||
```bash
|
||||
curl -H "Authorization: Bearer <long-random-token>" \
|
||||
@@ -420,7 +417,7 @@ curl -H "Authorization: Bearer <long-random-token>" \
|
||||
http://127.0.0.1:8765/mcp-ingest/uploads
|
||||
```
|
||||
|
||||
The endpoint accepts repeated `files` fields plus optional `project`, `doc_type_hint`, `note`, and `start_job` fields. It uses the same bearer token as `/mcp`; there is no second token to manage. Keep `create_ingest_upload` / `append_ingest_upload_chunk` / `complete_ingest_upload` as a fallback for MCP clients that cannot call the HTTP endpoint and cannot send a complete base64 file in one tool call.
|
||||
The endpoint accepts repeated `files` fields plus optional `project`, `doc_type_hint`, `note`, and `start_job` fields. It uses the same bearer token as `/mcp`; there is no second token to manage. For MCP clients that cannot make HTTP multipart requests, use `ingest_file_base64` for small files.
|
||||
|
||||
Run `check_ingest_opencode_readiness` before the first remote upload. Use `run_smoke_test: true` when you want OpenCode itself to prove it can load the project `wiki-ingest` skill; otherwise the static preflight is also run automatically before every `start_ingest_job`.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user