@elizaos/plugin-mcp 1.3.4 → 1.3.5

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
@@ -804,7 +804,9 @@ function buildMcpProviderData(servers) {
804
804
  }
805
805
  }
806
806
  return {
807
- values: { mcp: mcpData },
807
+ values: { mcp: mcpData, mcpText: `# MCP Configuration
808
+
809
+ ${textContent}` },
808
810
  data: { mcp: mcpData },
809
811
  text: `# MCP Configuration
810
812
 
@@ -927,6 +929,7 @@ async function handleToolResponse(runtime2, message, serverName, toolName, toolA
927
929
  attachments: hasAttachments && attachments.length > 0 ? attachments : undefined
928
930
  });
929
931
  }
932
+ return replyMemory;
930
933
  }
931
934
  async function sendInitialResponse(callback) {
932
935
  if (callback) {
@@ -1496,15 +1499,16 @@ var callToolAction = {
1496
1499
  ${JSON.stringify(toolSelectionArgument, null, 2)}`);
1497
1500
  const result = await mcpService.callTool(serverName, toolName, toolSelectionArgument.toolArguments);
1498
1501
  const { toolOutput, hasAttachments, attachments } = processToolResult(result, serverName, toolName, runtime2, message.entityId);
1499
- await handleToolResponse(runtime2, message, serverName, toolName, toolSelectionArgument.toolArguments, toolOutput, hasAttachments, attachments, composedState, mcpProvider, callback);
1502
+ const replyMemory = await handleToolResponse(runtime2, message, serverName, toolName, toolSelectionArgument.toolArguments, toolOutput, hasAttachments, attachments, composedState, mcpProvider, callback);
1500
1503
  return {
1501
- text: `Successfully called tool: ${serverName}/${toolName}`,
1504
+ text: `Successfully called tool: ${serverName}/${toolName}. Reasoned response: ${replyMemory.content.text}`,
1502
1505
  values: {
1503
1506
  success: true,
1504
1507
  toolExecuted: true,
1505
1508
  serverName,
1506
1509
  toolName,
1507
- hasAttachments
1510
+ hasAttachments,
1511
+ output: toolOutput
1508
1512
  },
1509
1513
  data: {
1510
1514
  actionName: "CALL_MCP_TOOL",
@@ -1785,7 +1789,7 @@ class McpService extends Service {
1785
1789
  connections = new Map;
1786
1790
  connectionStates = new Map;
1787
1791
  mcpProvider = {
1788
- values: { mcp: {} },
1792
+ values: { mcp: {}, mcpText: "" },
1789
1793
  data: { mcp: {} },
1790
1794
  text: ""
1791
1795
  };
@@ -2293,4 +2297,4 @@ export {
2293
2297
  BACKOFF_MULTIPLIER
2294
2298
  };
2295
2299
 
2296
- //# debugId=F41455B1DFF6929364756E2164756E21
2300
+ //# debugId=7FE3B98268562B6664756E2164756E21