DVMcpClient class
Consumes an external MCP server.
adoptTools registers the peer's tools into Dartvel's own registry, so an agent run calls them exactly like a local tool.
Constructors
- DVMcpClient(DVMcpTransport transport)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- transport → DVMcpTransport
-
final
Methods
-
adoptTools(
{String prefix = 'mcp.'}) → Future< List< String> > - Registers the peer's tools into Dartvel's registry.
-
callTool(
String name, [DVJsonObject arguments = const <String, DVJsonValue>{}]) → Future< DVJsonValue> - Calls one of the peer's tools.
-
close(
) → Future< void> -
initialize(
{String clientName = 'dartvel', String clientVersion = '1.0.0'}) → Future< Map< String, Object?> > - Handshakes with the peer and returns its server info.
-
listTools(
) → Future< List< Map< >String, Object?> > - The peer's tools, as advertised.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited