19namespace mcp::server {
37 std::optional<protocol::TaskRequestParameters>
task;
Cooperative cancellation primitives shared by SDK lifecycle APIs.
Copyable token observed by cancellation-aware SDK operations.
Definition cancellation.hpp:104
bool cancelled() const noexcept
Returns true after the associated source has requested cancellation.
Definition cancellation.hpp:117
Non-owning handle for the client associated with a server session.
Definition peer.hpp:46
Completion request and result payloads.
Prompt discovery and rendering payloads.
nlohmann::json Json
JSON value type used by all protocol DTOs.
Definition types.hpp:28
Resource listing, template, subscription, and read payloads.
Server-side handle for sending requests and notifications to a client peer.
SessionClient session_client(const SessionContext &context) noexcept
Create a SessionClient handle from a session context.
Definition peer.hpp:870
Parameters for completion/complete.
Definition completion.hpp:98
Completion request context passed to typed completion handlers.
Definition context.hpp:76
protocol::CompleteParams params
Parsed completion/complete request parameters.
Definition context.hpp:78
CancellationToken cancellation
Cooperative cancellation token for this request.
Definition context.hpp:80
bool cancelled() const noexcept
Convenience check for cancellation-aware completion handlers.
Definition context.hpp:83
Invocation context passed to prompt handlers.
Definition context.hpp:46
SessionClient client() const noexcept
Return a non-owning peer handle for this invocation's client.
Definition context.hpp:48
bool cancelled() const noexcept
Convenience check for cancellation-aware handlers.
Definition context.hpp:56
protocol::Json arguments
JSON arguments supplied with the prompt request.
Definition context.hpp:51
CancellationToken cancellation
Cooperative cancellation token for this request.
Definition context.hpp:53
Invocation context passed to resource read handlers.
Definition context.hpp:60
CancellationToken cancellation
Cooperative cancellation token for this request.
Definition context.hpp:69
std::string uri
Requested resource URI.
Definition context.hpp:65
protocol::Json params
Raw resource read parameters supplied by the client.
Definition context.hpp:67
bool cancelled() const noexcept
Convenience check for cancellation-aware handlers.
Definition context.hpp:72
SessionClient client() const noexcept
Return a non-owning peer handle for this invocation's client.
Definition context.hpp:62
Per-message connection metadata supplied to server handlers.
Definition transport.hpp:42
Invocation context passed to tool handlers.
Definition context.hpp:30
protocol::Json arguments
JSON arguments supplied with the tool call.
Definition context.hpp:35
bool cancelled() const noexcept
Convenience check for cancellation-aware handlers.
Definition context.hpp:42
SessionClient client() const noexcept
Return a non-owning peer handle for this invocation's client.
Definition context.hpp:32
std::optional< protocol::TaskRequestParameters > task
Optional task request metadata supplied with the tool call.
Definition context.hpp:37
CancellationToken cancellation
Cooperative cancellation token for task-aware executions.
Definition context.hpp:39
Asynchronous task status and task-management payloads.