docs(spec): document MCP 1.4.0 error extraction from content[0].text in MCPToolAdapter
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 26s
CI / build (pull_request) Successful in 23s
CI / push-validation (pull_request) Successful in 34s
CI / quality (pull_request) Successful in 40s
CI / helm (pull_request) Successful in 42s
CI / typecheck (pull_request) Successful in 55s
CI / security (pull_request) Successful in 59s
CI / e2e_tests (pull_request) Successful in 3m6s
CI / integration_tests (pull_request) Successful in 4m9s
CI / unit_tests (pull_request) Successful in 5m59s
CI / docker (pull_request) Successful in 16s
CI / coverage (pull_request) Successful in 10m24s
CI / status-check (pull_request) Successful in 1s
CI / benchmark-regression (pull_request) Successful in 58m31s
CI / lint (push) Successful in 30s
CI / push-validation (push) Successful in 24s
CI / build (push) Successful in 29s
CI / helm (push) Successful in 29s
CI / typecheck (push) Successful in 58s
CI / quality (push) Successful in 51s
CI / security (push) Successful in 1m14s
CI / e2e_tests (push) Successful in 3m10s
CI / integration_tests (push) Successful in 4m4s
CI / unit_tests (push) Successful in 5m26s
CI / docker (push) Successful in 22s
CI / coverage (push) Successful in 10m28s
CI / status-check (push) Successful in 1s
CI / benchmark-regression (push) Has been skipped
CI / benchmark-publish (push) Successful in 1h17m4s

The MCPToolAdapter execute() section now documents the MCP 1.4.0 error
response protocol: when isError is true, the error message is extracted
from content[0].text rather than a non-standard top-level error key.
Falls back to 'unknown error' when content is absent or malformed.

This aligns the spec with the implementation fix in PR #2600 and the
approved proposal in issue #3330.

ISSUES CLOSED: #3330
This commit was merged in pull request #3390.
This commit is contained in:
2026-04-05 16:22:35 +00:00
committed by CleverThis
parent 51aab18411
commit 87d1a64cf2
+1
View File
@@ -22063,6 +22063,7 @@ Bridges external MCP servers into the tool model:
- Creates a checkpoint if the tool is marked checkpointable
After the MCP tool returns its `content[]` response, the adapter:
- **Error detection**: If `isError: true` is present in the response, the error message is extracted from `content[0].text` per the MCP 1.4.0 protocol (the non-standard top-level `error` key is not used). Falls back to `"unknown error"` when `content` is absent or malformed.
- Parses the result into the CleverAgents `Result` format
- Records any resource mutations as `Change` objects in the plan's `ChangeSet`