Harden tool endpoint origin validation and source fingerprinting
All checks were successful
Deploy Gateway / deploy (push) Successful in 2m45s
All checks were successful
Deploy Gateway / deploy (push) Successful in 2m45s
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
"content": [
|
||||
{
|
||||
"type": "text",
|
||||
"text": "customer.search@1.0.0: timed out"
|
||||
"text": "{\"reasonCode\":\"TOOL_TIMEOUT\",\"message\":\"Tool execution timed out.\"}"
|
||||
}
|
||||
],
|
||||
"isError": true
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
"id": 3,
|
||||
"error": {
|
||||
"code": -32602,
|
||||
"message": "Invalid params: 'query' is required"
|
||||
"message": "Invalid params",
|
||||
"data": {
|
||||
"reasonCode": "INVALID_PARAMS",
|
||||
"message": "Request parameters are invalid."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
|
||||
## tools/call 성공·오류 응답 기준
|
||||
|
||||
Agent Builder는 HTTP 상태만으로 성공 여부를 판단하지 않고 JSON-RPC body의 최상위 `result` 또는 `error`를 확인해야 한다. 일반적인 JSON-RPC 요청 오류는 HTTP `200 OK`와 함께 최상위 `error`로 반환될 수 있다. `-32602`의 `error.message`는 `Invalid params: <상세 원인>` 형식이며, 예를 들어 필수 `query`가 없으면 `Invalid params: 'query' is required`를 반환한다. 선택적인 `error.data`에는 `guid`와 상세 원인을 추가로 담을 수 있다. 단, `MCP-Protocol-Version` 누락·미지원처럼 HTTP transport 단계에서 거부된 요청은 HTTP `400 Bad Request`다.
|
||||
Agent Builder는 HTTP 상태만으로 성공 여부를 판단하지 않고 JSON-RPC body의 최상위 `result` 또는 `error`를 확인해야 한다. 일반적인 JSON-RPC 요청 오류는 HTTP `200 OK`와 함께 최상위 `error`로 반환될 수 있다. `-32602`의 `error.message`는 내부 검증 내용을 노출하지 않는 `Invalid params`이며, `error.data.reasonCode`와 `error.data.message`에는 Agent Builder가 안전하게 처리할 수 있는 정형화된 공개 오류 정보가 담긴다. 단, `MCP-Protocol-Version` 누락·미지원처럼 HTTP transport 단계에서 거부된 요청은 HTTP `400 Bad Request`다.
|
||||
|
||||
| 상황 | HTTP 상태 | JSON-RPC body | `isError` | 현재 구현의 처리 주체 |
|
||||
|---|---:|---|---|---|
|
||||
|
||||
Reference in New Issue
Block a user