Releases: dart-lang/ai
Releases · dart-lang/ai
package:dart_mcp v0.3.3
- Fix
PingRequesthandling when it is sent from a non-Dart client. - Deprecate
ElicitationAction.rejectand replace it with
ElicitationAction.decline.- In the initial elicitations schema this was incorrectly listed as
reject. - This package still allows
rejectand treats it as an alias fordecline. - The old
rejectenum value was replaced with a static constant equal
exactly todecline, so switches are not affected.
- In the initial elicitations schema this was incorrectly listed as
- Add
titleparameter toPromptconstructor.
package:dart_mcp v0.3.2
- Deprecate the
EnumSchematype in favor of theStringSchemawith an
enumValuesparameter. TheEnumSchematype was not MCP spec compatible.- Also deprecated the associated JsonType.enumeration which doesn't exist
in the JSON schema spec.
- Also deprecated the associated JsonType.enumeration which doesn't exist
package:dart_mcp v0.3.1
- Fixes communication problem when a
MCPServeris instantiated without
instructions. - Fix the
contentargument toPromptMessageto be a singleContentobject. - Add new
package:dart_mcp/stdio.dartlibrary with astdioChannelutility
for creating a stream channel that separates messages by newlines. - Added more examples.
- Deprecated the
WithElicitationHandlerinterface - the method this required
is now defined directly on theElicitationSupportmixin which matches the
pattern used by other mixins in this package. - Change the
schemaparameter for elicitation requests to anObjectSchemato
match the spec. - Deprecate the
Elicitationsserver capability, this doesn't exist in the spec.
package:dart_mcp v0.3.0
- Added error checking to required fields of all
Requestsubclasses so that
they will throw helpful errors when accessed and not set. - Added enum support to Schema.
- Add more detail to type validation errors.
- Remove some duplicate validation errors, errors are only reported for the
leaf nodes and not all the way up the tree.- Deprecated a few validation error types as a part of this, including
propertyNamesInvalid,propertyValueInvalid,itemInvalidand
prefixItemInvalid.
- Deprecated a few validation error types as a part of this, including
- Added a
customvalidation error type. - Breaking: Auto-validate schemas for all tools by default. This can be
disabled by passingvalidateArguments: falsetoregisterTool. - Updates to the latest MCP spec, 2025-06-08
- Adds support for Elicitations to allow the server to ask the user questions.
- Adds
ResourceLinkas a tool return content type. - Adds support for structured tool output.
- Breaking: Change
MCPClient.connectStdioServersignature to accept stdin
and stdout streams instead of starting processes itself. This enables custom
process spawning (such as using package:process), and also enables the client
to run in browser environments. - Fixed a problem where specifying
--log-filewould cause the server to stop
working.
package:dart_mcp v0.2.2
- Refactor
ClientImplementationandServerImplementationto the shared
Implementationtype to match the spec. The old names are deprecated but will
still work until the next breaking release. - Add
clientInfofield toMCPServer, assigned during initialization. - Move the
donefuture from theServerConnectionintoMCPBaseso it is
available to theMPCServerclass as well.
package:dart_mcp v0.2.1
- Fix the
protocolLogSinksupport when usingMCPClient.connectStdioServer. - Update workflow example to show thinking spinner and input and output token
usage. - Update file system example to support relative paths.
- Fix a bug in notification handling where leaving off the parameters caused a
type exception. - Added
--help,--log, and--modelflags to the workflow example. - Fixed a bug where the examples would only connect to a server with the latest
protocol version. - Handle failed calls to
listRootsin theRootsTrackingSupportmixin more
gracefully. Previously this would leave therootsfuture hanging
indefinitely, but now it will log an error and set the roots to empty. - Added validation for Schema extension.
- Fixed an issue where getting the type of a Schema with a null type would
throw.
package:dart_mcp v0.2.0
- Support protocol version 2025-03-26.
- Adds support for
AudioContent. - Adds support for
ToolAnnotations. - Adds support for
ProgressNotificationmessages.
- Adds support for
- Save the
ServerCapabilitiesobject on theServerConnectionclass to make
it easier to check the capabilities of the server. - Add default version negotiation logic.
- Save the negotiated
ProtocolVersionin aprotocolVersionfield for both
MCPServerand theServerConnectionclasses. - Automatically disconnect from servers if version negotiation fails.
- Save the negotiated
- Added support for adding and listing
ResourceTemplates.- Handlers have to handle their own matching of templates.
- Added a
RootsTrackingSupportserver mixin which can be used to keep an
updated list of the roots set by the client. - Added default throttling with a 500ms delay for
ResourceListChangedNotifications andResourceUpdatedNotifications. The
delay can be modified by overriding
ResourcesSupport.resourceUpdateThrottleDelay. - Add
Sink<String> protocolLogSinkparameters to server constructor and client
connection methods, which can be used to capture protocol messages for
debugging purposes. - Only send notifications if the peer is still connected. Fixes issues where
notifications are delayed due to throttling and the client has since closed. - Breaking: Fixed paginated result subtypes to use
nextCursorinstead of
cursoras the key for the next cursor. - Breaking: Change the
ProgressNotification.progressand
ProgressNotification.totaltypes tonuminstead ofintto align with the
spec. - Breaking: Change the
protocolVersionstring to aProtocolVersionenum,
which has all supported versions and whether or not they are supported. - Breaking: Change
InitializeRequestandInitializeResultto take a
ProtocolVersioninstead of a string. - Breaking: Change the
InitializeResult'sinstructionstoString?to reflect
that not all servers return instructions. - Breaking: Change
MCPBaseto accept aStreamChannel<String>instead of
aPeer, and construct its ownPeer. - Breaking: Add
protocolLogSinkoptional parameter to connect methods on
MCPClient. - Breaking: Move
channelparameter onMCPServer.newto a positional
parameter for consistency.
package:dart_mcp v0.1.0
- Initial release, supports all major MCP functionality for both clients and
servers, at protocol version 2024-11-05. - APIs may change frequently until the 1.0.0 release based on feedback and
needs.