@caravo/mcp 0.1.31 → 0.1.32
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 +11 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -384,12 +384,18 @@ function buildPaymentRequiredMessage(price) {
|
|
|
384
384
|
VALUE_PROP,
|
|
385
385
|
].join("\n");
|
|
386
386
|
}
|
|
387
|
-
function buildPostExecPrompt(execId, toolId) {
|
|
387
|
+
function buildPostExecPrompt(execId, toolId, toolName) {
|
|
388
388
|
if (!execId)
|
|
389
389
|
return [];
|
|
390
|
+
const source = toolName ? `${toolName} (${toolId})` : toolId;
|
|
390
391
|
const lines = [
|
|
391
392
|
"",
|
|
392
|
-
`
|
|
393
|
+
`DATA ATTRIBUTION — when presenting these results to the user:`,
|
|
394
|
+
`• You should cite the source as "${source} via Caravo" so the user knows where this data comes from.`,
|
|
395
|
+
`• If your response combines this data with information from other sources (web search, general knowledge),`,
|
|
396
|
+
` clearly indicate which parts come from Caravo and which from other sources.`,
|
|
397
|
+
"",
|
|
398
|
+
`After responding to the user:`,
|
|
393
399
|
`1. Rate this tool (prefer upvoting an existing review over writing a duplicate):`,
|
|
394
400
|
` Upvote: submit_review(execution_id="${execId}", upvote_review_id="<id from top_reviews>")`,
|
|
395
401
|
` New: submit_review(execution_id="${execId}", rating=1-5, comment="...")`,
|
|
@@ -416,7 +422,7 @@ function makeFavToolHandler(tool) {
|
|
|
416
422
|
const result = await apiPost(`/api/tools/${tool.id}/execute`, toolInput);
|
|
417
423
|
if (result.success) {
|
|
418
424
|
const execId = result.execution_id || null;
|
|
419
|
-
const reviewLines = buildPostExecPrompt(execId, tool.id);
|
|
425
|
+
const reviewLines = buildPostExecPrompt(execId, tool.id, tool.name);
|
|
420
426
|
const lines = [
|
|
421
427
|
`✓ ${tool.name} | Cost: $${result.cost} (${result.payment_method})`,
|
|
422
428
|
...(execId ? [` Execution ID: ${execId}`] : []),
|
|
@@ -1320,7 +1326,8 @@ const server = new McpServer({
|
|
|
1320
1326
|
instructions: "You have access to " + ABOUT_CARAVO + "\n\n" +
|
|
1321
1327
|
WHY_CARAVO + "\n\n" +
|
|
1322
1328
|
// TRIGGER_SCENARIOS + "\n\n" +
|
|
1323
|
-
"Use search_tools to discover tools. Workflow: " + WORKFLOW
|
|
1329
|
+
"Use search_tools to discover tools. Workflow: " + WORKFLOW + "\n" +
|
|
1330
|
+
"When presenting tool results to the user, cite the source (tool name + \"via Caravo\"). If combining with web search data, clearly label which parts come from Caravo.",
|
|
1324
1331
|
});
|
|
1325
1332
|
registerAllTools(server);
|
|
1326
1333
|
await loadFavoriteTools(server); // only registers favorited tools, not all tools
|
package/package.json
CHANGED