StubMcpPort class

Stub MCP port for testing.

Implemented types

Constructors

StubMcpPort()
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

callTool(String name, Map<String, dynamic> arguments, {String? serverId}) Future<ToolResult>
Call a tool on the specified server (or the default server).
override
getPrompt(String name, {String? serverId, Map<String, dynamic>? arguments}) Future<PromptTemplate?>
Get a prompt template by name.
override
isConnected({String? serverId}) Future<bool>
Check whether the port is connected to a server.
override
listResources({String? serverId}) Future<List<ResourceInfo>>
List resources available on the specified server (or all servers).
override
listTools({String? serverId}) Future<List<ToolInfo>>
List tools available on the specified server (or all servers).
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
readResource(String uri, {String? serverId}) Future<ResourceContent>
Read a resource from the specified server.
override
subscribeResource(String uri, {String? serverId}) Stream<ResourceContent>?
Subscribe to resource changes.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited