listConnectanumToolsDirect method
Lists Connectanum JSON tools from the direct API catalog.
Implementation
Future<McpStreamableToolListPage> listConnectanumToolsDirect({
Object? id,
String? cursor,
String? protocolVersion,
Map<String, String> headers = const <String, String>{},
}) async {
const method = 'connectanum.tools.list';
final requestGeneration = _claimToolCatalogRequestGeneration();
final response = await request(
method,
id: id,
params: _cursorParams(cursor),
streamable: false,
includeSession: false,
protocolVersion: protocolVersion,
headers: headers,
);
final result = _jsonRpcResultFrom(response, method: method);
final catalogTools = _validatedToolCatalogEntries(
_jsonMapListFrom(
result,
key: 'tools',
method: method,
label: '$method result tool',
),
label: '$method result tool',
);
final nextCursor = _nextCursorFrom(result, method: method);
final tools = _rememberToolHeaderParameters(
catalogTools,
requestGeneration: requestGeneration,
);
return McpStreamableToolListPage(tools: tools, nextCursor: nextCursor);
}