ReadResourceResponse extension type
A response to a resources/read request, which is either a
ReadResourceResult or an InputRequiredResult.
Check isInputRequired and then cast to one of those.
This type is not intended to be constructed directly and thus has no public constructor.
- on
- Implemented types
- Implementers
Properties
- isInputRequired → bool
-
Whether the server asked for more input before it can answer, which makes
this an InputRequiredResult.
no setterinherited
- meta → Meta?
-
The
_metaproperty/parameter is reserved by MCP to allow clients and servers to attach additional metadata to their interactions.no setterinherited - resultType → String
-
The type of this result, which determines how to parse it.
no setterinherited
Constants
-
inputRequiredResult
→ const InputRequiredResult Function({Map<
String, InputRequest> ? inputRequests, Meta? meta, String? requestState}) - A result that requires further input from the client.
-
readResourceResult
→ const ReadResourceResult Function({CacheScope? cacheScope, required List<
ResourceContents> contents, Meta? meta, int? ttlMs}) - A complete result with no input required.