@@ -40,6 +40,12 @@ export const getProjectRunsTool: ToolConfig<HexGetProjectRunsParams, HexGetProje
4040 description :
4141 'Filter by run status: PENDING, RUNNING, ERRORED, COMPLETED, KILLED, UNABLE_TO_ALLOCATE_KERNEL' ,
4242 } ,
43+ runTriggerFilter : {
44+ type : 'string' ,
45+ required : false ,
46+ visibility : 'user-or-llm' ,
47+ description : 'Filter by how the run was triggered: ALL, API, SCHEDULED, or APP_REFRESH' ,
48+ } ,
4349 } ,
4450
4551 request : {
@@ -48,8 +54,9 @@ export const getProjectRunsTool: ToolConfig<HexGetProjectRunsParams, HexGetProje
4854 if ( params . limit ) searchParams . set ( 'limit' , String ( params . limit ) )
4955 if ( params . offset ) searchParams . set ( 'offset' , String ( params . offset ) )
5056 if ( params . statusFilter ) searchParams . set ( 'statusFilter' , params . statusFilter )
57+ if ( params . runTriggerFilter ) searchParams . set ( 'runTriggerFilter' , params . runTriggerFilter )
5158 const qs = searchParams . toString ( )
52- return `https://app.hex.tech/api/v1/projects/${ params . projectId } /runs${ qs ? `?${ qs } ` : '' } `
59+ return `https://app.hex.tech/api/v1/projects/${ params . projectId . trim ( ) } /runs${ qs ? `?${ qs } ` : '' } `
5360 } ,
5461 method : 'GET' ,
5562 headers : ( params ) => ( {
@@ -78,6 +85,8 @@ export const getProjectRunsTool: ToolConfig<HexGetProjectRunsParams, HexGetProje
7885 } ) ) ,
7986 total : runs . length ,
8087 traceId : data . traceId ?? null ,
88+ nextPage : data . nextPage ?? null ,
89+ previousPage : data . previousPage ?? null ,
8190 } ,
8291 }
8392 } ,
@@ -111,5 +120,11 @@ export const getProjectRunsTool: ToolConfig<HexGetProjectRunsParams, HexGetProje
111120 } ,
112121 total : { type : 'number' , description : 'Total number of runs returned' } ,
113122 traceId : { type : 'string' , description : 'Top-level trace ID' , optional : true } ,
123+ nextPage : { type : 'string' , description : 'Cursor for the next page of runs' , optional : true } ,
124+ previousPage : {
125+ type : 'string' ,
126+ description : 'Cursor for the previous page of runs' ,
127+ optional : true ,
128+ } ,
114129 } ,
115130}
0 commit comments