Class DataSenseUtils
java.lang.Object
com.mulesoft.connectors.mcp.internal.design.datasense.DataSenseUtils
Datasense related utilities
- Since:
- 0.1.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceContains resolver categories -
Method Summary
Modifier and TypeMethodDescriptionstatic org.mule.metadata.api.model.ObjectTypecopyFieldsOnNewJavaObject(org.mule.metadata.api.model.ObjectType schema, org.mule.metadata.api.builder.BaseTypeBuilder baseTypeBuilder) Returns a newObjectTypewithMetadataFormat.JAVAformat containing all the fields defined inschemastatic io.modelcontextprotocol.spec.McpSchema.ListToolsResultqueryTools(io.modelcontextprotocol.client.McpAsyncClient client, String cursor) Fetches tools from a remote server, using the givencursoras a page locator
-
Method Details
-
queryTools
public static io.modelcontextprotocol.spec.McpSchema.ListToolsResult queryTools(io.modelcontextprotocol.client.McpAsyncClient client, String cursor) throws org.mule.runtime.api.metadata.MetadataResolvingException Fetches tools from a remote server, using the givencursoras a page locator- Parameters:
client- an MCP clientcursor- the next page cursor,nullto get the first one- Returns:
- a
McpSchema.ListToolsResult - Throws:
org.mule.runtime.api.metadata.MetadataResolvingException
-
copyFieldsOnNewJavaObject
public static org.mule.metadata.api.model.ObjectType copyFieldsOnNewJavaObject(org.mule.metadata.api.model.ObjectType schema, org.mule.metadata.api.builder.BaseTypeBuilder baseTypeBuilder) Returns a newObjectTypewithMetadataFormat.JAVAformat containing all the fields defined inschema- Parameters:
schema- the source schemabaseTypeBuilder- the type builder used to create the newObjectType- Returns:
- a new
ObjectType
-