@@ -141,6 +141,10 @@ export const CreateAssistantInputSchema = z.object({
141141 ] )
142142 . default ( DEFAULT_LLM )
143143 . describe ( 'LLM configuration' ) ,
144+ toolIds : z
145+ . array ( z . string ( ) )
146+ . optional ( )
147+ . describe ( 'IDs of tools to use with this assistant' ) ,
144148 transcriber : z
145149 . object ( {
146150 provider : z . string ( ) . describe ( 'Provider to use for transcription' ) ,
@@ -160,7 +164,7 @@ export const CreateAssistantInputSchema = z.object({
160164 . string ( )
161165 . optional ( )
162166 . default ( 'Hello, how can I help you today?' )
163- . describe ( 'First message to send ' ) ,
167+ . describe ( 'First message to say to the user ' ) ,
164168 firstMessageMode : z
165169 . enum ( [
166170 'assistant-speaks-first' ,
@@ -169,7 +173,7 @@ export const CreateAssistantInputSchema = z.object({
169173 ] )
170174 . default ( 'assistant-speaks-first' )
171175 . optional ( )
172- . describe ( 'First message mode ' ) ,
176+ . describe ( 'This determines who speaks first, either assistant or user ' ) ,
173177} ) ;
174178
175179export const AssistantOutputSchema = BaseResponseSchema . extend ( {
@@ -187,12 +191,66 @@ export const AssistantOutputSchema = BaseResponseSchema.extend({
187191 provider : z . string ( ) ,
188192 model : z . string ( ) ,
189193 } ) ,
194+ toolIds : z . array ( z . string ( ) ) . optional ( ) ,
190195} ) ;
191196
192197export const GetAssistantInputSchema = z . object ( {
193198 assistantId : z . string ( ) . describe ( 'ID of the assistant to get' ) ,
194199} ) ;
195200
201+ export const UpdateAssistantInputSchema = z . object ( {
202+ assistantId : z . string ( ) . describe ( 'ID of the assistant to update' ) ,
203+ name : z . string ( ) . optional ( ) . describe ( 'New name for the assistant' ) ,
204+ instructions : z
205+ . string ( )
206+ . optional ( )
207+ . describe ( 'New instructions for the assistant' ) ,
208+ llm : z
209+ . union ( [
210+ LLMSchema ,
211+ z . string ( ) . transform ( ( str ) => {
212+ try {
213+ return JSON . parse ( str ) ;
214+ } catch ( e ) {
215+ throw new Error ( `Invalid LLM JSON string: ${ str } ` ) ;
216+ }
217+ } ) ,
218+ ] )
219+ . optional ( )
220+ . describe ( 'New LLM configuration' ) ,
221+ toolIds : z
222+ . array ( z . string ( ) )
223+ . optional ( )
224+ . describe ( 'New IDs of tools to use with this assistant' ) ,
225+ transcriber : z
226+ . object ( {
227+ provider : z . string ( ) . describe ( 'Provider to use for transcription' ) ,
228+ model : z . string ( ) . describe ( 'Transcription model to use' ) ,
229+ } )
230+ . optional ( )
231+ . describe ( 'New transcription configuration' ) ,
232+ voice : z
233+ . object ( {
234+ provider : VoiceProviderSchema . describe ( 'Provider to use for voice' ) ,
235+ voiceId : z . string ( ) . describe ( 'Voice ID to use' ) ,
236+ model : z . string ( ) . optional ( ) . describe ( 'Voice model to use' ) ,
237+ } )
238+ . optional ( )
239+ . describe ( 'New voice configuration' ) ,
240+ firstMessage : z
241+ . string ( )
242+ . optional ( )
243+ . describe ( 'First message to say to the user' ) ,
244+ firstMessageMode : z
245+ . enum ( [
246+ 'assistant-speaks-first' ,
247+ 'assistant-waits-for-user' ,
248+ 'assistant-speaks-first-with-model-generated-message' ,
249+ ] )
250+ . optional ( )
251+ . describe ( 'This determines who speaks first, either assistant or user' ) ,
252+ } ) ;
253+
196254// ===== Call Schemas =====
197255
198256export const CallInputSchema = z . object ( {
@@ -213,7 +271,9 @@ export const CallInputSchema = z.object({
213271 scheduledAt : z
214272 . string ( )
215273 . optional ( )
216- . describe ( 'ISO datetime string for when the call should be scheduled (e.g. "2025-03-25T22:39:27.771Z")' ) ,
274+ . describe (
275+ 'ISO datetime string for when the call should be scheduled (e.g. "2025-03-25T22:39:27.771Z")'
276+ ) ,
217277} ) ;
218278
219279export const CallOutputSchema = BaseResponseSchema . extend ( {
@@ -235,7 +295,6 @@ export const GetCallInputSchema = z.object({
235295
236296// ===== Phone Number Schemas =====
237297
238-
239298export const GetPhoneNumberInputSchema = z . object ( {
240299 phoneNumberId : z . string ( ) . describe ( 'ID of the phone number to get' ) ,
241300} ) ;
@@ -251,3 +310,17 @@ export const PhoneNumberOutputSchema = BaseResponseSchema.extend({
251310 } )
252311 . optional ( ) ,
253312} ) ;
313+
314+ // ===== Tool Schemas =====
315+
316+ export const GetToolInputSchema = z . object ( {
317+ toolId : z . string ( ) . describe ( 'ID of the tool to get' ) ,
318+ } ) ;
319+
320+ export const ToolOutputSchema = BaseResponseSchema . extend ( {
321+ type : z
322+ . string ( )
323+ . describe ( 'Type of the tool (dtmf, function, mcp, query, etc.)' ) ,
324+ name : z . string ( ) . describe ( 'Name of the tool' ) ,
325+ description : z . string ( ) . describe ( 'Description of the tool' ) ,
326+ } ) ;
0 commit comments