Wrap each request in a service scope (#276)
* Wrap each request in a service scope * Change request/notification delegates to return ValueTask * Address feedback
This commit is contained in:
parent
f1cc2d81de
commit
f4c87f5e2f
1 changed files with 477 additions and 306 deletions
|
|
@ -150,7 +150,7 @@ public abstract class McpServerTool : IMcpServerPrimitive
|
|||
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
|
||||
/// <returns>The call response from invoking the tool.</returns>
|
||||
/// <exception cref="ArgumentNullException"><paramref name="request"/> is <see langword="null"/>.</exception>
|
||||
public abstract Task<CallToolResponse> InvokeAsync(
|
||||
public abstract ValueTask<CallToolResponse> InvokeAsync(
|
||||
RequestContext<CallToolRequestParams> request,
|
||||
CancellationToken cancellationToken = default);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue