Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit f634a69

Browse files
committedApr 16, 2025·
added call schedule support
1 parent 7eb1cbb commit f634a69

File tree

4 files changed

+21
-3
lines changed

4 files changed

+21
-3
lines changed
 

‎package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
{
22
"name": "@vapi-ai/mcp-server",
33
"description": "Vapi MCP Server",
4-
"version": "0.0.3",
4+
"version": "0.0.4",
55
"main": "dist/index.js",
6+
"types": "dist/index.d.ts",
67
"type": "module",
78
"author": {
89
"name": "Vapi AI",
@@ -43,7 +44,9 @@
4344
"test:e2e": "NODE_OPTIONS=--experimental-vm-modules jest src/tests/mcp-server-e2e.test.ts"
4445
},
4546
"files": [
46-
"dist"
47+
"dist",
48+
"dist/**/*.d.ts",
49+
"dist/**/*.d.ts.map"
4750
],
4851
"dependencies": {
4952
"@modelcontextprotocol/sdk": "^1.9.0",

‎src/schemas/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,10 @@ export const CallInputSchema = z.object({
210210
})
211211
.optional()
212212
.describe('Customer information'),
213+
scheduledAt: z
214+
.string()
215+
.optional()
216+
.describe('ISO datetime string for when the call should be scheduled (e.g. "2025-03-25T22:39:27.771Z")'),
213217
});
214218

215219
export const CallOutputSchema = BaseResponseSchema.extend({
@@ -222,6 +226,7 @@ export const CallOutputSchema = BaseResponseSchema.extend({
222226
phoneNumber: z.string(),
223227
})
224228
.optional(),
229+
scheduledAt: z.string().optional(),
225230
});
226231

227232
export const GetCallInputSchema = z.object({

‎src/transformers/index.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,13 @@ export function transformCallInput(
115115
},
116116
}
117117
: {}),
118+
...(input.scheduledAt
119+
? {
120+
schedulePlan: {
121+
earliestAt: input.scheduledAt,
122+
},
123+
}
124+
: {}),
118125
};
119126
}
120127

@@ -134,6 +141,7 @@ export function transformCallOutput(
134141
phoneNumber: call.customer.number || '',
135142
}
136143
: undefined,
144+
scheduledAt: call.schedulePlan?.earliestAt,
137145
};
138146
}
139147

‎tsconfig.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
"strict": true,
99
"esModuleInterop": true,
1010
"skipLibCheck": true,
11-
"forceConsistentCasingInFileNames": true
11+
"forceConsistentCasingInFileNames": true,
12+
"declaration": true,
13+
"declarationMap": true
1214
},
1315
"include": ["src/**/*"],
1416
"exclude": ["node_modules", "dist"]

0 commit comments

Comments
 (0)