@mastra/client-js 1.17.0-alpha.3 → 1.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -5252,6 +5252,27 @@ var MastraClient = class extends BaseResource {
5252
5252
  getMcpServerTool(serverId, toolId) {
5253
5253
  return new MCPTool(this.options, serverId, toolId);
5254
5254
  }
5255
+ /**
5256
+ * Lists resources available on an MCP server.
5257
+ * @param serverId - The ID of the MCP server.
5258
+ * @returns Promise containing the list of resources.
5259
+ */
5260
+ getMcpServerResources(serverId) {
5261
+ return this.request(`/mcp/${encodeURIComponent(serverId)}/resources`);
5262
+ }
5263
+ /**
5264
+ * Reads the content of a resource from an MCP server.
5265
+ * Used for fetching ui:// MCP App HTML content.
5266
+ * @param serverId - The ID of the MCP server.
5267
+ * @param uri - The resource URI to read.
5268
+ * @returns Promise containing the resource content.
5269
+ */
5270
+ readMcpServerResource(serverId, uri) {
5271
+ return this.request(`/mcp/${encodeURIComponent(serverId)}/resources/read`, {
5272
+ method: "POST",
5273
+ body: { uri }
5274
+ });
5275
+ }
5255
5276
  /**
5256
5277
  * Gets an A2A client for interacting with an agent via the A2A protocol
5257
5278
  * @param agentId - ID of the agent to interact with