Skip to content

Commit edd348a

Browse files
committed
Remove xref for OperationCanceledException
1 parent a079c0f commit edd348a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/concepts/tools/tools.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ Tool errors in MCP are distinct from protocol errors. When a tool encounters an
195195

196196
#### Automatic exception handling
197197

198-
When a tool method throws an exception, the server automatically catches it and returns a `CallToolResult` with `IsError = true`. <xref:ModelContextProtocol.McpProtocolException> is re-thrown as a JSON-RPC error, and <xref:System.OperationCanceledException> is re-thrown when the cancellation token was triggered. All other exceptions are returned as tool error results. For <xref:ModelContextProtocol.McpException> subclasses, the exception message is included in the error text; for other exceptions, a generic message is returned to avoid leaking internal details.
198+
When a tool method throws an exception, the server automatically catches it and returns a `CallToolResult` with `IsError = true`. <xref:ModelContextProtocol.McpProtocolException> is re-thrown as a JSON-RPC error, and `OperationCanceledException` is re-thrown when the cancellation token was triggered. All other exceptions are returned as tool error results. For <xref:ModelContextProtocol.McpException> subclasses, the exception message is included in the error text; for other exceptions, a generic message is returned to avoid leaking internal details.
199199

200200
```csharp
201201
[McpServerTool, Description("Divides two numbers")]

0 commit comments

Comments
 (0)