[Doc] Fix server_context description for Exception Reporting
## Motivation and Context
The README's Exception Reporting section claimed that `server_context` includes
`{ tool_name: "name", arguments: { ... } }` for tool calls. This matched
the implementation in 0.3.0 through 0.5.0, but the `{ tool_name:, arguments: }`
context was removed in 0.5.1 when exception reporting was consolidated into
the centralized `{ request: request }` path. The README was never updated to reflect this.
`Server#report_exception` is now only called with `{ request: request }`
(from `handle_request`) or `{ notification: "..." }` (from notification delivery rescues),
and tool call failures flow through the `{ request: ... }` path after being wrapped in
a `RequestHandlerError`.
The stale description misled users into expecting `tool_name` and `arguments`
in their exception reporter callbacks.
## How Has This Been Tested?
Documentation-only change. No behavioral modification.
## Breaking Changes
None.
This commit is contained in:
parent
cf44475ce9
commit
8c91130451
1 changed files with 3 additions and 3 deletions
|
|
@ -423,10 +423,10 @@ The exception reporter receives two arguments:
|
|||
- `exception`: The Ruby exception object that was raised
|
||||
- `server_context`: A hash containing contextual information about where the error occurred
|
||||
|
||||
The server_context hash includes:
|
||||
The `server_context` hash includes:
|
||||
|
||||
- For tool calls: `{ tool_name: "name", arguments: { ... } }`
|
||||
- For general request handling: `{ request: { ... } }`
|
||||
- For request handling failures: `{ request: { ... } }` (the raw JSON-RPC request hash)
|
||||
- For notification delivery failures: `{ notification: "tools_list_changed" }` (or the relevant notification name)
|
||||
|
||||
When an exception occurs:
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue