You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.query.ai-generate.tsx
Copy file name to clipboardExpand all lines: apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.test.ai-generate-payload.tsx
"Look up the source code of the task to understand what payload shape it expects. Use this when there is no JSON Schema available and you need to infer the payload structure from the task implementation.",
"Set the time filter for the query page UI instead of adding time conditions to the query. ALWAYS use this tool when the user wants to filter by time (e.g., 'last 7 days', 'past hour', 'yesterday'). The UI will apply this filter automatically using the table's time column (triggered_at for runs, bucket_start for metrics). Do NOT add triggered_at or bucket_start to the WHERE clause for time filtering - use this tool instead.",
69
-
parameters: z.object({
69
+
inputSchema: z.object({
70
70
period: z
71
71
.string()
72
72
.optional()
@@ -125,7 +125,7 @@ export class AIQueryService {
125
125
validateTSQLQuery: tool({
126
126
description:
127
127
"Validate a TSQL query for syntax errors and schema compliance. Always use this tool to verify your query before returning it to the user.",
128
-
parameters: z.object({
128
+
inputSchema: z.object({
129
129
query: z.string().describe("The TSQL query to validate"),
130
130
}),
131
131
execute: async({ query })=>{
@@ -135,7 +135,7 @@ export class AIQueryService {
135
135
getTableSchema: tool({
136
136
description:
137
137
"Get detailed schema information about available tables and columns. Use this to understand what data is available and how to query it.",
138
-
parameters: z.object({
138
+
inputSchema: z.object({
139
139
tableName: z
140
140
.string()
141
141
.optional()
@@ -147,7 +147,7 @@ export class AIQueryService {
147
147
}),
148
148
setTimeFilter: this.buildSetTimeFilterTool(),
149
149
},
150
-
maxSteps: 5,
150
+
stopWhen: stepCountIs(5),
151
151
experimental_telemetry: {
152
152
isEnabled: true,
153
153
metadata: {
@@ -191,7 +191,7 @@ export class AIQueryService {
191
191
validateTSQLQuery: tool({
192
192
description:
193
193
"Validate a TSQL query for syntax errors and schema compliance. Always use this tool to verify your query before returning it to the user.",
194
-
parameters: z.object({
194
+
inputSchema: z.object({
195
195
query: z.string().describe("The TSQL query to validate"),
196
196
}),
197
197
execute: async({ query })=>{
@@ -201,7 +201,7 @@ export class AIQueryService {
201
201
getTableSchema: tool({
202
202
description:
203
203
"Get detailed schema information about available tables and columns. Use this to understand what data is available and how to query it.",
0 commit comments