@oneshot-agent/mcp-server 0.13.0 → 0.14.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 +1 -1
- package/dist/tools/analytics.d.ts +2 -0
- package/dist/tools/analytics.js +32 -6
- package/dist/tools/index.js +3 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -26,7 +26,7 @@ async function main() {
|
|
|
26
26
|
// Create MCP server
|
|
27
27
|
const server = new Server({
|
|
28
28
|
name: "oneshot-mcp",
|
|
29
|
-
version: "0.
|
|
29
|
+
version: "0.14.0", // keep in sync with package.json; guarded by version.test.ts
|
|
30
30
|
}, {
|
|
31
31
|
capabilities: {
|
|
32
32
|
tools: {},
|
|
@@ -4,7 +4,9 @@ export declare const spendBreakdownTool: Tool;
|
|
|
4
4
|
export declare const rocsTool: Tool;
|
|
5
5
|
export declare const receiptsListTool: Tool;
|
|
6
6
|
export declare const tagReceiptValueTool: Tool;
|
|
7
|
+
export declare const rocsByGoalTool: Tool;
|
|
7
8
|
export declare function handleSpendBreakdown(agent: OneShot, args: Record<string, unknown>): Promise<import("@oneshot-agent/sdk").SpendBreakdown>;
|
|
8
9
|
export declare function handleRocs(agent: OneShot, args: Record<string, unknown>): Promise<import("@oneshot-agent/sdk").RoCSResult>;
|
|
9
10
|
export declare function handleReceiptsList(agent: OneShot, args: Record<string, unknown>): Promise<import("@oneshot-agent/sdk").ReceiptsListResult>;
|
|
11
|
+
export declare function handleRocsByGoal(agent: OneShot, args: Record<string, unknown>): Promise<import("@oneshot-agent/sdk").RoCSByGoalResult>;
|
|
10
12
|
export declare function handleTagReceiptValue(agent: OneShot, args: Record<string, unknown>): Promise<void>;
|
package/dist/tools/analytics.js
CHANGED
|
@@ -35,20 +35,36 @@ export const receiptsListTool = {
|
|
|
35
35
|
};
|
|
36
36
|
export const tagReceiptValueTool = {
|
|
37
37
|
name: "oneshot_tag_receipt_value",
|
|
38
|
-
description: "Tag
|
|
39
|
-
"
|
|
38
|
+
description: "Tag business value (revenue, lead, conversion, savings, engagement) to feed RoCS. " +
|
|
39
|
+
"Address it three ways: receipt_id (rcpt_…), request_id from the original tool call, " +
|
|
40
|
+
"or goal_id — a correlation key that attributes a whole cadence's outcome (a closed deal " +
|
|
41
|
+
"across the intro email + follow-ups + find/verify/enrich calls sharing decisionContext.goalId) " +
|
|
42
|
+
"in one call. Read goal-level rollups back with oneshot_rocs_by_goal. Free.",
|
|
40
43
|
inputSchema: {
|
|
41
44
|
type: "object",
|
|
42
45
|
properties: {
|
|
43
|
-
receipt_id: { type: "string", description: "Receipt id (rcpt_…) to tag. Provide
|
|
44
|
-
request_id: { type: "string", description: "request_id/job_id from the original tool call.
|
|
45
|
-
|
|
46
|
+
receipt_id: { type: "string", description: "Receipt id (rcpt_…) to tag. Provide one of receipt_id / request_id / goal_id." },
|
|
47
|
+
request_id: { type: "string", description: "request_id/job_id from the original tool call." },
|
|
48
|
+
goal_id: { type: "string", description: "Cadence correlation key (decisionContext.goalId). Attributes the outcome to the whole group at once." },
|
|
49
|
+
type: { type: "string", description: "Value type: 'revenue', 'lead', 'conversion', 'savings', or 'engagement'" },
|
|
46
50
|
amount: { type: "number", description: "Value amount (e.g. USD)" },
|
|
47
51
|
label: { type: "string", description: "Optional human label for the value" },
|
|
48
52
|
},
|
|
49
53
|
required: ["type"],
|
|
50
54
|
},
|
|
51
55
|
};
|
|
56
|
+
export const rocsByGoalTool = {
|
|
57
|
+
name: "oneshot_rocs_by_goal",
|
|
58
|
+
description: "Per-cadence RoCS rollup: spend (receipts) vs. value (outcomes) grouped by goal_id. " +
|
|
59
|
+
"Answers 'what did this cadence cost vs. earn' in one query. Free.",
|
|
60
|
+
inputSchema: {
|
|
61
|
+
type: "object",
|
|
62
|
+
properties: {
|
|
63
|
+
period: { type: "number", description: "Lookback window in days" },
|
|
64
|
+
goal_id: { type: "string", description: "Optional — restrict the rollup to a single cadence correlation key." },
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
};
|
|
52
68
|
export async function handleSpendBreakdown(agent, args) {
|
|
53
69
|
return agent.spendBreakdown({ period: args.period });
|
|
54
70
|
}
|
|
@@ -65,8 +81,18 @@ export async function handleReceiptsList(agent, args) {
|
|
|
65
81
|
until: args.until,
|
|
66
82
|
});
|
|
67
83
|
}
|
|
84
|
+
export async function handleRocsByGoal(agent, args) {
|
|
85
|
+
return agent.rocsByGoal({
|
|
86
|
+
period: args.period,
|
|
87
|
+
goalId: args.goal_id,
|
|
88
|
+
});
|
|
89
|
+
}
|
|
68
90
|
export async function handleTagReceiptValue(agent, args) {
|
|
69
|
-
return agent.tagReceiptValue({
|
|
91
|
+
return agent.tagReceiptValue({
|
|
92
|
+
receiptId: args.receipt_id,
|
|
93
|
+
requestId: args.request_id,
|
|
94
|
+
goalId: args.goal_id,
|
|
95
|
+
}, {
|
|
70
96
|
type: args.type,
|
|
71
97
|
amount: args.amount,
|
|
72
98
|
label: args.label,
|
package/dist/tools/index.js
CHANGED
|
@@ -17,7 +17,7 @@ import { deepResearchPersonTool, socialProfilesTool, articleSearchTool, personNe
|
|
|
17
17
|
import { companySearchTool, enrichCompanyTool, handleCompanySearch, handleEnrichCompany } from "./company.js";
|
|
18
18
|
import { computeTool, computeStatusTool, computeTasksTool, computeCancelTool, computeRespondTool, handleCompute, handleComputeStatus, handleComputeTasks, handleComputeCancel, handleComputeRespond } from "./compute.js";
|
|
19
19
|
import { listDomainsTool, pauseDomainTool, resumeDomainTool, handleListDomains, handlePauseDomain, handleResumeDomain } from "./domains.js";
|
|
20
|
-
import { spendBreakdownTool, rocsTool, receiptsListTool, tagReceiptValueTool, handleSpendBreakdown, handleRocs, handleReceiptsList, handleTagReceiptValue } from "./analytics.js";
|
|
20
|
+
import { spendBreakdownTool, rocsTool, rocsByGoalTool, receiptsListTool, tagReceiptValueTool, handleSpendBreakdown, handleRocs, handleRocsByGoal, handleReceiptsList, handleTagReceiptValue } from "./analytics.js";
|
|
21
21
|
// All available tools
|
|
22
22
|
export const tools = [
|
|
23
23
|
// Communication
|
|
@@ -70,6 +70,7 @@ export const tools = [
|
|
|
70
70
|
// Analytics
|
|
71
71
|
spendBreakdownTool,
|
|
72
72
|
rocsTool,
|
|
73
|
+
rocsByGoalTool,
|
|
73
74
|
receiptsListTool,
|
|
74
75
|
tagReceiptValueTool,
|
|
75
76
|
// Account
|
|
@@ -129,6 +130,7 @@ const handlers = {
|
|
|
129
130
|
// Analytics
|
|
130
131
|
"oneshot_spend_breakdown": handleSpendBreakdown,
|
|
131
132
|
"oneshot_rocs": handleRocs,
|
|
133
|
+
"oneshot_rocs_by_goal": handleRocsByGoal,
|
|
132
134
|
"oneshot_receipts_list": handleReceiptsList,
|
|
133
135
|
"oneshot_tag_receipt_value": handleTagReceiptValue,
|
|
134
136
|
// Account
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oneshot-agent/mcp-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"description": "MCP server for OneShot - commercial actions for AI agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@coinbase/cdp-sdk": "1.45.0",
|
|
27
27
|
"@modelcontextprotocol/sdk": "1.27.1",
|
|
28
|
-
"@oneshot-agent/sdk": "^0.
|
|
28
|
+
"@oneshot-agent/sdk": "^0.22.0",
|
|
29
29
|
"zod": "3.25.76"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|